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

Please can you upload the previous version of this code? #3

Closed rakeshwar07 closed 1 year ago

rakeshwar07 commented 1 year ago

, I am trying to work on offline video tracking

OMEGAMAX10 commented 1 year ago

Hello, could you please give me more details about this previous version of code? My script is compatible with the latest ultralytics version for now (8.0.43), so I think it should be alright. The only addition to this code is the UI made with streamlit, for a much better user experience.

rakeshwar07 commented 1 year ago

I really appreciate your work, when I try to run the code I am getting this error "TypeError Traceback (most recent call last) Cell In[2], line 117 91 result_list_json = [ 92 { 93 'class_id': int(result.boxes.cls[idx].cpu().numpy()), (...) 104 }for idx in range(len(result)) 105 ] 106 if tracker is not None: 107 bbs = [ 108 ( 109 [ 110 result_list_json[idx]['bbox']['x_min'], 111 result_list_json[idx]['bbox']['y_min'], 112 result_list_json[idx]['bbox']['x_max'] - result_list_json[idx]['bbox']['x_min'], 113 result_list_json[idx]['bbox']['y_max'] - result_list_json[idx]['bbox']['y_min'] 114 ], 115 result_list_json[idx]['confidence'], 116 result_list_json[idx]['class'], --> 117 )for idx in range(len(result)) 118 ] 119 tracks = tracker.update_tracks(bbs, frame=result.orig_img) 120 for idx in range(len(result_list_json)):

TypeError: 'NoneType' object cannot be interpreted as an integer"

Currently, I am not using streamlit, just testing with an offline video.

rakeshwar07 commented 1 year ago

Sorry that error is because of the missing "len_results = len(result.boxes)" in the result_to_json method. I saw that you too have updated it. Thank you, I am closing this issue.