Skip to content

How to evaluate on custom tracking dataset

Mike edited this page Jun 6, 2023 · 11 revisions
  1. Run val.py once in order to download the evaluation tools

  2. Create your custom dataset folder under:

yolov8_tracking/val_utils/data/MOTCUSTOM

Following the standard MOT structure

MOTCUSTOM
├── test
│   ├── MOTCUSTOM-01          # the content of all the sequence folders should be the same
│   │   ├── img1
│   │   │    ├── 000001.jpg
│   │   │    ├── 000002.jpg
│   │   │    ├── ...
│   │   │    └── XXXXXX.jpg
│   │   ├── gt
│   │   │   └── gt.txt
│   │   └── seqinfo.ini
│   ├── MOTCUSTOM-02
│   ├── ...
│   └── MOTCUSTOM-05
└── train
    ├── MOTCUSTOM-06
    ├── ...
    └── MOTCUSTOM-10

where seqinfo.ini should contain:

[Sequence]
seqLength=<X>

where seqLength is the number of frames in the img1 of that sequence folder

  1. Now everything is setup for custom dataset evaluation
python val.py --yolo-model <my_custom_weights> --benchmark MOTCUSTOM --split test --tracking-method strongsort
                                                                                                    ocsort
                                                                                                    bytetrack

By default all sequences in test v train will be taken into consideration for evaluation

  1. Evaluate on existing results
python val.py --eval-existing --project runs/val --name exp --benchmark MOTCUSTOM --split test --tracking-method strongsort

This will evaluate the results under runs/val/exp/labels on you custom MOTCUSTOM dataset

  1. NOTE If you are evaluating on a multi-class dataset, these values in trackeval have to be set accordingly: