from ultralytics import YOLO import cv2 model = YOLO('./models/yolov9e_object_classification.pt') image_path = './assets/classification_images/rgb_web_ex.jpeg' image = cv2.imread(image_path) results = model(image) annotated_image = results[0].plot() output_path = './assets/classification_images/annotated_image.jpg' cv2.imwrite(output_path, annotated_image) print(f"Annotated image saved to {output_path}") cv2.imshow('Detected Objects', annotated_image) cv2.waitKey(0) cv2.destroyAllWindows()