pymic.net_run.weak_sup package

Submodules

pymic.net_run.weak_sup.wsl_abstract module

class pymic.net_run.weak_sup.wsl_abstract.WSLSegAgent(config, stage='train')

Bases: SegmentationAgent

Abstract agent for weakly supervised segmentation.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

write_scalars(train_scalars, valid_scalars, lr_value, glob_it)

Write scalars using SummaryWriter.

Parameters:
  • train_scalars – (dictionary) Scalars for training set.

  • valid_scalars – (dictionary) Scalars for validation set.

  • lr_value – (float) Current learning rate.

  • glob_it – (int) Current iteration number.

pymic.net_run.weak_sup.wsl_dmpls module

class pymic.net_run.weak_sup.wsl_dmpls.WSLDMPLS(config, stage='train')

Bases: WSLSegAgent

Weakly supervised segmentation based on Dynamically Mixed Pseudo Labels Supervision.

  • Reference: Xiangde Luo, Minhao Hu, Wenjun Liao, Shuwei Zhai, Tao Song, Guotai Wang, Shaoting Zhang. ScribblScribble-Supervised Medical Image Segmentation via Dual-Branch Network and Dynamically Mixed Pseudo Labels Supervision. MICCAI 2022.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

training()

Train the network

pymic.net_run.weak_sup.wsl_em module

class pymic.net_run.weak_sup.wsl_em.WSLEntropyMinimization(config, stage='train')

Bases: WSLSegAgent

Weakly supervised segmentation based on Entropy Minimization.

  • Reference: Yves Grandvalet and Yoshua Bengio: Semi-supervised Learningby Entropy Minimization. NeurIPS, 2005.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

training()

Train the network

pymic.net_run.weak_sup.wsl_gatedcrf module

class pymic.net_run.weak_sup.wsl_gatedcrf.WSLGatedCRF(config, stage='train')

Bases: WSLSegAgent

Implementation of the Gated CRF loss for weakly supervised segmentation.

  • Reference: Anton Obukhov, Stamatios Georgoulis, Dengxin Dai, Luc Van Gool: Gated CRF Loss for Weakly Supervised Semantic Image Segmentation. CoRR, abs/1906.04651, 2019.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

training()

Train the network

pymic.net_run.weak_sup.wsl_mumford_shah module

class pymic.net_run.weak_sup.wsl_mumford_shah.WSLMumfordShah(config, stage='train')

Bases: WSLSegAgent

Weakly supervised learning with Mumford Shah Loss.

  • Reference: Boah Kim and Jong Chul Ye: Mumford–Shah Loss Functional for Image Segmentation With Deep Learning. IEEE TIP, 2019.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

training()

Train the network

pymic.net_run.weak_sup.wsl_tv module

class pymic.net_run.weak_sup.wsl_tv.WSLTotalVariation(config, stage='train')

Bases: WSLSegAgent

Weakly suepervised segmentation with Total Variation regularization.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

training()

Train the network

pymic.net_run.weak_sup.wsl_ustm module

class pymic.net_run.weak_sup.wsl_ustm.WSLUSTM(config, stage='train')

Bases: WSLSegAgent

USTM for scribble-supervised segmentation.

  • Reference: Xiaoming Liu, Quan Yuan, Yaozong Gao, Helei He, Shuo Wang, Xiao Tang, Jinshan Tang, Dinggang Shen: Weakly Supervised Segmentation of COVID19 Infection with Scribble Annotation on CT Images. Patter Recognition, 2022.

Parameters:
  • config – (dict) A dictionary containing the configuration.

  • stage – (str) One of the stage in train (default), inference or test.

Note

In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section weakly_supervised_learning is needed. See Weakly-Supervised Learning for details.

create_network()

Create network based on configuration.

training()

Train the network

Module contents