PyTorch Implementation of Clinically Accurate Chest X-Ray Report Generation Paper
Implementation based on the following repos:
- https://github.com/fawazsammani/knowing-when-to-look-adaptive-attention
- https://github.com/ZexinYan/Medical-Report-Generation
- https://github.com/ZexinYan/im2p-pytorch
-
Install dependencies using conda environment file env.yml
-
Download images and reports from https://openi.nlm.nih.gov/faq
-
Edit in preprocessing.py the following line to point to your data:
ImagesReports('./data/nlm/images', './data/nlm/reports', device=device, transform=preprocess)
- Train: python training.py
- Add pretrained embedder to word decoder (*pretrained on existing data)
- Add loss functions
- word encoder should output a vector representing hot encoding of word
- refactor decoder into sentenceRNN and wordRNN
- clean up code names
- create clean env
- no teacher forcing implementation wordRNN
- add validation section
- add testing section
- reinforcement learning section
- change to receive arguments from commandline
- in training, should loss function look at embedding instead of hot encoding for error?
This repo would not have been possible without the help and support of Alex Dela Cruz