You can download the dataset at https://drive.google.com/drive/folders/1k2GuIu6obj3Nz--dOTLuwQnJ2qs1sXxE Additional information on the dataset is available at https://github.com/intelligentMachines-ITU/LowCostMalariaDetection_CVPR_2022
Set path of downloaded folder in data/m5_400x.yaml
The model is trained on HCM images and validated on LCM images
The model is trained and validated on the same zoom resolution (100/400/1000x)
To train on 400x scale:
python train_contrastive.py --data m5_400x.yaml --epochs 60 --weights yolov5m.pt --img 640 --cfg yolov5m.yaml --cache disk --batch-size 32 --hyp config.yaml
To train without using the contrastive loss:
python train.py --data m5_400x.yaml --epochs 60 --weights yolov5m.pt --img 640 --cfg yolov5m.yaml --cache disk --batch-size 32 --hyp config.yaml
Change --data m5_400x.yaml to m5_100x.yaml/m5_1000x.yaml to try other resolutions
The output of training will finish with: Results saved to runs\detect\train Navigate to folder to see prediction on both training and validation data
If you find the repo useful for your research, please consider citing our paper:
@article{dave2024codamal,
title={CodaMal: Contrastive Domain Adaptation for Malaria Detection in Low-Cost Microscopes},
author={Dave, Ishan Rajendrakumar and de Blegiers, Tristan and Chen, Chen and Shah, Mubarak},
journal={arXiv preprint arXiv:2402.10478},
year={2024}
}
For any questions, welcome to create an issue or contact Ishan Dave ([email protected]).