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
CIFAR-10_train-test - training and testing codes for dataset CIFAR-10

CIFAR-10_train-test - training and testing codes for dataset CIFAR-10

Frederick Wang 3 Apr 26, 2022
Machine Learning Models were applied to predict the mass of the brain based on gender, age ranges, and head size.

Brain Weight in Humans Variations of head sizes and brain weights in humans Kaggle dataset obtained from this link by Anubhab Swain. Image obtained fr

Anne Livia 1 Feb 02, 2022
This repository provides an unified frameworks to train and test the state-of-the-art few-shot font generation (FFG) models.

FFG-benchmarks This repository provides an unified frameworks to train and test the state-of-the-art few-shot font generation (FFG) models. What is Fe

Clova AI Research 101 Dec 27, 2022
Python implementation of the multistate Bennett acceptance ratio (MBAR)

pymbar Python implementation of the multistate Bennett acceptance ratio (MBAR) method for estimating expectations and free energy differences from equ

Chodera lab // Memorial Sloan Kettering Cancer Center 169 Dec 02, 2022
A sample pytorch Implementation of ACL 2021 research paper "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".

Span-ASTE-Pytorch This repository is a pytorch version that implements Ali's ACL 2021 research paper Learning Span-Level Interactions for Aspect Senti

来自丹麦的天籁 10 Dec 06, 2022
MlTr: Multi-label Classification with Transformer

MlTr: Multi-label Classification with Transformer This is official implement of "MlTr: Multi-label Classification with Transformer". Abstract The task

程星 38 Nov 08, 2022
keyframes-CNN-RNN(action recognition)

keyframes-CNN-RNN(action recognition) Environment: python=3.7 pytorch=1.2 Datasets: Following the format of UCF101 action recognition. Run steps: Mo

4 Feb 09, 2022
Applying CLIP to Point Cloud Recognition.

PointCLIP: Point Cloud Understanding by CLIP This repository is an official implementation of the paper 'PointCLIP: Point Cloud Understanding by CLIP'

Renrui Zhang 175 Dec 24, 2022
TANL: Structured Prediction as Translation between Augmented Natural Languages

TANL: Structured Prediction as Translation between Augmented Natural Languages Code for the paper "Structured Prediction as Translation between Augmen

98 Dec 15, 2022
A Bayesian cognition approach for belief updating of correlation judgement through uncertainty visualizations

Overview Code and supplemental materials for Karduni et al., 2020 IEEE Vis. "A Bayesian cognition approach for belief updating of correlation judgemen

Ryan Wesslen 1 Feb 08, 2022
PyTorch implementation of the REMIND method from our ECCV-2020 paper "REMIND Your Neural Network to Prevent Catastrophic Forgetting"

REMIND Your Neural Network to Prevent Catastrophic Forgetting This is a PyTorch implementation of the REMIND algorithm from our ECCV-2020 paper. An ar

Tyler Hayes 72 Nov 27, 2022
Plug and play transformer you can find network structure and official complete code by clicking List

Plug-and-play Module Plug and play transformer you can find network structure and official complete code by clicking List The following is to quickly

8 Mar 27, 2022
Two-Stream Adaptive Graph Convolutional Networks for Skeleton-Based Action Recognition in CVPR19

2s-AGCN Two-Stream Adaptive Graph Convolutional Networks for Skeleton-Based Action Recognition in CVPR19 Note PyTorch version should be 0.3! For PyTor

LShi 547 Dec 26, 2022
A Quick and Dirty Progressive Neural Network written in TensorFlow.

prog_nn .▄▄ · ▄· ▄▌ ▐ ▄ ▄▄▄· ▐ ▄ ▐█ ▀. ▐█▪██▌•█▌▐█▐█ ▄█▪ •█▌▐█ ▄▀▀▀█▄▐█▌▐█▪▐█▐▐▌ ██▀

SynPon 53 Dec 12, 2022
The official implementation of Variable-Length Piano Infilling (VLI).

Variable-Length-Piano-Infilling The official implementation of Variable-Length Piano Infilling (VLI). (paper: Variable-Length Music Score Infilling vi

29 Sep 01, 2022
Train/evaluate a Keras model, get metrics streamed to a dashboard in your browser.

Hera Train/evaluate a Keras model, get metrics streamed to a dashboard in your browser. Setting up Step 1. Plant the spy Install the package pip

Keplr 495 Dec 10, 2022
This is the code repository for the paper A hierarchical semantic segmentation framework for computer-vision-based bridge column damage detection

Bridge-damage-segmentation This is the code repository for the paper A hierarchical semantic segmentation framework for computer-vision-based bridge c

Jingxiao Liu 5 Dec 07, 2022
Unofficial Pytorch Lightning implementation of Contrastive Syn-to-Real Generalization (ICLR, 2021)

Unofficial Pytorch Lightning implementation of Contrastive Syn-to-Real Generalization (ICLR, 2021)

Gyeongjae Choi 17 Sep 23, 2021
“英特尔创新大师杯”深度学习挑战赛 赛道3:CCKS2021中文NLP地址相关性任务

ccks2021-track3 CCKS2021中文NLP地址相关性任务-赛道三-冠军方案 团队:我的加菲鱼- wodejiafeiyu 初赛第二/复赛第一/决赛第一 前言 19年开始,陆陆续续参加了一些比赛,拿到过一些top,比较懒一直都没分享过,这次比较幸运又拿了top1,打算分享下 分类的任务

shaochenjie 131 Dec 31, 2022
ICML 21 - Voice2Series: Reprogramming Acoustic Models for Time Series Classification

Voice2Series-Reprogramming Voice2Series: Reprogramming Acoustic Models for Time Series Classification International Conference on Machine Learning (IC

49 Jan 03, 2023