• Stars
    star
    816
  • Rank 55,461 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Deep Image Matting implementation in PyTorch

Deep Image Matting

Deep Image Matting paper implementation in PyTorch.

Differences

  1. "fc6" is dropped.
  2. Indices pooling.

"fc6" is clumpy, over 100 millions parameters, makes the model hard to converge. I guess it is the reason why the model (paper) has to be trained stagewisely.

Performance

  • The Composition-1k testing dataset.
  • Evaluate with whole image.
  • SAD normalized by 1000.
  • Input image is normalized with mean=[0.485, 0.456, 0.406] and std=[0.229, 0.224, 0.225].
  • Both erode and dialte to generate trimap.
Models SAD MSE Download
paper-stage0 59.6 0.019
paper-stage1 54.6 0.017
paper-stage3 50.4 0.014
my-stage0 66.8 0.024 Link

Dependencies

  • Python 3.5.2
  • PyTorch 1.1.0

Dataset

Adobe Deep Image Matting Dataset

Follow the instruction to contact author for the dataset.

MSCOCO

Go to MSCOCO to download:

PASCAL VOC

Go to PASCAL VOC to download:

Usage

Data Pre-processing

Extract training images:

$ python pre_process.py

Train

$ python train.py

If you want to visualize during training, run in your terminal:

$ tensorboard --logdir runs

Experimental results

The Composition-1k testing dataset

  1. Test:
$ python test.py

It prints out average SAD and MSE errors when finished.

The alphamatting.com dataset

  1. Download the evaluation datasets: Go to the Datasets page and download the evaluation datasets. Make sure you pick the low-resolution dataset.

  2. Extract evaluation images:

$ python extract.py
  1. Evaluate:
$ python eval.py

Click to view whole images:

Image Trimap1 Trimap2 Trimap3
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image
image image image image

Demo

Download pre-trained Deep Image Matting Link then run:

$ python demo.py
Image/Trimap Output/GT New BG/Compose
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image

小小的赞助~

Sample

若对您有帮助可给予小小的赞助~




More Repositories

1

Deep-Image-Matting

Deep Image Matting
Python
931
star
2

Car-Recognition

Car Recognition with Deep Learning
Python
328
star
3

InsightFace-v2

PyTorch implementation of Additive Angular Margin Loss for Deep Face Recognition.
Python
323
star
4

InsightFace-PyTorch

PyTorch implementation of Additive Angular Margin Loss for Deep Face Recognition.
Python
193
star
5

Image-Captioning-PyTorch

图像中文描述+视觉注意力
Python
153
star
6

Machine-Translation

中英机器文本翻译
Python
129
star
7

Self-Attention-Keras

自注意力与文本分类
Python
119
star
8

Sentiment-Analysis

细粒度用户评论情感分析
Python
115
star
9

Speech-Transformer

PyTorch re-implementation of Speech-Transformer
Python
98
star
10

Image-Captioning

图像中文描述
Jupyter Notebook
85
star
11

Transformer

英中文本机器翻译的
Python
84
star
12

Look-Into-Person

This repository is to do Human Parsing with SegNet.
Python
83
star
13

Autoencoder

Convolutional Autoencoder with SetNet in PyTorch
Python
83
star
14

Tacotron2-Mandarin

PyTorch reimplementation of Tacotron2 in Mandarin
Python
77
star
15

Age-and-Gender

同时识别年龄与性别
Python
75
star
16

MobileFaceNet

PyTorch implementation of MobileFaceNets
Python
75
star
17

Scene-Classification

微调 Inception-ResNet-V2, 解决 AI Challenger 2017 场景分类问题。
Python
72
star
18

Mobile-Image-Matting

a lightweight image matting model
Python
66
star
19

Face-Alignment

Face alignment with similarity transform based on MTCNN and RetinaFace.
Python
64
star
20

FaceNet

Face recognition using Keras
Python
60
star
21

Machine-Translation-v2

英中机器文本翻译
Python
53
star
22

Face-Attributes-Mobile

Regress Face Attributes with MobileNetV2
Python
40
star
23

Listen-Attend-Spell-v2

PyTorch implementation of Listen Attend and Spell Automatic Speech Recognition (ASR).
Shell
38
star
24

Facial-Expression-Prediction

Facial Expression Prediction with Deep Learning
Python
31
star
25

Crop-Disease-Detection

AI Challenger 2018 农作物病害检测
Python
29
star
26

Colorful-Image-Colorization

This is a keras implementation of paper Colorful Image Colorization.
Python
27
star
27

Look-Into-Person-PyTorch

Human Parsing with DeepLabv3 in PyTorch.
Python
27
star
28

Scene-Understanding

室内语义分割
Python
27
star
29

Zero-Shot-Learning

零样本学习
Python
25
star
30

InsightFace

复现 ArcFace 论文
Python
22
star
31

Conv-Autoencoder

Convolutional Autoencoder
Python
22
star
32

Reading-Comprehension

DMN+ 模型的PyTorch 实现(中文数据集)
Python
21
star
33

Transformer-v2

英中文本机器翻译
Python
19
star
34

MobileFaceNet-PyTorch

PyTorch implementation of MobileFaceNets
Python
18
star
35

Language-Model

基于 PyTorch 范例 实现中文语言模型。
Python
16
star
36

Speaker-Embeddings

PyTorch implementation of a self-attentive speaker embedding
Python
16
star
37

Think-Bayes

贝叶斯思维
Python
15
star
38

Super-Resolution-Net

SRNet 的 Keras 实现
Python
15
star
39

MDSR

MDSR 的 Keras 实现
Python
14
star
40

EAST

EAST: An Efficient and Accurate Scene Text Detector.
C++
14
star
41

Video-Matching

视频匹配
Python
13
star
42

Keypoints

Person Keypoint Detection in PyTorch
Python
13
star
43

Chatbot

聊天机器人
Python
13
star
44

Neural-Style-Transfer

图像风格迁移
Python
10
star
45

3D-Object-Detection

Indoor Semantic Segmentation
Python
10
star
46

Face-Attributes

Deep Face Attributes
Python
9
star
47

Gaze-Estimation

Estimating human gaze from natural eye images.
Python
9
star
48

Car-Recognition-PyTorch

Python
9
star
49

hackathon-ocw

hackathon-ocw
Python
8
star
50

HomographyNet

estimate the relative homography between a pair of images
Python
8
star
51

Chatbot-v2

聊天机器人
Python
7
star
52

TwinsOrNot

Twins Or Not 测试人脸相似度
Python
7
star
53

Listen-Attend-Spell

PyTorch implementation of Listen Attend and Spell Automatic Speech Recognition (ASR).
Python
6
star
54

GST-Tacotron-v2

PyTorch implementation of Style Tokens
Python
6
star
55

CRNN-v2

PyTorch re-implementation of CRNN
Python
6
star
56

Class-Rebalancing

分类问题中数量不均衡造成的影响和解决之道
Python
6
star
57

EAST-v2

EAST trained on COCO-Text
C++
6
star
58

CRNN

PyTorch re-implementation of CRNN: Convolutional Recurrent Neural Network
Python
6
star
59

SegNet

CVPR 2018 WAD Video Segmentation Challenge with SegNet
Python
6
star
60

Fundus_Lesion2018

眼底病变自动分割
Python
5
star
61

GNN-Tutorial-Recsys2015

RecSys Challenge 2015
Python
5
star
62

Visual-Question-Answering

This is an PyTorch implementation of DMN+ model on MSCOCO VQA dataset.
Python
5
star
63

MobileFaceNet-Grayscale

MobileFaceNets trained with grayscale images
Python
5
star
64

Facial-Expression-Prediction-v2

Facial Expression Prediction
Python
5
star
65

Gaze

Real-Time Video Analytics Service Platform
Python
4
star
66

Hanging-Company-Logo

水牌识别
Python
4
star
67

NComputerVision

NComputerVision is a fast computer vision algorithm library written in C#.
C#
3
star
68

Image-Matching

框架图像识别
Python
3
star
69

YOLO-Face-Detection

Python
3
star
70

Hello-SMPL

Python
3
star
71

Invisibility-Cloak

隐身斗篷
Python
3
star
72

FaceNet-v2

Python
3
star
73

SHALE

Python
3
star
74

RetinafaceWrapper

a wrapper of https://github.com/biubug6/Pytorch_Retinaface
Python
3
star
75

MTCNN

MTCNN 论文预测部分的 PyTorch 实现
Python
3
star
76

DeepRankIQA

Python
3
star
77

Image-Quality-Assessment

Python
3
star
78

3DDFA

Python
2
star
79

Complex-Analysis

Visual Complex Analysis
Jupyter Notebook
2
star
80

Mobile-Image-Colorization

Python
2
star
81

StyleGAN-PyTorch

Python
2
star
82

Convex-Optimization

Python
2
star
83

NWebCrawler

C#
2
star
84

DeepIQA

Python
2
star
85

Semantic-Segmentation

A Comparative Study of Semantic Segmentation
Python
2
star
86

facesdk

A python package for face analysis.
Python
2
star
87

Tacotron2-Khmer

Python
2
star
88

Image-Inpainting

基于反卷积网络实现图像补绘
Python
2
star
89

GST-Tacotron-Uyghur

Python
1
star
90

Short-Text-Similarity

Python
1
star
91

Beta-Distribution

Python
1
star
92

Gaze-Estimation-MPIIGaze

Python
1
star
93

Baidu-Segmentation-Test

Python
1
star
94

Simple-Captioning

Bare minimal code to run image captioning demo.
Python
1
star
95

Star-Recognition

明星人脸识别
Python
1
star
96

Dynamic-Memory-Network-Plus

A Pytorch implementation of Dynamic memory Network Plus
Python
1
star
97

RetinaFace

Python
1
star
98

Pointcloud-Classifier

Pointcloud classification with kaolin
Python
1
star
99

Griffin-Lim

Python
1
star
100

Remove-Forged

Python
1
star