Have the prediction codes been updated? v8.0.4
Search before asking
- [X] I have searched the YOLOv8 issues and discussions and found no similar questions.
Question
Hello,
I am using ultralytics version 8.0.4. These version codes and documentation codes are different.
Example:
pred = model.predict(img)
for image_id, result in enumerate(prediction_result):
print(result)
...
Output:
{'det': array([[ 625, 310, 708, 464, 0.88721, 0],
[ 513, 312, 579, 464, 0.73096, 0]], dtype=float32)}
Why did you add a dictionary structure? And why is the prediction result in cpu and numpy format?
Additional
No response
@kadirnar the outputs are now in the form of a generator so that you can run any length of video or stream but you won't run out of memory. The new format will allow you to easily access the box detections and masks coordinates easily.. output['det'] & output['masks']. I'm working on documentation as we speak to provide some examples on interacting with outputs.
@kadirnar I'd like your feedback here. We're sure about using the generator as it saves memory but not so sure about using the dicts.. Would you prefer the previous format of the output?
This is a very nice improvement, but other models are not like this. So we need to write custom code for yolov8.
Examples:
Norfair: https://github.com/kadirnar/Norfair-Track/blob/main/norfair_tracker/norfair.py#L39 Strong_Sort: https://github.com/kadirnar/strongsort-pip/blob/main/strongsort/strong_sort.py#L38 OcSort: https://github.com/kadirnar/ocsort-pip/blob/main/ocsort/ocsort.py#L231 Byte_Tracker: https://github.com/kadirnar/bytetrack-pip/blob/main/bytetracker/byte_tracker.py#L174
Yolov5_StrongSORT_OSNet: https://github.com/mikel-brostrom/Yolov5_StrongSORT_OSNet/blob/master/trackers/bytetrack/byte_tracker.py#L179
I will need to update all tracker libraries for yolov8. Currently yolov5/6/7/X models are working but I am getting error for yolov8. If it outputs in tensor format, it won't be a problem.
@kadirnar okay. I'll discuss this and get back to you
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐