Generalizable vision-language pre-training for annotation-free pathology localization
Some code is borrowed from GLoRIA and BioViL.
conda create -n AFLoc python=3.9
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
conda activate AFLoc
pip install -r requirements.txt
Download the necessary files and perform the following code:
python preprocess/resize.py
python preprocess/preprocess.py
Adjust the necessary paths and perform the following code:
python train.py -c ./afloc/config.yaml --train
Download the pre-trained weight and place it in the ./pretrained folder
We use MS-CXR as an example:
python inference.py -ds MS_CXR --gpu 0