Code Monkey home page Code Monkey logo

segmentation's Introduction

Semantic segmentation

seg_cov

Semantic image segmentation is the task of classifying each pixel in an image from a predefined set of classes.

In this tutorial, you will:

  • Perform inference with 10 well-known semantic segmentors Open In Colab
  • Fine tune semantic segmentors on a custom dataset Open In Colab
  • Design and train your own semantic segmentation model Open In Colab

This work is based on MMSegmentation: OpenMMLab segmentation toolbox and benchmark.

10 Semantic segmentors

Segmentor Paper
FCN Fully Convolutional Networks for Semantic Segmentation (2017)
U-net Convolutional networks for biomedical image segmentation (2015)
PSPNet Pyramid Scene Parsing Network (2017)
DeepLabV3 Rethinking atrous convolution for semantic image segmentation (2017)
UPerNet Unified Perceptual Parsing for Scene Understanding (2018)
CCNet Criss-Cross Attention for Semantic Segmentation (2019)
FastFCN Rethinking Dilated Convolution in the Backbone for Semantic Segmentation (2019)
SETR Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers (2020)
Segmenter Transformer for Semantic Segmentation (2021)
SegFormer Simple and Efficient Design for Semantic Segmentation with Transformers (2021)

res_yolof


Perform inference

Open In Colab

Here is how to load a pretrained model, perfrom inference and vizualize the results.

model = init_segmentor(config, checkpoint, device='cuda:0')
result = inference_segmentor(model, img)
model.show_result(img, result, out_file='result.jpg', win_name=m_name)

Results

Segmentor Result
FCN res_yolof
U-net res_yolof
PSPNet res_yolof
DeepLabV3 res_yolof
UPerNet res_yolof
CCNet res_yolof
FastFCN res_yolof
SETR res_yolof
Segmenter res_yolof
SegFormer res_yolof

Fine tune semantic segmentors on a custom dataset

Open In Colab

  • Select a semantic segmentation model: SEgmentation TRansformer SETR
  • Add a new dataset class: Scene Understanding Datasets
  • Create a config file.
  • Conduct training and evaluation.

setr_arch


Design and train your own semantic segmentor

Open In Colab

  • Select a semantic segmentation model: UPerNet Unified Perceptual Parsing for Scene Understanding
  • Replabe the ResNet backbone with a new one: ConvNeXt A ConvNet for the 2020s
  • Config the heads.
  • Add a new dataset class: Scene Understanding Datasets
  • Conduct training and evaluation.

convnext

Regards!

segmentation's People

Contributors

ibrahimsobh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.