Skip to content

Cross-Domain Object Detection for UAV-based Thermal Imaging

License

Notifications You must be signed in to change notification settings

Pamasi/tir_cross_domain

Repository files navigation

Cross-Domain Object Detection for UAV-based Thermal Imaging

Semester project done by Paolo Dimasi, Alberto Foti and Samuele Pino for the course 01URPOV - Machine learning for vision and multimedia at Politecnico of Turin.

Installation

# apt install required packages
apt update
apt install -y zip htop screen libgl1-mesa-glx

# pip install required packages
pip install -r requirements.txt

Testing

python3 test.py --data data/data.yaml --img 640 --batch 32 --conf 0.001 --iou 0.65 --device 0 --weights <path/yolov7-weight.pt> --name <your_yolov7_trained_name>

Training

Data preparation

# train yolov7  models
python3 train.py --workers 32 --device 0  --batch-size 32 --data cfg/thermal-data.yaml --img 640 512 --cfg cfg/network/yolov7-tiny-silu.yaml --name <your_yolov7_name> --hyp data/hyp.yaml  --epochs 100  --weights "''"

Transfer learning

# finetune p5 models
python3 train.py --workers 8 --device 0 --batch-size 32 --data data/custom.yaml --img 640 512 --cfg cfg/training/yolov7-custom.yaml --weights <path/yolov7-weight.pt> --name <your_yolov7_pretrained_name> --hyp data/hyp.yaml

Inference

On video:

python3 detect.py --weights <path/yolov7-weight.pt> --conf 0.25 --img 640 --source <path/yourvideo.mp4>

On image:

python3 detect.py --weights <path/yolov7-weight.pt> --conf 0.25 --img 640 --source <path/yourimage.jpg>

Teaser

Citation

As long as you cite us you are free to use it.

Acknowledgements

Expand

Copyright

Copyright (C) 2022 Paolo Dimasi, Alberto Foti, Samuele Pino

About

Cross-Domain Object Detection for UAV-based Thermal Imaging

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published