Closed AndreiVoian closed 1 year ago
Hi, could you please elaborate? It seems that the code still works with the latest "ultralytics" package on my computer.
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
Could you please give me a Wetransfer/Mega.nz/Drive link with your test image, as well as your ultralytics version from python?
I teste on this image:
Ultralytics version is 8.0.38
I tested with this image and i got no such error. My version of ultralytics is 8.0.5, the latest version.
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 )
Indeed, you are correct, my apologies. I shall update my code as soon as possible.
The script is updated, now it should work.
Thank you very much!
Hi! Can you update the script to work with the latest version of yolov8?
Thanks!