Git Product home page Git Product logo

midl2021-vindr-ribcxr's Introduction

VinDr-RibCXR: A Benchmark Dataset for Automatic Segmentation and Labeling of Individual Ribs on Chest X-rays

This repository contains the training code for our paper entitled "VinDr-RibCXR: A Benchmark Dataset for Automatic Segmentation and Labeling of Individual Ribs on Chest X-rays", which was submitted and under review by Medical Imaging with Deep Learning 2021 (MIDL2021)

Abstract:

We introduce a new benchmark dataset, namely VinDr-RibCXR, for automatic segmentation and labeling of individual ribs from chest X-ray (CXR) scans. The VinDr-RibCXR contains 245 CXRs with corresponding ground truth annotations provided by human experts. A set of state-of-the-art segmentation models are trained on 196 images from the VinDr-RibCXR to segment and label 20 individual ribs. Our best performing model obtains a Dice score of 0.834 (95% CI, 0.810{0.853) on an independent test set of 49 images. Our study, therefore, serves as a proof of concept and baseline performance for future research.
Keywords: Rib segmentation, CXR, Benchmark dataset, Deep learning.

Data:

  • The dataset contains 245 images and split into 196 training images and 49 validation images. To download the VinDr-RibCXR dataset, please sign our Data Use Agreement (DUA) and send the signed DUA to Ha Nguyen ([email protected]) for obtaining the downloadable link.
  • To record the label, we use json file, the json file have this format:
{
    "img": {
        "0": "data/train/img/VinDr_RibCXR_train_000.png",
        ....
    }
    "R1": {
        "0":[
            {
                "x": 1027.8114701859,
                "y": 470.688105676
            },
            ....
        ]
    }
    ....
}        

Setting:

We use Pytorch 1.7.1 for this project

Model:

In this work, we train 4 baselines model, that is vanila U-net and U-net, FPN and U-net plus plus with imagenet pretrained encoder efficientet B0 from (https://github.com/qubvel/segmentation_models.pytorch)

Train model by your self:

  • We provide 4 configs file conresponding to 4 setting in our model, you can also write your config for your self
  • You need to put the data like this:
data
├── train
|   ├──img/
|   └──Vindr_RibCXR_train_mask.json
└── val
    ├──img/
    └──Vindr_RibCXR_val_mask.json
  • For training use this command:
python main.py --config/cvcore/multi_unet_b0_diceloss.yaml

Result:

Model Dice 95% HD Sensitivity Specificity
U-Net .765 (.737-.788) 28.038 (22.449-34.604) .773 (.738-.791) .996 (.996-.997)
U-Net w. EfficientNet-B0 .829 (.808-.847) 16.807 (14.372-19.539) .844 (.818-.858) .998 (.997-.998)
FPN w. EfficientNet-B0 .807 (.773-.824) 15.049 (13.190-16.953) .808 (.773-.828) .997 (.997-.998)
U-Net++ w. EfficientNet-B0 .834 (.810-.853) 15.453 (13.340-17.450) .841 (.812-.858) .998 (.997-.998)

Acknowledgements:

This research was supported by the Vingroup Big Data Institute. We are especially thankful to Tien D. Phan, Dung T. Le, and Chau T.B. Pham for their help during the data annotation process

midl2021-vindr-ribcxr's People

Contributors

levi3001 avatar huyhieupham avatar

Stargazers

elsayed mohamed avatar Yang Yue (乐阳) avatar Hong Nguyen avatar  avatar Zanoni avatar Jianwei Zhao avatar  avatar  avatar  avatar Hyunwoo Cho avatar kaijieshi avatar Arthur Lebron avatar  avatar Young-Joo Han avatar Thanh-Tung Le avatar Đinh Xuân Vũ avatar Ellery Queen avatar

Watchers

Dam Tien Long avatar James Cloos avatar Nghia avatar  avatar

midl2021-vindr-ribcxr's Issues

Bugs

Why don't check your code carefully, there so many bugs............

how to test the model (this is not actually an issue)

I have run the code after making some minor modification.
The code finished all 200 epochs.
The final line of the log file is like this:
Validation dice: 0.781957, val loss:0.963734 best: 0.829610

My problem is how to proceed with a test on an image that the model has not seen?

After running the code I see a folder with weights and inside a file named multi_unet_b0_DiceLoss.yaml.pth
In the outputs folder I do not see anything. Is this normal?

If you have any Jupiter notebook I can use to visualise a testing Xray that will be great!

issue in valid_tool.py

Hello, guys,

[My setting]
os : Ubuntu 22.04.1 LTS 
[anaconda virtual environment]
pytorch ==1.12.1 + cu113
python == 3.8.0
cudatoolkit == 11.3.1
cudnn == 8.4.1.50
monai == 1.0.0

While using the self-training code, i found some error in MIDL2021-VinDr-RibCXR/cvcore/tools/valid_tool.py ,

error message occurs

python main.py --config ./cvcore/config/multi_unet_b0_diceloss,yaml

error message 
Traceback (most recent call last):
  File "main.py", line 115, in <module>
    main(args, cfg)
  File "main.py", line 88, in main
    _, best_metric = valid_model(logger.info, cfg, model,
  File "/data4/workspaces/HGKang/JVX/MIDL2021-VinDr-RibCXR/cvcore/tools/valid_tool.py", line 32, in valid_model
    final_score = metric_function(preds, labels.long())[0].item()
ValueError: only one element tensors can be converted to Python scalars

Dataset

I have signed your DUA and send it to you, please reply my email.

Pretrained Model

Hi,
Thanks a lot for your great work.

May I request access to the pretrained model weights?

Result is not re-producible

Hi,
Thank you for sharing such an amazing dataset.
I have tried to reproduce the result by using the exact code provided in this repo. But the result I re-produced has quite a big gap between the number reported in the MIDL paper. The configuration file I used is: "cvcore/config/multi_unet_b0_diceloss.yaml". And the best Dice I got is 64.7%. I attached the log file below.

Any hint for solving this issue is applicated.

Thank you
multi_unet_b0_DiceLoss.yaml.txt

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.