GithubHelp home page GithubHelp logo

zhjohnchan / r2gen Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 22.0 70.18 MB

[EMNLP-2020] The official implementation of Generating Radiology Reports via Memory-driven Transformer.

Python 98.94% Shell 1.06%

r2gen's Introduction

Hi there. I'm Zhihong 👋

r2gen's People

Contributors

zhjohnchan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

r2gen's Issues

Annotation of Mimic-cxr

Could you please provide the annotation of mimic_cxr? Without this annotation, I cannot directly use your checkpoint for testing.
Looking forward to your reply.

The number of images and reports are not correct

Hi, thank you for the paper.

However, when I download the IU X-Ray dataset you provided, the number of images is not correct as you reported in the paper.
In detail, there are only 6091 images, and 2069, 296, 590 reports for training, validation and testing sets, respectively.

Can you check again?

Thank you very much.

about MIMIC dataset

Is it possible that the MIMIC data downloaded from this page contains MiMIC images processed differently from the MiMIC images available on the physionet site? Or is it just the MIMIC annotation files?

Couldn't visualize the captions generated on IU_Xray dataset by revised the plot_mimic_cxr.sh.

Hi, good work and thank you!

I followed the bash plot_mimic_cxr.sh step you have mentioned. I want to visualize the captions generated on IU_Xray dataset by using model_iu_xray.pth, since i am not yet able to download the MIMIC_CXR dataset.

But it has the following errors:

RuntimeError: Error(s) in loading state_dict for R2GenModel:
size mismatch for encoder_decoder.model.tgt_embed.0.lut.weight: copying a param with shape torch.Size([761, 512]) from checkpoint, the shape in current model is torch.Size([400, 512]).
size mismatch for encoder_decoder.logit.weight: copying a param with shape torch.Size([761, 512]) from checkpoint, the shape in current model is torch.Size([400, 512]).
size mismatch for encoder_decoder.logit.bias: copying a param with shape torch.Size([761]) from checkpoint, the shape in current model is torch.Size([400]).

Kindly any guidance, thanks!

Impression or Finding section

Hi, thanks for your work and for publishing your code!
One question, for the MIMIC-CXR dataset, do you predict the impression section, the finding section or concatenate both?
Thanks a lot in advance,
Chantal

Visualization of Captions

Hey, I followed the steps you have mentioned but I couldn't visualize the captions generated. I took IU_Xray dataset. Kindly guide me. Thank you.

Clinical efficacy score

Hi,

I used your trained mimic-cxr weight to infer the test set. I get almost the same result as the NLP score. But, I also followed your instructions to use Chexpert and Chexbert to label the report and calculate the CE score using your script. I tried the two label methods you gave me but I can't reproduce your result.

Here is my result.
{'F1_MACRO': 0.21054676943711254,
'F1_MICRO': 0.37574679039023773,
'RECALL_MACRO': 0.3051327263640022,
'RECALL_MICRO': 0.4828487422410977,
'PRECISION_MACRO': 0.19370866272550938,
'PRECISION_MICRO': 0.3075322513524761}

Running the checkpoint for 'mimic_cxr' results in error

When running the checkpoint, an error occurs. Why is it that running the checkpoint for 'iu_xray' works fine, but running the checkpoint for 'mimic_cxr' results in the following error?

RuntimeError: Error(s) in loading state_dict for R2GenModel:
size mismatch for encoder_decoder.model.tgt_embed.0.lut.weight: copying a param with shape torch.Size([4336, 512]) from checkpoint, the shape in current model is torch.Size([3595, 512]).
size mismatch for encoder_decoder.logit.weight: copying a param with shape torch.Size([4336, 512]) from checkpoint, the shape in current model is torch.Size([3595, 512]).
size mismatch for encoder_decoder.logit.bias: copying a param with shape torch.Size([4336]) from checkpoint, the shape in current model is torch.Size([3595]).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.