MuhammadMoinFaisal / YOLOv8-DeepSORT-Object-Tracking

YOLOv8 Object Tracking using PyTorch, OpenCV and DeepSORT
666 stars 197 forks source link

Output formatting #13

Closed SAITEJA245 closed 1 year ago

SAITEJA245 commented 1 year ago

A request @MuhammadMoinFaisal

When I am trying to run the model by passing the image, I do get a response regarding no.of objects detected in the image

The output looks like this python predict.py model=yolov8l.pt source="/Users/Desktop/t_s.jpeg" show=True

Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done! Ultralytics YOLOv8.0.3 🚀 Python-3.8.16 torch-1.13.1 CPU Fusing layers... YOLOv8l summary: 268 layers, 43668288 parameters, 0 gradients, 165.2 GFLOPs image 1/1 /Users/Desktop/t_s.jpeg: 384x640 8 persons, 15 cars, 6 motorcycles, 1 traffic light, 1514.5ms Speed: 1.2ms pre-process, 1514.5ms inference, 3.5ms postprocess per image at shape (1, 3, 640, 640) Results saved to /Users/Desktop/pythonProject/YOLOv8-DeepSORT-Object-Tracking/runs/detect/train13

Can you please tell me where to make changes to return the object detected in key-value pairs so that I can pass on the results to other processes

as there is no #12 debug mode, I was not able to find the function from which the results are being returned, so I am trying to make a dictionary of objects found in the image uploaded so the results can be stored in a format of key-value pair where the key is the object identified and the value is the count of such objects in the image uploaded {'persons' : 8, 'cars' : 15, 'motorcycles' : 6, 'traffic light' : 1}

Minor

I don't think thedraw_boxes function is getting called cause the image result stored in the run folder doesn't have the boxes around the identified objects.

Ps Thank you for your quick and active response here

MuhammadMoinFaisal commented 1 year ago

Hi @SAITEJA245 , I have not worked on it, you can look over internet for help