OMEGAMAX10 / YOLOv8-Object-Detection-Tracking-Image-Segmentation-Pose-Estimation

YOLOv8 object detection, tracking, image segmentation and pose estimation app using Ultralytics API (for detection, segmentation and pose estimation), as well as DeepSORT (for tracking) in Python. This app uses an UI made with streamlit and it can be deployed with Docker.
Apache License 2.0
67 stars 13 forks source link

Update for the latest yolov8 version #2

Closed AndreiVoian closed 1 year ago

AndreiVoian commented 1 year ago

Hi! Can you update the script to work with the latest version of yolov8?

Thanks!

OMEGAMAX10 commented 1 year ago

Hi, could you please elaborate? It seems that the code still works with the latest "ultralytics" package on my computer.

AndreiVoian commented 1 year ago

When I run the script it gives me this error:

Traceback (most recent call last):
  File "C:\Users\Department\Desktop\yolov8\yolov8_seg.py", line 67, in <module>
    image, result_list_json = object_segmentation(image, model, temp_filename='temp.png')
  File "C:\Users\Department\Desktop\yolov8\yolov8_seg.py", line 20, in object_segmentation
    if len(result['segment']) != len(result['det']):
  File "C:\Users\Department\Desktop\yolov8\venv\lib\site-packages\ultralytics\yolo\engine\results.py", line 44, in __getitem__
    setattr(r, item, getattr(self, item)[idx])
  File "C:\Users\Department\Desktop\yolov8\venv\lib\site-packages\ultralytics\yolo\engine\results.py", line 220, in __getitem__
    boxes = self.boxes[idx]
IndexError: too many indices for tensor of dimension 2
OMEGAMAX10 commented 1 year ago

Could you please give me a Wetransfer/Mega.nz/Drive link with your test image, as well as your ultralytics version from python?

AndreiVoian commented 1 year ago

I teste on this image: dog

Ultralytics version is 8.0.38

OMEGAMAX10 commented 1 year ago

I tested with this image and i got no such error. My version of ultralytics is 8.0.5, the latest version.

AndreiVoian commented 1 year ago

The latest version of ultralytics is 8.0.39 It has many bugs fixed and new features Try to upgrade to the latest version ( pip install ultralytics --upgrade )

OMEGAMAX10 commented 1 year ago

Indeed, you are correct, my apologies. I shall update my code as soon as possible.

OMEGAMAX10 commented 1 year ago

The script is updated, now it should work.

AndreiVoian commented 1 year ago

Thank you very much!