Closed ganesharavindh closed 1 month ago
Hello @ganesharavindh,
Have you checked the requirements.txt file to ensure the library versions are the same? The error might occur with different library versions.
Could you also send me the output of the following code?
print(detections['det'])
And if possible, can you provide the code (or screenshot) that you are modified
Hello @Harly-1506 ,
You are correct, because of the version conflict I got that error and I found one more issue if you try to predict the small size images, the scaling bounding boxes to its original image size is not perfect, here I resized the bus image to (205, 270) and here is the resized image
Output:
Actually, the detection was correct but not the scaling it seems.
what about the model you have trained? the image size? I have tested with the image > 640 x 640 working well. Please confirm me this information
@Harly-1506 I didn't train the model, I used the default yolov8n openvino converted model using the below code
from ultralytics import YOLO model = YOLO("yolov8n.pt") path = model.export(format="openvino")
I highly recommend using images larger than 640x640 for better performance with YOLOv8. Larger images often provide more detail, which can lead to more accurate object detection and segmentation.
To resize your images, you can use methods available in libraries such as OpenCV, PIL (Pillow)...
I apologize for not being able to check the issue right now due to time constraints. However, these resizing methods should help you prepare your images for YOLOv8.
Additionally, I would appreciate it if you could star my repository on GitHub. It helps support the project and makes it more visible to others.
Thank you for your understanding and support!
Sure @Harly-1506 , Thank you for your support.
I tried to use the yolov8n mode in Openvino and found that your repo has the numpy implementation of NMS, I commented some of your code to work for the detection model not only the segmented models and got the below error
To reproduce the same error do the following,
bboxes_, masks = detections['det'].tolist() if len(detections['det'])>0 else [], [] #detections['segment']