• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BCI: Breast Cancer Immunohistochemical Image Generation through Pyramid Pix2pix

BCI: Breast Cancer Immunohistochemical Image Generation through Pyramid Pix2pix visitors

Project | Arxiv | PWC PWC | Tweet

News

  • ⚑(2022-10-20): We have released the trained model on BCI and LLVIP datasets.
  • ⚑(2022-6-29): We host a competition for breast cancer immunohistochemistry image generation on Grand Challenge!
  • ⚑(2022-4-26): We have released BCI dataset and the code of PyramidPix2pix. You can download BCI dataset from the homepage.

datasetview_github


Framework

framework

Setup

1)Envs

  • Linux
  • Python>=3.6
  • CPU or NVIDIA GPU + CUDA CuDNN

Install python packages

git clone https://github.com/bupt-ai-cz/BCI
cd PyramidPix2pix
pip install -r requirements.txt

2)Prepare dataset

  • Download BCI dataset from our homepage.

  • Combine HE and IHC images.

    Project pix2pix provides a python script to generate pix2pix training data in the form of pairs of images {A,B}, where A and B are two different depictions of the same underlying scene, these can be pairs {HE, IHC}. Then we can learn to translate A(HE images) to B(IHC images).

    Create folder /path/to/data with subfolders A and B. A and B should each have their own subfolders train, val, test, etc. In /path/to/data/A/train, put training images in style A. In /path/to/data/B/train, put the corresponding images in style B. Repeat same for other data splits (val, test, etc).

    Corresponding images in a pair {A,B} must be the same size and have the same filename, e.g., /path/to/data/A/train/1.jpg is considered to correspond to /path/to/data/B/train/1.jpg.

    Once the data is formatted this way, call:

    python datasets/combine_A_and_B.py --fold_A /path/to/data/A --fold_B /path/to/data/B --fold_AB /path/to/data
    

    This will combine each pair of images (A,B) into a single image file, ready for training.

  • File structure

    PyramidPix2pix
      β”œβ”€β”€datasets
           β”œβ”€β”€ BCI
                 β”œβ”€β”€train
                 |    β”œβ”€β”€ 00000_train_1+.png
                 |    β”œβ”€β”€ 00001_train_3+.png
                 |    └── ...
                 └──test
                      β”œβ”€β”€ 00000_test_1+.png
                      β”œβ”€β”€ 00001_test_2+.png
                      └── ...
    
    

Train

Train at full resolution(1024*1024):

python train.py --dataroot ./datasets/BCI --gpu_ids 0 --pattern L1_L2_L3_L4

By default, four scales of the pyramid are used for supervision. You can change the option --pattern to use less scales (e.g. --pattern L1_L2_L3).

Train at resolution 512*512 (less GPU memory required):

python train.py --dataroot ./datasets/BCI --preprocess crop --crop_size 512 --gpu_ids 0 --pattern L1_L2_L3_L4

Images are randomly cropped if trained at low resolution.

Test

Test at full resolution(1024*1024):

python test.py --dataroot ./datasets/BCI --gpu_ids 0

Test at resolution 512*512:

python test.py --dataroot ./datasets/BCI --preprocess crop --crop_size 512 --gpu_ids 0

See PyramidPix2pix/options for more train and test options.

Evaluate

Calculate average PSNR and SSIM.

python evaluate.py --result_path ./results/pyramidpix2pix

Trained models

dataset device backbone PSNR SSIM model
BCI Tesla V100-32GB resnet_9 21.16 0.477 download
LLVIP Tesla V100-32GB resnet_9 12.189 0.279 download

Results

visualization

results2 results3
results4 results5

Citation

@InProceedings{Liu_2022_CVPR,
    author    = {Liu, Shengjie and Zhu, Chuang and Xu, Feng and Jia, Xinyu and Shi, Zhongyue and Jin, Mulan},
    title     = {BCI: Breast Cancer Immunohistochemical Image Generation Through Pyramid Pix2pix},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2022},
    pages     = {1815-1824}
}

Contact

Shengjie Liu ([email protected])

Chuang Zhu ([email protected])

If you have any questions, you can contact us directly.

More Repositories

1

LLVIP

LLVIP: A Visible-infrared Paired Dataset for Low-light Vision
Jupyter Notebook
618
star
2

Meta-SelfLearning

Meta Self-learning for Multi-Source Domain Adaptation: A Benchmark
Python
198
star
3

HHCL-ReID

Hard-sample Guided Hybrid Contrast Learning for Unsupervised Person Re-Identification
Python
133
star
4

CAC-UNet-DigestPath2019

1st to MICCAI DigestPath2019 challenge (https://digestpath2019.grand-challenge.org/Home/) on colonoscopy tissue segmentation and classification task. (MICCAI 2019) https://teacher.bupt.edu.cn/zhuchuang/en/index.htm
Python
94
star
5

IAST-ECCV2020

IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020) https://teacher.bupt.edu.cn/zhuchuang/en/index.htm
Python
84
star
6

BALNMP

Predicting Axillary Lymph Node Metastasis in Early Breast Cancer Using Deep Learning on Primary Tumor Biopsy Slides, BCNB Dataset
Python
53
star
7

PGDF

Sample Prior Guided Robust Model Learning to Suppress Noisy Labels
Python
31
star
8

HSA-NRL

Hard Sample Aware Noise Robust Learning forHistopathology Image Classification
Python
29
star
9

HIAST

This is the official implementation of "Hard-aware Instance Adaptive Self-training for Unsupervised Cross-domain Semantic Segmentation".
Python
10
star
10

Thyroid-Cytopathological-Diagnosis-with-AMIL_MSFF

Attention Based Multi-Instance Thyroid Cytopathological Diagnosis with Multi-Scale Feature Fusion
Python
9
star
11

TCVC

Code of paper "Temporal Consistent Automatic Video Colorization via Semantic Correspondence"
Python
8
star
12

Glomeruli-Instance-Segmentation

Python
7
star
13

bupt-ai-cz

The introduction and news of CVSM Group.
7
star
14

Label-Noise-Robust-Training

Noise Robust Learning with Hard Example Aware for Pathological Image classification
Python
6
star
15

Thyroid-Nodule-Ultrasound-Image-Classification

Thyroid Nodule Ultrasound Image Classification Through Hybrid Feature Cropping Network
6
star
16

MPFN

Ischemic Stroke Lesion Segmentation Using Multi-Plane Information Fusion
5
star
17

ProML

code for "Semi-supervised Domain Adaptation via Prototype-based Multi-level Learning"
Python
5
star
18

ANRN

Python
5
star
19

IAST-CAC-UNet-LLCNN-BreastCancerCNN-ImageRetrieval_DF_CDVS-Highly_Efficient_Follicular_Segmentation

Codes and Data for CVSM Group: 1. IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020); 2.
4
star
20

WUDA

WUDA
2
star
21

TCNL

Python
1
star
22

SMAF

code for paper β€œA SELF-TRAINING FRAMEWORK BASED ON MULTI-SCALE ATTENTION FUSION FOR WEAKLY SUPERVISED SEMANTIC SEGMENTATION”
1
star