Skip to main content

Posts

Featured

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/...

Latest posts

Completed Modules

Find contour

Assignment 23rd April linear regression

Chance of admission csv 22nd April 2025

height weight csv 22nd April 2025

Matplotlib assignment 21/04/2025

17 th April 2025

16th April 2024 (intern)

csv data 7th April 2025

assignment