Git Product home page Git Product logo

radfm's Introduction

RadFM

The official code for the paper "Towards Generalist Foundation Model for Radiology by Leveraging Web-scale 2D&3D Medical Data"

ArXiv

Website

Model checkpoint

In this project, we collect a large-scale medical multi-modal dataset, MedMD, with 16M 2D or 3D images. We train a new medical multi-modal generative model RadFM on it, enabling both 2D and 3D scans, multi-image input and visual-language interleaving cases.

Quick Start:

For quick start, you can check the Quick_demo path.
We demonstrate a simple diagnosis case here to show how to inference with our model.
Feel free to modify it as you want.

  • S1. Download Model checkpoint or form baiduyun (No need for decompressing).

  • S2. Decompress the original zip file, you can get a pytorch_model.bin.

  • S3. put pytorch_model.bin under path Quick_demo/.

  • S4. python test.py and you can get a conversation as:

    Input: Can you identify any visible signs of Cardiomegaly in the image?
    Output: yes

By the way, never try to perform this in cpu and gpu is all you need :๏ผ‰.

Pre-train:

For re-training a model on our dataset or large-scale testing our pre-train model, you can check src.

Simply, train.py for training and test.py for testing.

  • Check the data_csv to get how different datasets are processed and download them into src/Dataset/data_csv
  • Modify the path as you disire, and check src/train.py to pre-train or src/train.py to test.

Case Study:

Some cases produced by our final model:

Dataset Links:

MedKD Dataset downloading URL:

Dataset Name Link Access
Rad3D-series - Restricted Access
MPx-series - Restricted Access
PMC-Inline https://huggingface.co/datasets/chaoyi-wu/PMC-Inline Open Access
PMC-CaseReport Original version, Filtered version Open Access
VinDr-Mammo https://www.physionet.org/content/vindr-mammo/1.0.0/ Credentialed Access
VinDr-SpineXR https://www.physionet.org/content/vindr-spinexr/1.0.0/ Credentialed Access
VinDr-PCXR https://physionet.org/content/vindr-pcxr/1.0.0/ Credentialed Access
PMC-OA https://huggingface.co/datasets/axiong/pmc_oa_beta Open Access
PMC-VQA https://huggingface.co/datasets/xmcmic/PMC-VQA Open Access
VQA-RAD https://osf.io/89kps/ Open Access
SLAKE https://www.med-vqa.com/slake/ Open Access
MIMIC-CXR https://physionet.org/content/mimic-cxr/2.0.0 Credentialed Access
VinDr-CXR https://physionet.org/content/vindr-cxr/1.0.0/ Credentialed Access
NIH ChestXray14 https://nihcc.app.box.com/v/ChestXray-NIHCC/folder/36938765345 Open Access
CheXpert https://aimi.stanford.edu/chexpert-chest-x-rays Open Access
Covid-CXR2 https://www.kaggle.com/datasets/andyczhao/covidx-cxr2 Open Access
NLM-TB Montgomery, ChinaSet Open Access
Object-CXR https://web.archive.org/web/20201127235812/https://jfhealthcare.github.io/object-CXR/ Open Access
OpenI https://www.kaggle.com/datasets/raddar/chest-xrays-indiana-university Open Access
RSNA https://www.rsna.org/education/ai-resources-and-training/ai-image-challenge/rsna-pneumonia-detection-challenge-2018 Open Access
SIIM-ACR https://www.kaggle.com/datasets/jesperdramsch/siim-acr-pneumothorax-segmentation-data Open Access

To-do List:

  • Polish the code in src for eaiser reading.
  • upload huggingface version.

Acknowledgment:

We sincerely thank all the contributors who uploaded the relevant data in our dataset online. We appreciate their willingness to make these valuable cases publicly available.

Contact

If you have any questions, please feel free to contact [email protected].

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.