This is the official implementation of Multiscale Domain Adaptive YOLO (MS-DAYOLO) for Cross-Domain Object Detection based on Darknet (YOLOv4).
Please follow the instruction in AlexeyAB/darknet to install the requirements to compile Darkent and use YOLOv4 object detector.
Please follow these steps to adapt from Cityscapes to Foggy Cityscapes:
- Run
make
to compile Darknet with MS-DAYOLO. - Download the pre-trained weights-file: yolov4.conv.137.
- Download the required data file Cityscaples2Foggy.zip which has:
- source set with ground-truth annotation
- target set (with dummy annotation)
- test target set with ground-truth annotation.
- Extract the file in
data/
folder. - Train MS-DAYOLO:
./darknet detector train data/c2f.data cfg/ms-dayolo.cfg yolov4.conv.137 -dont_show -map -da
During training, the best weight will be saved in backup/
folder.
- If the best weight file does not be updated for a long time, stop the training.
- After training is finished, evaluate the trained MS-DAYOLO:
./darknet detector map data/c2f.data cfg/ms-dayolo.cfg backup/ms-dayolo_best.weights
- For comparison with the original YOLOv4, train it:
./darknet detector train data/c2f.data cfg/yolov4.cfg yolov4.conv.137 -dont_show -map
and evaluate the trained YOLOv4:
./darknet detector map data/c2f.data cfg/yolov4.cfg backup/yolov4_best.weights
Adaptation from Cityscapes to Foggy Cityscapes
Method | mAP | Pretrained Weights |
---|---|---|
YOLOv4 | 35.64 | download |
MS-DAYOLO | 43.04 | download |
@INPROCEEDINGS{ms-dayolo,
author={Hnewa, Mazin and Radha, Hayder},
booktitle={2021 IEEE International Conference on Image Processing (ICIP)},
title={Multiscale Domain Adaptive Yolo For Cross-Domain Object Detection},
year={2021},
pages={3323-3327}}