All Projects → YuvalNirkin → hyperseg

YuvalNirkin / hyperseg

Licence: CC0-1.0 license
HyperSeg - Official PyTorch Implementation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hyperseg

Espnet
ESPNet: Efficient Spatial Pyramid of Dilated Convolutions for Semantic Segmentation
Stars: ✭ 473 (+171.84%)
Mutual labels:  real-time, semantic-segmentation
Esnet
ESNet: An Efficient Symmetric Network for Real-time Semantic Segmentation
Stars: ✭ 88 (-49.43%)
Mutual labels:  real-time, semantic-segmentation
Enet
ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation
Stars: ✭ 530 (+204.6%)
Mutual labels:  real-time, semantic-segmentation
ESANet
ESANet: Efficient RGB-D Semantic Segmentation for Indoor Scene Analysis
Stars: ✭ 154 (-11.49%)
Mutual labels:  real-time, semantic-segmentation
Nas Segm Pytorch
Code for Fast Neural Architecture Search of Compact Semantic Segmentation Models via Auxiliary Cells, CVPR '19
Stars: ✭ 126 (-27.59%)
Mutual labels:  real-time, semantic-segmentation
Icnet Tensorflow
TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
Stars: ✭ 396 (+127.59%)
Mutual labels:  real-time, semantic-segmentation
Espnetv2 Coreml
Semantic segmentation on iPhone using ESPNetv2
Stars: ✭ 66 (-62.07%)
Mutual labels:  real-time, semantic-segmentation
Fcn
Chainer Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
Stars: ✭ 211 (+21.26%)
Mutual labels:  segmentation, semantic-segmentation
CAP augmentation
Cut and paste augmentation for object detection and instance segmentation
Stars: ✭ 93 (-46.55%)
Mutual labels:  segmentation, semantic-segmentation
Real Time Semantic Segmentation
lightweight and efficient cnn for semantic segmentation, my blog address:
Stars: ✭ 118 (-32.18%)
Mutual labels:  real-time, semantic-segmentation
Kimera Semantics
Real-Time 3D Semantic Reconstruction from 2D data
Stars: ✭ 368 (+111.49%)
Mutual labels:  real-time, semantic-segmentation
Fast portrait segmentation
Fast (aimed to "real time") Portrait Segmentation on mobile phone
Stars: ✭ 215 (+23.56%)
Mutual labels:  real-time, segmentation
Lightweight Segmentation
Lightweight models for real-time semantic segmentation(include mobilenetv1-v3, shufflenetv1-v2, igcv3, efficientnet).
Stars: ✭ 261 (+50%)
Mutual labels:  real-time, semantic-segmentation
Lednet
LEDNet: A Lightweight Encoder-Decoder Network for Real-time Semantic Segmentation
Stars: ✭ 450 (+158.62%)
Mutual labels:  real-time, semantic-segmentation
AttaNet
AttaNet for real-time semantic segmentation.
Stars: ✭ 37 (-78.74%)
Mutual labels:  real-time, semantic-segmentation
Depth clustering
🚕 Fast and robust clustering of point clouds generated with a Velodyne sensor.
Stars: ✭ 657 (+277.59%)
Mutual labels:  real-time, segmentation
Keras Unet
Helper package with multiple U-Net implementations in Keras as well as useful utility tools helpful when working with image semantic segmentation tasks. This library and underlying tools come from multiple projects I performed working on semantic segmentation tasks
Stars: ✭ 196 (+12.64%)
Mutual labels:  segmentation, semantic-segmentation
Semantic Segmentation Suite
Semantic Segmentation Suite in TensorFlow. Implement, train, and test new Semantic Segmentation models easily!
Stars: ✭ 2,395 (+1276.44%)
Mutual labels:  segmentation, semantic-segmentation
Dabnet
Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation (BMVC2019)
Stars: ✭ 109 (-37.36%)
Mutual labels:  real-time, semantic-segmentation
Multi Task Refinenet
Multi-Task (Joint Segmentation / Depth / Surface Normas) Real-Time Light-Weight RefineNet
Stars: ✭ 139 (-20.11%)
Mutual labels:  real-time, semantic-segmentation

HyperSeg - Official PyTorch Implementation

Teaser Example segmentations on the PASCAL VOC dataset.

This repository contains the source code for the real-time semantic segmentation method described in the paper:

HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation
Conference on Computer Vision and Pattern Recognition (CVPR), 2021
Yuval Nirkin, Lior Wolf, Tal Hassner
Paper

Abstract: 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, a multi-headed weight generating module which generates the weights of each block in the decoder immediately before they are consumed, for efficient memory utilization, and a primary network that is composed of novel dynamic patch-wise convolutions. Despite the usage of less-conventional blocks, our architecture obtains real-time performance. In terms of the runtime vs. accuracy trade-off, we surpass state of the art (SotA) results on popular semantic segmentation benchmarks: PASCAL VOC 2012 (val. set) and real-time semantic segmentation on Cityscapes, and CamVid.

Installation

Install the following packages:

conda install pytorch torchvision cudatoolkit=11.1 -c pytorch -c conda-forge
pip install opencv-python ffmpeg-python

Add the parent directory of the repository to PYTHONPATH.

Models

Template Dataset Resolution mIoU (%) FPS Link
HyperSeg-L PASCAL VOC 512x512 80.6 (val) - download
HyperSeg-M CityScapes 1024x512 76.2 (val) 36.9 download
HyperSeg-S CityScapes 1536x768 78.2 (val) 16.1 download
HyperSeg-S CamVid 768x576 78.4 (test) 38.0 download
HyperSeg-L CamVid 1024x768 79.1 (test) 16.6 -

The models FPS was measured on an NVIDIA GeForce GTX 1080TI GPU.

Either download the models under <project root>/weights or adjust the model variable in the test configuration files.

Datasets

Dataset # Images Classes Resolution Link
PASCAL VOC 10,582 21 up to 500x500 auto downloaded
CityScapes 5,000 19 2048x1024 download
CamVid 701 12 960x720 download

Either download the datasets under <project root>/data or adjust the data_dir variable in the configuration files.

Training

To train the HyperSeg-M model on Cityscapes, set the exp_dir and data_dir paths in cityscapes_efficientnet_b1_hyperseg-m.py and run:

python configs/train/cityscapes_efficientnet_b1_hyperseg-m.py

Testing

Testing a model after training

For example testing the HyperSeg-M model on Cityscapes validation set:

python test.py 'checkpoints/cityscapes/cityscapes_efficientnet_b1_hyperseg-m' \
-td "hyperseg.datasets.cityscapes.CityscapesDataset('data/cityscapes',split='val',mode='fine')" \
-it "seg_transforms.LargerEdgeResize([512,1024])"

Testing a pretrained model

For example testing the PASCAL VOC HyperSeg-L model using the available test configuration:

python configs/test/vocsbd_efficientnet_b3_hyperseg-l.py

Citation

@inproceedings{nirkin2021hyperseg,
  title={{HyperSeg}: Patch-wise Hypernetwork for Real-time Semantic Segmentation},
  author={Nirkin, Yuval and Wolf, Lior and Hassner, Tal},
  booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month={June},
  year={2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].