deshwalmahesh / yolov7-deepsort-tracking

Modular and ready to deploy code to detect and track videos using YOLO-v7 and DeepSORT
158 stars 65 forks source link

Hi~ I'm so interested about how you combine yolov7 with deepsort ? Can you give some direction? #2

Closed huchi00057 closed 2 years ago

deshwalmahesh commented 2 years ago

Thanks for reaching out. So the steps are:

1. Pass an Image to YOLOv7`
2. Get Bounding Box Coordinates
3. Crop image patches based on the Bounding Boxes
4. Pass in each patch to DeepSORT
5. Get the scores and ReID
6. Plot those things together
manish-sharma-attri commented 1 year ago

hi friend can you help me for this to understand how to apply this on custom dataset i already saw all your threads and can't understand anything

deshwalmahesh commented 1 year ago

hi friend can you help me for this to understand how to apply this on custom dataset i already saw all your threads and can't understand anything

DeepSort is dependent and combination of two different approaches and models:

  1. Detect Object(s) (using ANY Object Detection Model) : First train ANY object detection model on YOUR CUSTOM DATA
  2. Track that object in the video : Use a SIAMESE network for similarity on YOUR CUSTOM DATA

So you need to train those two models first and then you can combine. If you don't understand the terminologies I just said, it means you're skipping the learning curve which is a bad thing. You need to learn those first by googling Point 1 and Point 2.

then you just replace the models with the given ones. As simple as that. You can read the paper too. I'd highly recommend that.

manish-sharma-attri commented 1 year ago

Thanks for helping me I trained my model on yolov7 for two classes person wearing mask or not ,successfully Now what to do after this i am stuck here Thanks again friend

deshwalmahesh commented 1 year ago

Then Train a Siamese model, which is called ReiD model in DeepSort. It'll learn to differentiate between 2 people. Then just change the weights in this repo. As simple as that.

manish-sharma-attri commented 1 year ago

ok then data for ReID model will be yolo detection image or text annotation and how to get it