Git Product home page Git Product logo

fracsegnet's Introduction

What is FracSegNet?

Pelvic fracture is a severe type of high-energy injury. Segmentation of pelvic fractures from 3D CT images is important for trauma diagnosis, evaluation, and treatment planning. Manual delineation of the fracture surface can be done in a slice-by-slice fashion but is slow and error-prone. Automatic fracture segmentation is challenged by the complex structure of pelvic bones and the large variations in fracture types and shapes.

This study proposes a deep-learning method for automatic pelvic fracture segmentation. Our approach consists of two consecutive networks. The anatomical segmentation network extracts left and right ilia and sacrum from CT scans. Then, the fracture segmentation network further isolates the fragments in each masked bone region. Overview

1.Pelvic Fracture DataSets

We built a dataset containing 150 CT scans with fractured pelvis and manually annotated the fractures.

The first version of the pelvic fracture segmentation dataset has been updated. In this dataset, we provide detailed annotations of fracture segmentation for 100 patients. For each patient, we offer CT data (with the background masked out) for the left hipbone, right hipbone, and sacrum, along with their annotations.

Data Discription: DataSet for Pelvic Fracture Segmentation

Paper link: https://link.springer.com/chapter/10.1007/978-3-031-43996-4_30

TMI PENGWIN DataSet: TMI-PENGWIN DataSet

Note: We are using this dataset to host the Pelvic Bone Fragments with Injuries Segmentation (PENGWIN) Challenge in MICCAI 2024, and the remaining sets of validation and evaluation data will be released after the competition. Welcome to PENGWIN Challenge!

2. Usage

You can find the training and testing methods for FracSegNet at Training and inference. Additionally, we provide the latest training models for your convenience.

Citation

If you find our work is useful in your research, please consider citing:

@InProceedings{10.1007/978-3-031-43996-4_30,
author="Liu, Yanzhen and Yibulayimu, Sutuke and Sang, Yudi and Zhu, Gang and Wang, Yu and Zhao, Chunpeng and Wu, Xinbao",
title="Pelvic Fracture Segmentation Using a Multi-scale Distance-Weighted Neural Network",
booktitle="Medical Image Computing and Computer Assisted Intervention -- MICCAI 2023",
year="2023",
publisher="Springer Nature Switzerland",
address="Cham",
pages="312--321",
isbn="978-3-031-43996-4"
}

fracsegnet's People

Contributors

yzzliu avatar

Stargazers

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

Watchers

 avatar

fracsegnet's Issues

Timeline for Sharing Code and Pretrained Weights

I found your poster "Pelvic Fracture Segmentation Using a Multi-scale Distance-weighted Neural Network" at MICCAI23 where you reference this repository.

Unfortunately, it seems there is nothing (yet?) shared in this repo. Do you plan to update the code and can you give the community an idea of the timeline?

I'd like to highlight the importance to share these resources with the community to allow us to independently evaluate the results and use the model for future research - which ultimately will led to citations of your paper, a win-win situation ;)

What code to run before the Dataset Conversion Process(process of creation of nnUNet_raw, nnUNet_preprocessed, nnUNet_results)

So before training nnUNet, you first prepare the data using utils.py script inside (Training/fracSegNet/dataset_conversion) folder. But, as I know the dataset is in the format of 001.mha .....100.mha. How come you guys read "_RI_frac.nii.gz" , "_LI_frac.nii.gz" , "_SA_frac.nii.gz" nifti files. Can you provide information about which code you've ran to get nii.gz files from the .mha files?

Could you release your training code?

Hi, thanks for you nice work.
I want to ask can you share your code for training?
Because now you only release the testing code and the pre-trained model.
I cannot re-implement the training process by myself.

Thanks!

V2 support?

Hello, thank you for your efforts and great work. Do you plan to make a version to work with the nnunetV2? It would be great to be able to use apple MPS.

I am looking forward to using your program when it becomes available with the apple gpu!

Which version of vtkmodules.all and matplotlib has been used in the code?

Hello, when I try to run this code : nnUNet_plan_and_preprocess -t 600 --verify_dataset_integrity
It shows the error:
ModuleNotFoundError: No module named 'matplotlib'
ModuleNotFoundError: No module named 'vtkmodules'
Well I have installed the latest version of the modules...but
Can you please provide the requirements.txt file so that all the libraries will have correct version.

bug about function MultipleOutputLoss2

Hi, thanks to your great work.I'm having some issues running your code. Can you give me some help?@YzzLiu
in function get_tp_fp_fn_tn()
‘’‘
def get_tp_fp_fn_tn(net_output, gt, disMap = None, axes=None, mask=None, square=False ,current_epoch = None):
smooth_trans = True
Tauo_st = 0
st_epoch = 1000

if smooth_trans == False:
    if disMap != None:
        disMap = disMap / torch.mean(disMap)
        temp_disMap_value = disMap
if smooth_trans == True:
    if disMap != None:
        disMap = disMap / torch.mean(disMap)
        if current_epoch <Tauo_st:
            temp_disMap_value = torch.ones_like(disMap)
        elif Tauo_st <= current_epoch < Tauo_st + st_epoch :
            warm_start_matrix = torch.ones_like(disMap)
            warm_para = float(Tauo_st + st_epoch - current_epoch) / st_epoch
            temp_disMap_value = warm_para * warm_start_matrix + (1 - warm_para) * disMap
        elif current_epoch >= Tauo_st + st_epoch:
            temp_disMap_value = disMap

disMap = temp_disMap_value

if axes is None:
    axes = tuple(range(2, len(net_output.size())))

shp_x = net_output.shape
shp_y = gt.shape
shp_disMap = disMap.shape

with torch.no_grad():
    if len(shp_x) != len(shp_y):
        gt = gt.view((shp_y[0], 1, *shp_y[1:]))
        disMap = disMap.view((shp_disMap[0], 1, *shp_disMap[1:]))
    if all([i == j for i, j in zip(net_output.shape, gt.shape)]):
        # if this is the case then gt is probably already a one hot encoding
        y_onehot = gt
    else:
        gt = gt.long()
        y_onehot = torch.zeros(shp_x)
        if net_output.device.type == "cuda":
            y_onehot = y_onehot.cuda(net_output.device.index)
        y_onehot.scatter_(1, gt, 1)
disMap2onehot = disMap.repeat_interleave(shp_x[1],dim = 1)

disMap2onehot = disMap2onehot.cuda(net_output.device.index)

tp = net_output * y_onehot
fp = net_output * (1 - y_onehot)
fn = (1 - net_output) * y_onehot
tn = (1 - net_output) * (1 - y_onehot)

tp = torch.mul(tp, disMap2onehot)
fp = torch.mul(fp, disMap2onehot)
fn = torch.mul(fn, disMap2onehot)
tn = torch.mul(tn, disMap2onehot)

if mask is not None:
    tp = torch.stack(tuple(x_i * mask[:, 0] for x_i in torch.unbind(tp, dim=1)), dim=1)
    fp = torch.stack(tuple(x_i * mask[:, 0] for x_i in torch.unbind(fp, dim=1)), dim=1)
    fn = torch.stack(tuple(x_i * mask[:, 0] for x_i in torch.unbind(fn, dim=1)), dim=1)
    tn = torch.stack(tuple(x_i * mask[:, 0] for x_i in torch.unbind(tn, dim=1)), dim=1)

if square:
    tp = tp ** 2
    fp = fp ** 2
    fn = fn ** 2
    tn = tn ** 2

if len(axes) > 0:
    tp = sum_tensor(tp, axes, keepdim=False)
    fp = sum_tensor(fp, axes, keepdim=False)
    fn = sum_tensor(fn, axes, keepdim=False)
    tn = sum_tensor(tn, axes, keepdim=False)

return tp, fp, fn, tn

‘’‘
tp = torch.mul(tp, disMap2onehot) there is a bug:The size of tensor a (128) must match the size of tensor b (218) at non-singleton dimension 4.
i add ' disMap2onehot = torch.nn.functional.interpolate(disMap2onehot, size=tp.shape[2:])'
I don't know if it's the right thing to do.

.

.

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.