Coder Social home page Coder Social logo

zhangxx54 / ddtnet Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 3.0 14.84 MB

MIA-DDTNet: A Dense Dual-Task Network for Tumor-infiltrating Lymphocyte Detection and Segmentation in Histopathological Images of Breast Cancer

Home Page: https://www.sciencedirect.com/science/article/pii/S1361841522000676

License: Other

MATLAB 4.32% Dockerfile 0.43% Python 76.25% C 1.33% C++ 2.34% Cuda 15.33%
deep-learning detection histopathological-image lymphocyte segmentation

ddtnet's Introduction

DDTNet: A Dense Dual-Task Network for Tumor-infiltrating Lymphocyte Detection and Segmentation in Histopathological Images of Breast Cancer

This project hosts the code for implementing simultaneous Lymphocyte Detection and Segmentation: Paper

Xiaoxuan Zhang, Xiongfeng Zhu, Kai Tang, Yinghua Zhao, Zixiao Lu, Qianjin Feng,
DDTNet: A dense dual-task network for tumor-infiltrating lymphocyte detection and segmentation in histopathological images of breast cancer,
Medical Image Analysis, Volume 78, 2022,

Fig

Implementation based on FCOS.

Installation

This DDTNet implementation is based on FCOS and maskrcnn-benchmark. Therefore the installation is the same as original FCOS and maskrcnn-benchmark.

Please check INSTALL.md for installation instructions. You may also want to see the original README.md of FCOS and README.md of maskrcnn-benchmark.

Dataset

  • Download BCa-lym dataset (H&E images and original manually annotated dots) from www.andrewjanowczyk.com/use-case-4-lymphocyte-detection/

  • Download Post-NAT-BRCA dataset (H&E images and original manually annotated dots) from here

  • If you want to use your own dataset, the data should be prepared in the format:

project
│   README.md  
└───datasets
    └───lym
        ├──Images
        │  ├──001.png
        │  ├──002.png
        │  └...
        ├──ImageSets
        │  ├──Dataset Name1
        │  │  ├──train1.txt
        │  │  ├──test1.txt
        │  │  ├──train2.txt
        │  │  ├──test2.txt
        │  │  └...
        │  ├──Dataset Name2
        │  │  └...
        │  └...
        └──Masks
           ├──mask_001.png
           ├──edgemask_001.png
           ├──Dis_001.png       
           ├──mask_002.png
           ├──edgemask_002.png
           ├──Dis_002.png
           └...

Note:

  1. Images should be H&E images (RGB images). If it is not *.png, modify lym.py.
  2. *.txt should include the names of all data in the training set or test set, for example, '001', '002', '003'...
  3. mask*.png, edgemask*.png and Dis*.png are mask map, contour map and distance map corresponding to input image, respectively.

Training

The following command line will train ddtnet_R_101_FPN_1x on 1 GPUs with Synchronous Stochastic Gradient Descent (SGD):

python -m torch.distributed.launch \
    --nproc_per_node=1 \
    --master_port=$((RANDOM + 10000)) \
    tools/train_net.py \
    --config-file configs/ddtnet/ddtnet_R_101_FPN_1x.yaml \
    DATALOADER.NUM_WORKERS 2 \

Inference

The inference command line:

python tools/eval_net.py \
    --config-file configs/ddtnet/ddtnet_R_101_FPN_1x.yaml \
    MODEL.WEIGHT model_final.pth \
    TEST.IMS_PER_BATCH 4    

The Inference results include a list of bounding box coordinates, a mask map and a contour map for each input image. Use Alignment.m to unify the detection and segmentation results.

Acknowledgments

We would like to thank FCOS for overall framework.

ddtnet's People

Contributors

zhangxx54 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ddtnet's Issues

access to BCa-lym dataset

Thanks for sharing the dataset and code. But the link for downloading BCa-lym dataset is seems to be unusable.

Download BCa-lym dataset (H&E images and original manually annotated dots) from [here](https://www.andrewjanowczyk.com/use-case-4-lymphocyte-detection/)

The TILAnno is missing a complete method for creating a dataset.

The TILAnno mentioned in the article cannot fully generate the required dataset, lacks the contour and centrality graphs, and the mask graph is not in the training required format, which made us confused. We have to manually generate mask, boundaries, and centrality maps ourselves, but based on our modified BCa-lym dataset, the loss always drops to nan during training, making it difficult to successfully replicate the results of the paper. May I ask if it is possible to provide a complete TILAnno method or help point out our errors? The following figure shows an example of the dataset we generated.
Dis_im1
edgemask_im1
mask_im1
im1

关于对比实验

分割网络的检测性能评估代码可以公布吗?谢谢作者

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.