Skip to content

deepdrivepl/CTMC-v1-solution

Repository files navigation

CTMC-v1-solution

This repostitory contains the 2021 CTMC-v1 (Cell Tracking With Mitosis Detection Dataset Challenge) solution - CTMC-v1 is part of the MOT Challenge.

More details and step by step expalantion can be found in this (Polish only) blog post.

We follow a tracking-by-detection approach

Sample sequence frame

Sample image

Instructions

Clone the repository

git clone https://github.com/deepdrivepl/CTMC-v1-solution.git
cd CTMC-v1-solution

Install the requirements

conda create -n CTMC python=3.7
conda activate CTMC
pip install -r requirements.txt

Run inference (weights)

darknet detector test cfgs/011-v4.data cfgs/011-v4.cfg backups/011-v4_best.weights -ext_output -dont_show -out results/011-best-val.json < filelists/011-val

Convert detections to MOT format

python MOT/yolo2MOT/yolo2MOT.py --input results/011-best-val.json --out_dir results/011-best-val/detection --json

Run IoU Tracking

git clone https://github.com/bochinski/iou-tracker.git
cd iou-tracker
while read p; do python demo.py --detection_path ../results/011-best-val/detection/$p.txt --output_path ../results/011-best-val/iou/$p.txt --format motchallenge; done < ../filelists/011-val-seq

Run V-IoU Tracking

To run V-IoU Tracking, you need to download training images and save them in the train directory.

while read p; do python demo.py --detection_path ../results/011-best-val/detection/$p.txt --output_path ../results/011-best-val/viou/$p.txt --format motchallenge --frames_path ../train/$p/img1/{:06d}.jpg --visual KCF; done < ../filelists/011-val-seq

Run tracking with norfair

Jupyter notebook

Visualize

python MOT/visualizeMOT.py --imgs train --mot_dir results/011-best-val/iou --out_dir results/011-best-val/iou --img_mot
python MOT/visualizeMOT.py --imgs train --mot_dir results/011-best-val/viou --out_dir results/011-best-val/viou --img_mot
python MOT/visualizeMOT.py --imgs train --mot_dir results/011-best-val/norfair --out_dir results/011-best-val/norfair --img_mot

Compute metrics

We use py-motmetrics.

git clone https://github.com/cheind/py-motmetrics.git && cd py-motmetrics
python -m motmetrics.apps.eval_motchallenge ../train ../results/011-best-val/iou
python -m motmetrics.apps.eval_motchallenge ../train ../results/011-best-val/viou
python -m motmetrics.apps.eval_motchallenge ../train ../results/011-best-val/norfair

Results

IDF1 IDP IDR Rcll Prcn GT MT PT ML FP FN IDs FM MOTA MOTP IDt IDa IDm
OVERALL IoU 46.5% 49.6% 43.7% 64.2% 72.9% 374 137 178 59 54413 81299 1864 4629 39.5% 0.295 115 1747 55
OVERALL v-IoU 45.4% 48.4% 42.7% 64.2% 72.8% 374 137 178 59 54528 81297 1968 4975 39.4% 0.296 107 1867 52
OVERALL norfair 52.0% 54.1% 50.0% 65.3% 70.6% 374 134 184 56 61925 78829 1107 3280 37.6% 0.298 118 894 64

Output video (YOLOv4 + norfair)

U2O-S-run03.mp4

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published