conda activate lvm_med
We illustrate LVM-Med ResNet-50 for VinDr dataset, which detects 14 different regions in X-ray images.
You can download the dataset from this link VinDr
and put the folder vinbigdata into the folder object_detection. To build the dataset, after downloading the dataset, you can refer to the script convert_to_coco.py
inside the folder object_detection and run it.
python convert_to_coco.py # Note, please check links inside the code in lines 146 and 158 to build the dataset correctly
Edit base_config_track.py
at:
- Lines
11
,12
for training set - Lines
60
,61
for valid set - Lines
65
,66
for test set - Lines
86
for folder store models.
bash command.sh
CUDA_VISIBLE_DEVICES=5 python finetune_with_path_modify_test_eval.py --experiment-name 'lvm-med-r50' --weight-path ../lvm_med_weights/lvmmed_resnet.torch --batch-size 16 --optim adam --clip 1 --lr 0.0001 --epochs 40 --labeled-dataset-percent 1.0 --resume