from ultralytics import YOLO import cv2 # 1. Load your newly trained model model = YOLO('best.pt') # 2. Run prediction on an image from your 'test' folder # Change 'path/to/your/test/image.jpg' to a real path results = model.predict(source='datasets/test/images/TestRipe-1-_jpg.rf.1d329242e7510efbc0c6a2c94bc43edb.jpg', save=True, conf=0.5) # 3. Check your 'runs/detect/predict' folder for the result image! print("Check runs/detect/predict for the annotated image.")