SQUEEZENET1.1
import cv2 import numpy as np from openvino.runtime import Core, Tensor # Function to preprocess the image def preprocess_image(image_path): # Load the image image = cv2.imread(image_path) # Resize the image to 227x227 (input size for SqueezeNet) image_resized = cv2.resize(image, (227, 227)) # Convert from BGR to RGB image_rgb = image_resized #cv2.cvtColor(image_resized, cv2.COLOR_BGR2RGB) # Normalize the image image_normalized = image_rgb.astype(np.float32) # Change shape to (1, 3, 227, 227) image_input = np.transpose(image_normalized, (2, 0, 1)) # Shape becomes (3, 227, 227) image_input = np.expand_dims(image_input, axis=0) # Add batch dimension return image_input # Load the OpenVINO runtime ie = Core() # Load the model model_xml = 'models/squeezenet1.1/FP16/squeezenet1.1.xml' model_bin = 'models/...