⛑SSM-Net: Semi-supervised multi-task network for a joint lesion segmentation and classification from pancreatic EUS images
SSM-Net aims to address joint segmentation and classification for the diagnosis of pancreas diseases. Specifically, for unlabeled EUS images, we establish an SRM to learn semantic saliency information for augmenting unlabeled images. By doing so, we can learn feature representation on unlabeled data for pre-training an encoder network to benefit the subsequent lesion segmentation and classification on labeled data. Then, we devise a series of modules, including an MGAM, a CAB and a FSL to boost joint lesion segmentation and classification.
- Requirements
- Environment Setup
- Linux System
- Dataset Preparation
- Model Training and Evaluation
This software is compatible with a Linux operating system, specifically Ubuntu 20.04 (compatibility with other versions has not been tested), and requires Python 3.7. It necessitates 64GB of RAM and 1TB of disk storage. Performance benchmarks are based on an Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz and an NVIDIA GeForce GTX 3090 Ti GPU.
The following Python packages are required, which are also listed in requirements.txt
:
numpy==1.19.2
torch==1.13.1+cu117
torchvision==0.14.1+cu117
Pillow==9.2.0
- Open the terminal, or press Ctrl+Alt+F1 to access the command line interface.
- Clone this repository to your home directory.
git clone https://github.com/Torchlight-ljj/SSM-Net
- Navigate to the cloned repository's directory.
cd SSM-Net
- Install the required Python packages.
python3 -m pip install --user -r requirements.txt
Supported Image File Formats JPEG and PNG file formats are supported and have been tested.
- Place the images in
./moco_arch/data/train/0
. - Run the script
main.py
to start training. - Note: Ensure the parameters are set correctly before running the script.
- Navigate to the
./Sup_Multi_arch
directory. - Organize the original images in
./Sup_Multi_arch/data/ori/...
according to their class labels. - Place the corresponding masks in
./Sup_Multi_arch/data/mask/...
according to their class labels. - Create
train.txt
andval.txt
files for training and validation data. - Run the script
train.py
to initiate the training process.
- The
CAM.py
script generates the Class Activation Map (CAM) for the model's classification branch.