Seg-Torch for Image Segmentation with Torch

Overview

Seg-Torch for Image Segmentation with Torch

This work was sparked by my personal research on simple segmentation methods based on deep learning. It is the harvest of two great predecessors;

However this code includes radical differences (such as data loading, augmentation, memory optimization) and it has more generic type of implementation suitable for use in any custom project. You only need to modify data-loader files data/custom-gen.lua and data/custom.lua.

Be warned this is susceptible to bugs. Any pull request is appreciated.

Check train_scripts/ for example execution.

Models

  • SegNet: Very simple encoder-decoder network, segmenting end2end
  • EroNet: Very similar but it chops Batch-Normalization and uses ELU activation. It is lower in accuracy but faster in training.

Example Results

exp_model/ includes a proof of concept on CamVid dataset. If you compare the results with the real-project this implementation has higher values interestingly (at least for me) :) .

Model will be shared on Dropbox, as soon as I find some time to do so.

You might also like...
Torch-mutable-modules - Use in-place and assignment operations on PyTorch module parameters with support for autograd

Torch Mutable Modules Use in-place and assignment operations on PyTorch module p

Sharpened cosine similarity torch - A Sharpened Cosine Similarity layer for PyTorch
Sharpened cosine similarity torch - A Sharpened Cosine Similarity layer for PyTorch

Sharpened Cosine Similarity A layer implementation for PyTorch Install At your c

Automatic number plate recognition using tech:  Yolo, OCR, Scene text detection, scene text recognation, flask, torch
Automatic number plate recognition using tech: Yolo, OCR, Scene text detection, scene text recognation, flask, torch

Automatic Number Plate Recognition Automatic Number Plate Recognition (ANPR) is the process of reading the characters on the plate with various optica

 Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP
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

Multi-atlas segmentation (MAS) is a promising framework for medical image segmentation
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;

Copy Paste positive polyp using poisson image blending for medical image segmentation
Copy Paste positive polyp using poisson image blending for medical image segmentation

Copy Paste positive polyp using poisson image blending for medical image segmentation According poisson image blending I've completely used it for bio

 U-Net Implementation: Convolutional Networks for Biomedical Image Segmentation
U-Net Implementation: Convolutional Networks for Biomedical Image Segmentation" using the Carvana Image Masking Dataset in PyTorch

U-Net Implementation By Christopher Ley This is my interpretation and implementation of the famous paper "U-Net: Convolutional Networks for Biomedical

 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)

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

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.

Comments
  • Segnet output/target dimensions

    Segnet output/target dimensions

    Hi, thank you for such a great work! Could you please explain the required dimensionality of outputs and targets? Segnet model input is [batchSize, numChannels, H, W]and the output is [batchSize, numClasses, H, W]. But cudnn.SpatialCrossEntropyCriterion() requires the target to be of size [batchSize, H, W]. So it looks like that the model outputs numClasses separate masks for each class while the criterion expects a single mask with all the classes within it. I can't get through this issue while reproducing the model with a toy example.

    opened by rracinskij 4
  • bugs in the code

    bugs in the code

    Thanks for sharing the excellent work. In camvid.lua file, I think it is better to remove self.dir or set it to be nil. https://github.com/erogol/seg-torch/blob/d4ce8121386b1d165545a0f7f2bc4884f818ae51/data/camvid.lua#L14 because it will give us the wrong directory where the image data sits., which will be:

    self.dir/self.dir/sub_path_to_images. 
    

    according to the line in https://github.com/erogol/seg-torch/blob/d4ce8121386b1d165545a0f7f2bc4884f818ae51/data/custom-gen.lua#L33 variable line(which represents path) will contain self.dir as its prefix substring

    opened by eriche2016 3
Owner
Eren Gölge
AI researcher @Coqui.ai
Eren Gölge
Torch implementation of "Enhanced Deep Residual Networks for Single Image Super-Resolution"

NTIRE2017 Super-resolution Challenge: SNU_CVLab Introduction This is our project repository for CVPR 2017 Workshop (2nd NTIRE). We, Team SNU_CVLab, (B

Bee Lim 625 Dec 30, 2022
Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable the user to perform stochastic variational inference in Bayesian deep neural networks

Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable the user to perform stochastic variational inference in Bayesian deep neural networks. Bayesian-Torch is designed to be flexible and seamless in extending a deterministic deep neural network architecture to corresponding Bayesian form by simply replacing the deterministic layers with Bayesian layers.

Intel Labs 210 Jan 4, 2023
Simple torch.nn.module implementation of Alias-Free-GAN style filter and resample

Alias-Free-Torch Simple torch module implementation of Alias-Free GAN. This repository including Alias-Free GAN style lowpass sinc filter @filter.py A

이준혁(Junhyeok Lee) 64 Dec 22, 2022
A machine learning library for spiking neural networks. Supports training with both torch and jax pipelines, and deployment to neuromorphic hardware.

Rockpool Rockpool is a Python package for developing signal processing applications with spiking neural networks. Rockpool allows you to build network

SynSense 21 Dec 14, 2022
A torch.Tensor-like DataFrame library supporting multiple execution runtimes and Arrow as a common memory format

TorchArrow (Warning: Unstable Prototype) This is a prototype library currently under heavy development. It does not currently have stable releases, an

Facebook Research 536 Jan 6, 2023
Pytorch and Torch testing code of CartoonGAN

CartoonGAN-Test-Pytorch-Torch Pytorch and Torch testing code of CartoonGAN [Chen et al., CVPR18]. With the released pretrained models by the authors,

Yijun Li 642 Dec 27, 2022
Implements Stacked-RNN in numpy and torch with manual forward and backward functions

Recurrent Neural Networks Implements simple recurrent network and a stacked recurrent network in numpy and torch respectively. Both flavours implement

Vishal R 1 Nov 16, 2021
Torch-based tool for quantizing high-dimensional vectors using additive codebooks

Trainable multi-codebook quantization This repository implements a utility for use with PyTorch, and ideally GPUs, for training an efficient quantizer

Daniel Povey 41 Jan 7, 2023
Pytorch Implementations of large number classical backbone CNNs, data enhancement, torch loss, attention, visualization and some common algorithms.

Torch-template-for-deep-learning Pytorch implementations of some **classical backbone CNNs, data enhancement, torch loss, attention, visualization and

Li Shengyan 270 Dec 31, 2022
Torch-ngp - A pytorch implementation of the hash encoder proposed in instant-ngp

HashGrid Encoder (WIP) A pytorch implementation of the HashGrid Encoder from ins

hawkey 1k Jan 1, 2023