ysig / diff-mining

Diffusion base mining
Other
48 stars 4 forks source link

about xrays #1

Open Crslvaxy opened 1 month ago

Crslvaxy commented 1 month ago

Greetings! Thanks for sharing the code. I want to run the CXR8 dataset with this model. I downloaded the code from GitHub and downloaded the CXR8 dataset to ./dataset/CXR8. Then I executed conda env create -f environment.yaml and conda activate diff-mining. At this time, when I executed python diffmining/applications/xray/finetune.py --data_path dataset/CXR8/ --train_batch_size 8 --output_dir models/xray --num_train_epochs 100, I encountered some errors in diffmining/applications/xray/finetune.py. For example, No module named 'pandas', name 'sys' is not defined, No module named 'matplotlib'. So did I miss any steps?

ysig commented 2 weeks ago

@Crslvaxy import sys sounds strange as an error - python has sys as an import by default. I added matplotlib in the requirements, can you try again?

Crslvaxy commented 1 day ago

Thanks for your answers ! I had set the path wrong, I have fixed this problem. But I have a new question :line 39 in "diff-mining-main/diffmining/applications/xray/finetune.py" df = pd.read_csv(join(data_path, 'metadata.csv'), dtype={'id': str, 'country': str, 'region': str, 'sub-region': str, 'city': str}) This line of code requires that ./dataset/CXR8/ contains the file metadata.csv, but the format of this file is {'id': str, 'country': str, 'region': str, 'sub-region': str, 'city': str}, is this correct? In addition, how can I generate metadata.csv?