Giter Site home page Giter Site logo

wjhou / organ Goto Github PK

View Code? Open in Web Editor NEW
38.0 1.0 0.0 81.36 MB

Code for the paper "ORGAN: Observation-Guided Radiology Report Generation via Tree Reasoning" (ACL'23).

Home Page: https://wjhou.github.io/ORGan/

License: Apache License 2.0

Shell 1.97% Python 98.03%
radiology-report-generation medical-report-generation diagnosis

organ's Introduction

ORGAN: Observation-Guided Radiology Report Generation via Tree Reasoning

This repository is the implementation of ORGAN: Observation-Guided Radiology Report Generation via Tree Reasoning. Before running the code, please install the prerequisite libraries, and follow Step 0, Step 1, and Step 2 to replicate the experiments.

Update

Overview

This paper explores the task of radiology report generation, which aims at generating free-text descriptions for a set of radiographs. One significant challenge of this task is how to correctly maintain the consistency between the images and the lengthy report. Previous research explored solving this issue through planning-based methods, which generate reports only based on high-level plans. However, these plans usually only contain the major observations from the radiographs (e.g., lung opacity), lacking much necessary information, such as the observation characteristics and preliminary clinical diagnoses. To address this problem, the system should also take the image information into account together with the textual plan and perform stronger reasoning during the generation process. In this paper, we propose an Observation-guided radiology Report Generation framework (ORGan). It first produces an observation plan and then feeds both the plan and radiographs for report generation, where an observation graph and a tree reasoning mechanism are adopted to precisely enrich the plan information by capturing the multi-formats of each observation. Experimental results demonstrate that our framework outperforms previous state-of-the-art methods regarding text quality and clinical efficacy. Alt text

Requirements

  • torch==1.9.1
  • torchvision==0.10.1
  • transformers==4.15.0

Pretrained and Trained Model Weights

Pretrained model weight for the IU X-ray dataset: Google Drive

Trained model weights on the two datasets are available at:

Step 0: Data Preparation and Observation Plan/Graph Extraction

Please download the two datasets: IU X-ray and MIMIC-CXR. For observation preprocessing, we use CheXbert to extract relevant observation information. Please follow the instruction to extract the observation tags.

Step 0.1 Observation Graph Extraction

chmod +x ./src/graph_construction/run_iu_xray.sh
./src/graph_construction/run_iu_xray.sh

Step 0.2 Observation Plan Extraction

cd ORGan
python ./src/plan_extraction.py

Step 1: Observation Planning

There are two parameters required to run the code of the planner:

  • debug: whether debugging the code (0 for debugging and 1 for running)
  • checkpoint_name: indicating the location for the pre-trained visual model, mainly for IU X-ray dataset.
chmod +x ./script_plan/run_iu_xray.sh
./script_plan/run_iu_xray.sh debug checkpoint_name

Step 2: Observation-guided Report Generation

There are four parameters required to run the code of the generator:

  • debug: whether debugging the code (0 for debugging and 1 for running)
  • checkpoint_name: indicating the location for the pre-trained visual model, mainly for the IU-Xray dataset, same as the setting of the planner
  • plan_model_name_or_path: indicating the location of the trained planner (from Step 1)
  • plan_eval_file: indicating the file name of generated plans for the validation set (from Step 1)
chmod +x ./script/run_iu_xray.sh
./script/run_iu_xray.sh debug checkpoint_name plan_model_name_or_path plan_eval_file

Citation

If you use the ORGan, please cite our paper:

@inproceedings{hou-etal-2023-organ,
    title = "{ORGAN}: Observation-Guided Radiology Report Generation via Tree Reasoning",
    author = "Hou, Wenjun  and Xu, Kaishuai  and Cheng, Yi  and Li, Wenjie  and Liu, Jiang",
    booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.acl-long.451",
    doi = "10.18653/v1/2023.acl-long.451",
    pages = "8108--8122",
}

organ's People

Contributors

wjhou 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

Watchers

 avatar

organ's Issues

CE scores

Hi,

are the scores reported in this paper macro, micro or macro-based F1 scores?

Thanks a lot in advance!

AssertionError: Prediction Num != Reference Num

I tried to train mimic-cxr and iu_xray with my trained observation planning.
but when I end up training steps and start evaluate, the length of prediction and reference is different
In debug mode, length of prediction is 1, and length of reference is 16
How can I solve it?

What is the content of ./mention/?

During the code reproduction process, when executing python ./src/plan_extraction.py, a mention folder path will be needed. What is the content of this path? Looking forward to your reply.

How can I train this model from scratch?

How can I train this model from scratch without pretrained model?
I try to
./script/run_iu_xray.sh debug checkpoint_name plan_model_name_or_path plan_eval_file
without checkpoint_model but bleu-4 accuracy is not increase above 0.06

About ./data/mention/

When I reproduce the step 0.2, I don't know what to place in ./data/mention/. It's not in the Readme either. Therefore, could you tell what I should place in ./data/mention/? Thanks in advance.

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.