The official repository for Deep Image Matting with Flexible Guidance Input

Overview

FGI-Matting

The official repository for Deep Image Matting with Flexible Guidance Input.

Paper: https://arxiv.org/abs/2110.10898

image

all

Requirements

  • easydict
  • numpy
  • opencv-python
  • Pillow
  • PyQt5
  • scikit-image
  • scipy
  • toml
  • torch>=1.5.0
  • torchvision

Models and supplementary data for DIM test set(Composition-1k) and Distinctions-646 test set

Google drive: https://drive.google.com/drive/folders/13qnlXUSKS5HfkfvzdMKAv7FvJ6YV_wPK?usp=sharing
百度网盘: https://pan.baidu.com/s/1ZYcbwyCIrL6G9t7pkCIBYw 提取码: zjtj

  • Weight_DIM.pth The model trained with Adobe matting dataset.

  • Weight_D646.pth The model trained with Distincions-646 dataset.

  • DIM_test_supp_data.zip Scribblemaps and Clickmaps for DIM test set.

  • D-646_test_supp_data.zip Scribblemaps and Clickmaps for Distinctions-646 test set.

Place Weight_DIM.pth and Weight_D646.pth in ./checkpoints.
Edit ./config/FGI_config to modify the path of the testset and choose the checkpoint name.

Test on DIM test set(Composition-1k)

Methods SAD MSE Grad Conn
Trimap test 30.19 0.0061 13.07 26.66
Scribblemap test 32.86 0.0090 14.18 29.09
Clickmap test 34.67 0.0112 15.45 30.96
No guidance test 36.36 0.0141 15.23 32.76

"checkpoint" in ./config/FGI_config.toml should be "Weight_DIM".
bash test.sh
Modify "guidancemap_phase" in ./config/FGI_config.toml to test on trimap, scribblemap, clickmap and No_guidance.
For further test, please use the code in ./DIM_evaluation_code and the predicted alpha mattes in ./alpha_pred.

Test on Distinctions-646 test set(Not appear in the paper)

Methods SAD MSE Grad Conn
Trimap test 28.90 0.0105 24.67 27.40
Scribblemap test 33.22 0.0131 26.93 31.38
Clickmap test 34.97 0.0146 27.60 33.11
No guidance test 36.83 0.0156 28.28 34.90

"checkpoint" in ./config/FGI_config.toml should be "Weight_D646".
bash test.sh
Modify "guidancemap_phase" in ./config/FGI_config.toml to test on trimap, scribblemap, clickmap and No_guidance.
For further test, please use the code in ./DIM_evaluation_code and the predicted alpha mattes in ./alpha_pred.

The QT Demo

Copy one of the pth file and rename it "Weight_qt_in_use.pth", also place it in ./checkpoints.
Run test_one_img_qt.py. Try images in ./testimg. It will use GPU if avaliable, otherwise it will use CPU.

demo

I recommend to use the one trained on DIM dataset.
Have fun :D

Acknowledgment

GCA-Matting: https://github.com/Yaoyi-Li/GCA-Matting

Owner
Hang Cheng
Hang Cheng
Style transfer between images was performed using the VGG19 model

Style transfer between images was performed using the VGG19 model. The necessary codes, libraries and all other information of this project are available below

Onur yılmaz 2 May 09, 2022
Share a benchmark that can easily apply reinforcement learning in Job-shop-scheduling

Gymjsp Gymjsp is an open source Python library, which uses the OpenAI Gym interface for easily instantiating and interacting with RL environments, and

134 Dec 08, 2022
Domain Generalization for Mammography Detection via Multi-style and Multi-view Contrastive Learning

MSVCL_MICCAI2021 Installation Please follow the instruction in pytorch-CycleGAN-and-pix2pix to install. Example Usage An example of vendor-styles tran

Jaron Lee 11 Oct 19, 2022
Multi-task Learning of Order-Consistent Causal Graphs (NeuRIPs 2021)

Multi-task Learning of Order-Consistent Causal Graphs (NeuRIPs 2021) Authors: Xinshi Chen, Haoran Sun, Caleb Ellington, Eric Xing, Le Song Link to pap

Xinshi Chen 2 Dec 20, 2021
Graph Convolutional Networks in PyTorch

Graph Convolutional Networks in PyTorch PyTorch implementation of Graph Convolutional Networks (GCNs) for semi-supervised classification [1]. For a hi

Thomas Kipf 4.5k Dec 31, 2022
Repository For Programmers Seeking a platform to show their skills

Programming-Nerds Repository For Programmers Seeking Pull Requests In hacktoberfest ❓ What's Hacktoberfest 2021? Hacktoberfest is the easiest way to g

42 Oct 29, 2022
Official Pytorch implementation for video neural representation (NeRV)

NeRV: Neural Representations for Videos (NeurIPS 2021) Project Page | Paper | UVG Data Hao Chen, Bo He, Hanyu Wang, Yixuan Ren, Ser-Nam Lim, Abhinav S

hao 214 Dec 28, 2022
A Multi-modal Model Chinese Spell Checker Released on ACL2021.

ReaLiSe ReaLiSe is a multi-modal Chinese spell checking model. This the office code for the paper Read, Listen, and See: Leveraging Multimodal Informa

DaDa 106 Dec 29, 2022
[Preprint] ConvMLP: Hierarchical Convolutional MLPs for Vision, 2021

Convolutional MLP ConvMLP: Hierarchical Convolutional MLPs for Vision Preprint link: ConvMLP: Hierarchical Convolutional MLPs for Vision By Jiachen Li

SHI Lab 143 Jan 03, 2023
RodoSol-ALPR Dataset

RodoSol-ALPR Dataset This dataset, called RodoSol-ALPR dataset, contains 20,000 images captured by static cameras located at pay tolls owned by the Ro

Rayson Laroca 45 Dec 15, 2022
The Power of Scale for Parameter-Efficient Prompt Tuning

The Power of Scale for Parameter-Efficient Prompt Tuning Implementation of soft embeddings from https://arxiv.org/abs/2104.08691v1 using Pytorch and H

Kip Parker 208 Dec 30, 2022
Official Pytorch implementation of Meta Internal Learning

Official Pytorch implementation of Meta Internal Learning

10 Aug 24, 2022
Model Zoo for MindSpore

Welcome to the Model Zoo for MindSpore In order to facilitate developers to enjoy the benefits of MindSpore framework, we will continue to add typical

MindSpore 226 Jan 07, 2023
Unofficial implementation of Pix2SEQ

Unofficial-Pix2seq: A Language Modeling Framework for Object Detection Unofficial implementation of Pix2SEQ. Please use this code with causion. Many i

159 Dec 12, 2022
PyGCL: A PyTorch Library for Graph Contrastive Learning

PyGCL is a PyTorch-based open-source Graph Contrastive Learning (GCL) library, which features modularized GCL components from published papers, standa

PyGCL 588 Dec 31, 2022
TensorFlow GNN is a library to build Graph Neural Networks on the TensorFlow platform.

TensorFlow GNN This is an early (alpha) release to get community feedback. It's under active development and we may break API compatibility in the fut

889 Dec 30, 2022
UA-GEC: Grammatical Error Correction and Fluency Corpus for the Ukrainian Language

UA-GEC: Grammatical Error Correction and Fluency Corpus for the Ukrainian Language This repository contains UA-GEC data and an accompanying Python lib

Grammarly 226 Dec 29, 2022
AdamW optimizer and cosine learning rate annealing with restarts

AdamW optimizer and cosine learning rate annealing with restarts This repository contains an implementation of AdamW optimization algorithm and cosine

Maksym Pyrozhok 133 Dec 20, 2022
CRNN With PyTorch

CRNN-PyTorch Implementation of https://arxiv.org/abs/1507.05717

Vadim 4 Sep 01, 2022
Unsupervised clustering of high content screen samples

Microscopium Unsupervised clustering and dataset exploration for high content screens. See microscopium in action Public dataset BBBC021 from the Broa

60 Dec 05, 2022