Weakly-Supervised Cross-Domain Segmentation of Electron Microscopy with Sparse Point Annotation
for Adapting Semantic Segmentation
This repository contains the official implementation of our paper:
Weakly-Supervised Cross-Domain Segmentation of Electron Microscopy with Sparse Point Annotation,
In: IEEE TRANSACTIONS ON BIG DATA,2024
[arXiv]
Requirements. To reproduce our results, we recommend Python >=3.6, PyTorch >=1.4, CUDA >=10.0. At least one GPU with a minimum of 11GB memory is required for training.
- Create conda environment:
conda create --name wda-net
source activate wda-net
- Install PyTorch >=1.4 (see PyTorch instructions). For example,
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
- Install the dependencies:
pip install -r requirements.txt
./data/50%vncdata -> <symlink to VNC>
./data/50%vncdata/train/img
./data/50%vncdata/train/lab
./data/cvlabdata -> <symlink to EPFL>
./data/cvlabdata/train/img
./data/cvlabdata/train/lab
./data/cvlabdata/train/15%_split1
./data/cvlabdata/test/img
./data/cvlabdata/test/lab
Tip: We provide labels with 15% center points in target domain. You can download the data: 15%_split1
0.Run the count model (Source domain: VNC)
python 00_count_main.py
If you would like to skip this step, you can use our pre-trained models:
vnc_count.pth,
Tip: You can download the file and create symlinks in the ./pretrain_model
folder, as follows: ./pretrain_model/vnc_count.pth
:
1.Run the pretrained model (Source domain: VNC)
python 00_Full-Supervised.py
If you would like to skip this step, you can use our pre-trained models:
vnc_full_supervised.pth,
Tip: You can download the file , as follows: ./pretrain_model/vnc_full_supervised.pth
:
2.Run the detection model (Target domain: EPFL)
python 01_stage1_vnc.py
3.Run the segmentation model (Target domain: EPFL)
python 02_stage2_vnc.py
Run single-scale inference from your model
python evalue_segmentation.py
You can use our pre-trained model: inference.pth
We hope you find our work useful. If you would like to acknowledge it in your project, please use the following citation:
@article{qiu2024weakly,
title={Weakly-Supervised Cross-Domain Segmentation of Electron Microscopy with Sparse Point Annotation},
author={Qiu, Dafei and Xiong, Shan and Yi, Jiajin and Peng, Jialin},
journal={IEEE Transactions on Big Data},
year={2024},
publisher={IEEE}
}