yolo_series_deepsort_pytorch icon indicating copy to clipboard operation
yolo_series_deepsort_pytorch copied to clipboard

How to train model on custom dataset?

Open Wincioor11 opened this issue 3 years ago • 1 comments

Hey can you provide any guide on how to train model on the custom dataset like crowd_human or MOT17?

I am trying to separate training for yolo and deepsort models, but I am struggling with finding a dataset format for training the deep_sort the torchvision.datasets.ImageFolder in train.py seem to require images but I would expect it to require files with detection info etc.

Thanks for your time :)

Wincioor11 avatar Aug 05 '22 18:08 Wincioor11

Thanks for your suggestion

The detection model and the reid model need to be trained separately

Detection model See ./detector/ for the training method of the detection model

$  more detector/YOLOV7/README.md

Or check out yolo's official training method

Reid model training

For the training method of the reid model, see ./deep_sort/deep/train.py for more detail

$ cd ./deep_sort/deep/train.py
$ python train.py --data-dir /workspace/dataset/Market-1501/Market-1501-v15.09.15/pytorch/ --interval 10  --gpu-id 0

Fast reid fast-reid/GETTING_STARTED.md at master · JDAI-CV/fast-reid https://github.com/JDAI-CV/fast-reid/blob/master/GETTING_STARTED.md

Prepare your dataset

  • Obeject Detection Train Custom Data · ultralytics/yolov5 Wiki https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data

  • reid Person_reID_baseline_pytorch https://github.com/layumi/Person_reID_baseline_pytorch fast-reid/datasets at master · JDAI-CV/fast-reid https://github.com/JDAI-CV/fast-reid/tree/master/datasets

xuarehere avatar Aug 22 '22 06:08 xuarehere