结合通用知识和特定知识的医学报告生成
Python >= 3.6
Pytorch >= 1.7
torchvison
- Microsoft COCO Caption Evaluation Tools
- CheXpert
conda activate tencent
Download IU and MIMIC-CXR datasets, and place them in data
folder.
- config : setup training arguments and data path
- data : store IU and MIMIC dataset
- misc : build general knowledge and specific knowledge
- models: basic model and all our models
- modules:
- the layer define of our model
- dataloader
- loss function
- metrics
- tokenizer
- some utils
- preprocess: data preprocess
- pycocoevalcap: Microsoft COCO Caption Evaluation Tools
The source code for training can be found here:
main_basic.py
: basic model
main.py
: model with knowledge
The values of all the hyperparameters can be found in the folder 'config'.
To run the command, you only need to specify the config file and the GPU ID and iteration version of the model to be used
Example:
python main.py --cfg config/iu_retrieval.yml --gpu 0 --version 1
Shuxin Yang, Xian Wu, Shen Ge, S. Kevin Zhou, Li Xiao, Knowledge Matters: Radiology Report Generation with General and Specific Knowledge. Medical Image Analysis,2022
If you have any problem with the code, please contact Li Xiao(andrew.lxiao@gmail.com) or Shuxin Yang(aspenstarss@gmail.com).