-
Notifications
You must be signed in to change notification settings - Fork 1.7k
How to evaluate on custom tracking dataset
Mike edited this page Jun 6, 2023
·
11 revisions
-
Run
val.py
once in order to download the evaluation tools -
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
- 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
- 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
- NOTE If you are evaluating on a multi-class dataset, these values in trackeval have to be set accordingly:
- https://github.com/JonathonLuiten/TrackEval/blob/12c8791b303e0a0b50f753af204249e622d0281a/trackeval/datasets/mot_challenge_2d_box.py#L71
- https://github.com/JonathonLuiten/TrackEval/blob/12c8791b303e0a0b50f753af204249e622d0281a/trackeval/datasets/mot_challenge_2d_box.py#L72-L73
- https://github.com/JonathonLuiten/TrackEval/blob/12c8791b303e0a0b50f753af204249e622d0281a/trackeval/datasets/mot_challenge_2d_box.py#LL76C14-L76C36
- Don't forget to change the classes to evaluate: https://github.com/mikel-brostrom/yolo_tracking/blob/1e266d982c84620e0f8319df7b7f5233292132ae/examples/val.py#L204