All Projects → akirasosa → Mobile Semantic Segmentation

akirasosa / Mobile Semantic Segmentation

Licence: mit
Real-Time Semantic Segmentation in Mobile device

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mobile Semantic Segmentation

Espnetv2 Coreml
Semantic segmentation on iPhone using ESPNetv2
Stars: ✭ 66 (-89.52%)
Mutual labels:  semantic-segmentation, coreml
Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+940.79%)
Mutual labels:  semantic-segmentation
Awesome Coreml Models
Collection of models for Core ML
Stars: ✭ 500 (-20.63%)
Mutual labels:  coreml
Refinenet
RefineNet: Multi-Path Refinement Networks for High-Resolution Semantic Segmentation
Stars: ✭ 543 (-13.81%)
Mutual labels:  semantic-segmentation
Vnet.pytorch
A PyTorch implementation for V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation
Stars: ✭ 506 (-19.68%)
Mutual labels:  semantic-segmentation
Tusimple Duc
Understanding Convolution for Semantic Segmentation
Stars: ✭ 567 (-10%)
Mutual labels:  semantic-segmentation
Espnet
ESPNet: Efficient Spatial Pyramid of Dilated Convolutions for Semantic Segmentation
Stars: ✭ 473 (-24.92%)
Mutual labels:  semantic-segmentation
Light Weight Refinenet
Light-Weight RefineNet for Real-Time Semantic Segmentation
Stars: ✭ 619 (-1.75%)
Mutual labels:  semantic-segmentation
Pytorch Deeplab Resnet
DeepLab resnet v2 model in pytorch
Stars: ✭ 584 (-7.3%)
Mutual labels:  semantic-segmentation
Keras Openface
Keras-OpenFace is a project converting OpenFace from Torch implementation to a Keras version
Stars: ✭ 538 (-14.6%)
Mutual labels:  coreml
Superpoint graph
Large-scale Point Cloud Semantic Segmentation with Superpoint Graphs
Stars: ✭ 533 (-15.4%)
Mutual labels:  semantic-segmentation
Deeplabv3
PyTorch implementation of DeepLabV3, trained on the Cityscapes dataset.
Stars: ✭ 511 (-18.89%)
Mutual labels:  semantic-segmentation
Crfasrnn keras
CRF-RNN Keras/Tensorflow version
Stars: ✭ 576 (-8.57%)
Mutual labels:  semantic-segmentation
Gluon Cv
Gluon CV Toolkit
Stars: ✭ 5,001 (+693.81%)
Mutual labels:  semantic-segmentation
Mmdnn
MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.
Stars: ✭ 5,472 (+768.57%)
Mutual labels:  coreml
Iowncode
A curated collection of iOS, ML, AR resources sprinkled with some UI additions
Stars: ✭ 499 (-20.79%)
Mutual labels:  coreml
Enet
ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation
Stars: ✭ 530 (-15.87%)
Mutual labels:  semantic-segmentation
Awesome Coreml Models
Largest list of models for Core ML (for iOS 11+)
Stars: ✭ 5,192 (+724.13%)
Mutual labels:  coreml
Semseg
常用的语义分割架构结构综述以及代码复现
Stars: ✭ 624 (-0.95%)
Mutual labels:  semantic-segmentation
Label Studio
Label Studio is a multi-type data labeling and annotation tool with standardized output format
Stars: ✭ 7,264 (+1053.02%)
Mutual labels:  semantic-segmentation

Real-Time Semantic Segmentation in Mobile device

This project is an example project of semantic segmentation for mobile real-time app.

The architecture is inspired by MobileNetV2 and U-Net.

LFW, Labeled Faces in the Wild, is used as a Dataset.

The goal of this project is to detect hair segments with reasonable accuracy and speed in mobile device. Currently, it achieves 0.89 IoU.

About speed vs accuracy, more details are available at my post.

Example of predicted image.

Example application

  • iOS
  • Android (TODO)

Requirements

  • Python 3.8
  • pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
  • CoreML for iOS app.

About Model

At this time, there is only one model in this repository, MobileNetV2_unet. As a typical U-Net architecture, it has encoder and decoder parts, which consist of depthwise conv blocks proposed by MobileNets.

Input image is encoded to 1/32 size, and then decoded to 1/2. Finally, it scores the results and make it to original size.

Steps to training

Data Preparation

Data is available at LFW. To get mask images, refer issue #11 for more. After you got images and masks, put the images of faces and masks as shown below.

data/
  lfw/
    raw/
      images/
        0001.jpg
        0002.jpg
      masks/
        0001.ppm
        0002.ppm

Training

If you use 224 x 224 as input size, pre-trained weight of MobileNetV2 is available. It will be automatically downloaded when you train model with the following command.

cd src
python run_train.py params/002.yaml

Dice coefficient is used as a loss function.

Pretrained model

Input size IoU Download
224 0.89 Google Drive

Converting

As the purpose of this project is to make model run in mobile device, this repository contains some scripts to convert models for iOS and Android.

TBD

  • [x] Report speed vs accuracy in mobile device.
  • [ ] Convert pytorch to Android using TesorFlow Light
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].