Pytorch Implementation of LNSNet for Superpixel Segmentation

Related tags

Deep Learning LNSNet
Overview

LNSNet

Overview

Official implementation of Learning the Superpixel in a Non-iterative and Lifelong Manner (CVPR'21)

Learning Strategy

The proposed LNSNet views superpixel segmentation process of each image as an independent pixel-level clustering task and use lifelong learning strategy to train the superpixel segmentation network for a a series of images.

Model Structure

The structure of proposed LNS-Net shown in Fig. 3 contains three parts:

  1. Feature Embedder Module (FEM) that embeds the original feature into a cluster-friendly space;
  2. Non-iteratively Clustering Module (NCM) that assigns the label for pixels with the help of a seed estimation module, which automatically estimates the indexes of seed nodes;
  3. Gradient Rescaling Module (GRM) that adaptively rescales the gradient for each weight parameter based on the channel and spatial context to avoid catastrophic forgetting for the sequential learning.

Getting Started

Here we only release the model trained on BSDS dataset and corresponding code to utilizes it for superpixel segmentation. The whole training code will be coming soon.

To uese the given model for generate superpixel:

git clone https://github.com/zh460045050/LNSNet

cd LNSNet

sh runDemo.sh

or

python demo.py --n_spix $num_superpixel --img_path $input_img_path --check_path lnsnet_BSDS_checkpoint.pth

The performance and complexity of methods for generating 100 superpixel on BSDS test dataset with image size 481*321:

Citation

If you find our work useful in your research, please cite:

@InProceedings{Lei_2021_CVPR,
title = {Learning the Superpixel in a Non-iterative and Lifelong Manner},
author = {Zhu, Lei and She, Qi and Zhang, Bin and Lu, Yanye and Lu, Zhilin and Li, Duo and Hu, Jie},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2021}
}

You might also like...
Implementation of DropLoss for Long-Tail Instance Segmentation in Pytorch
Implementation of DropLoss for Long-Tail Instance Segmentation in Pytorch

[AAAI 2021]DropLoss for Long-Tail Instance Segmentation [AAAI 2021] DropLoss for Long-Tail Instance Segmentation Ting-I Hsieh*, Esther Robb*, Hwann-Tz

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.

Faster R-CNN and Mask R-CNN in PyTorch 1.0 maskrcnn-benchmark has been deprecated. Please see detectron2, which includes implementations for all model

HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation Official PyTorch Implementation
HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation Official PyTorch Implementation

: We present a novel, real-time, semantic segmentation network in which the encoder both encodes and generates the parameters (weights) of the decoder. Furthermore, to allow maximal adaptivity, the weights at each decoder block vary spatially. For this purpose, we design a new type of hypernetwork, composed of a nested U-Net for drawing higher level context features

PyTorch implementation of: Michieli U. and Zanuttigh P.,
PyTorch implementation of: Michieli U. and Zanuttigh P., "Continual Semantic Segmentation via Repulsion-Attraction of Sparse and Disentangled Latent Representations", CVPR 2021.

Continual Semantic Segmentation via Repulsion-Attraction of Sparse and Disentangled Latent Representations This is the official PyTorch implementation

This is the official Pytorch implementation of
This is the official Pytorch implementation of "Lung Segmentation from Chest X-rays using Variational Data Imputation", Raghavendra Selvan et al. 2020

README This is the official Pytorch implementation of "Lung Segmentation from Chest X-rays using Variational Data Imputation", Raghavendra Selvan et a

Implementation of Segformer, Attention + MLP neural network for segmentation, in Pytorch
Implementation of Segformer, Attention + MLP neural network for segmentation, in Pytorch

Segformer - Pytorch Implementation of Segformer, Attention + MLP neural network for segmentation, in Pytorch. Install $ pip install segformer-pytorch

This repo is a PyTorch implementation for Paper
This repo is a PyTorch implementation for Paper "Unsupervised Learning for Cuboid Shape Abstraction via Joint Segmentation from Point Clouds"

Unsupervised Learning for Cuboid Shape Abstraction via Joint Segmentation from Point Clouds This repository is a PyTorch implementation for paper: Uns

Official PyTorch implementation of UACANet: Uncertainty Aware Context Attention for Polyp Segmentation
Official PyTorch implementation of UACANet: Uncertainty Aware Context Attention for Polyp Segmentation

UACANet: Uncertainty Aware Context Attention for Polyp Segmentation Official pytorch implementation of UACANet: Uncertainty Aware Context Attention fo

U-Net implementation in PyTorch for FLAIR abnormality segmentation in brain MRI
U-Net implementation in PyTorch for FLAIR abnormality segmentation in brain MRI

U-Net for brain segmentation U-Net implementation in PyTorch for FLAIR abnormality segmentation in brain MRI based on a deep learning segmentation alg

Comments
  • training code

    training code

    Dear author, I'm reading your paper, and it is a good work. Can you provide the relevant code for training? Thank you very much. My email is [email protected]

    opened by Huaqing-lucky 0
  • how to process bigggggg image?

    how to process bigggggg image?

    for example, i have 50000X50000 image matrix , can i use the dynamic clipping method similar to semantic segmentation for super-pixel segmentation ?

    Looking forward to your reply

    opened by Atumyugi 0
  • Training LNSNET

    Training LNSNET

    Hi I would like to thank you for your work and ask one question before the cvpr'21 : Could you provide more informations about the training environment and the time to train the experiment present in the actual paper (time, GPU, memory maybe ?) ?

    I am currently experiencing problems in using the code to train it, regarding the GRM part and more specifically the estimation of the spatial component. I would be very happy if you would have few minutes to answer some question about bug maybe or miss informations in the training code.

    Thanks again

    opened by GuillaumeP2705 1
  • Can we generate square seed sp and waiting for training code

    Can we generate square seed sp and waiting for training code

    Thanks for your work.

    Can we generate square seed sp whenever we input a non-square image or square image

    https://github.com/zh460045050/LNSNet/blob/main/libs/layers/seed.py line 45, 46

    • sp_h = np.int32(np.floor(np.sqrt(S) / (w / np.float(h))))
    • sp_w = np.int32(np.floor(S / np.floor(sp_h)))

    to:

    • sp_h = sp_w = np.int32(S ** 0.5)
    opened by newebug 0
Owner
null
Super Pix Adv - Offical implemention of Robust Superpixel-Guided Attentional Adversarial Attack (CVPR2020)

Super_Pix_Adv Offical implemention of Robust Superpixel-Guided Attentional Adver

DLight 8 Oct 26, 2022
TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

yifan liu 147 Dec 3, 2022
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

null 32 Sep 21, 2022
Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP

Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP Abstract: We introduce a method that allows to automatically se

Daniil Pakhomov 134 Dec 19, 2022
nnFormer: Interleaved Transformer for Volumetric Segmentation Code for paper "nnFormer: Interleaved Transformer for Volumetric Segmentation "

nnFormer: Interleaved Transformer for Volumetric Segmentation Code for paper "nnFormer: Interleaved Transformer for Volumetric Segmentation ". Please

jsguo 610 Dec 28, 2022
Realtime segmentation with ENet, the fast and accurate segmentation net.

Enet This is a realtime segmentation net with almost 22 fps on GTX1080 ti, and the model size is very small with only 28M. This repo contains the infe

JinTian 14 Aug 30, 2022
Mae segmentation - Reproduction of semantic segmentation using masked autoencoder (mae)

ADE20k Semantic segmentation with MAE Getting started Install the mmsegmentation

null 97 Dec 17, 2022
Multi-atlas segmentation (MAS) is a promising framework for medical image segmentation

Multi-atlas segmentation (MAS) is a promising framework for medical image segmentation. Generally, MAS methods register multiple atlases, i.e., medical images with corresponding labels, to a target image;

NanYoMy 13 Oct 9, 2022
This repository is an unoffical PyTorch implementation of Medical segmentation in 3D and 2D.

Pytorch Medical Segmentation Read Chinese Introduction:Here! Recent Updates 2021.1.8 The train and test codes are released. 2021.2.6 A bug in dice was

EasyCV-Ellis 618 Dec 27, 2022
Official PyTorch Implementation of Hypercorrelation Squeeze for Few-Shot Segmentation, arXiv 2021

Hypercorrelation Squeeze for Few-Shot Segmentation This is the implementation of the paper "Hypercorrelation Squeeze for Few-Shot Segmentation" by Juh

Juhong Min 165 Dec 28, 2022