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
ShinRL: A Library for Evaluating RL Algorithms from Theoretical and Practical Perspectives

Status: Under development (expect bug fixes and huge updates) ShinRL: A Library for Evaluating RL Algorithms from Theoretical and Practical Perspectiv

37 Dec 28, 2022
Unofficial Tensorflow 2 implementation of the paper Implicit Neural Representations with Periodic Activation Functions

Siren: Implicit Neural Representations with Periodic Activation Functions The unofficial Tensorflow 2 implementation of the paper Implicit Neural Repr

Seyma Yucer 2 Jun 27, 2022
MAVE: : A Product Dataset for Multi-source Attribute Value Extraction

The dataset contains 3 million attribute-value annotations across 1257 unique categories on 2.2 million cleaned Amazon product profiles. It is a large, multi-sourced, diverse dataset for product attr

Google Research Datasets 89 Jan 08, 2023
Implement face detection, and age and gender classification, and emotion classification.

YOLO Keras Face Detection Implement Face detection, and Age and Gender Classification, and Emotion Classification. (image from wider face dataset) Ove

Chloe 10 Nov 14, 2022
Includes PyTorch -> Keras model porting code for ConvNeXt family of models with fine-tuning and inference notebooks.

ConvNeXt-TF This repository provides TensorFlow / Keras implementations of different ConvNeXt [1] variants. It also provides the TensorFlow / Keras mo

Sayak Paul 87 Dec 06, 2022
The Dual Memory is build from a simple CNN for the deep memory and Linear Regression fro the fast Memory

Simple-DMA a simple Dual Memory Architecture for classifications. based on the paper Dual-Memory Deep Learning Architectures for Lifelong Learning of

1 Jan 27, 2022
Official repository of DeMFI (arXiv.)

DeMFI This is the official repository of DeMFI (Deep Joint Deblurring and Multi-Frame Interpolation). [ArXiv_ver.] Coming Soon. Reference Jihyong Oh a

Jihyong Oh 56 Dec 14, 2022
Improving 3D Object Detection with Channel-wise Transformer

"Improving 3D Object Detection with Channel-wise Transformer" Thanks for the OpenPCDet, this implementation of the CT3D is mainly based on the pcdet v

Hualian Sheng 107 Dec 20, 2022
An open-source project for applying deep learning to medical scenarios

Auto Vaidya An open source solution for creating end-end web app for employing the power of deep learning in various clinical scenarios like implant d

Smaranjit Ghose 18 May 29, 2022
Implementation of EMNLP 2017 Paper "Natural Language Does Not Emerge 'Naturally' in Multi-Agent Dialog" using PyTorch and ParlAI

Language Emergence in Multi Agent Dialog Code for the Paper Natural Language Does Not Emerge 'Naturally' in Multi-Agent Dialog Satwik Kottur, José M.

Karan Desai 105 Nov 25, 2022
NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration.

NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration.

Xintao 593 Jan 03, 2023
CS_Final_Metal_surface_detection - This is a final project for CoderSchool Machine Learning bootcamp on 29/12/2021.

CS_Final_Metal_surface_detection This is a final project for CoderSchool Machine Learning bootcamp on 29/12/2021. The project is based on the dataset

Cuong Vo 1 Dec 29, 2021
Web-interface + rest API for classification and regression (https://jeff1evesque.github.io/machine-learning.docs)

Machine Learning This project provides a web-interface, as well as a programmatic-api for various machine learning algorithms. Supported algorithms: S

Jeff Levesque 252 Dec 11, 2022
An implementation of a discriminant function over a normal distribution to help classify datasets.

CS4044D Machine Learning Assignment 1 By Dev Sony, B180297CS The question, report and source code can be found here. Github Repo Solution 1 Based on t

Dev Sony 6 Nov 09, 2021
Algorithmic Trading using RNN

Deep-Trading This an implementation adapted from Rachnog Neural networks for algorithmic trading. Part One — Simple time series forecasting and this c

Hazem Nomer 29 Sep 04, 2022
This respository includes implementations on Manifoldron: Direct Space Partition via Manifold Discovery

Manifoldron: Direct Space Partition via Manifold Discovery This respository includes implementations on Manifoldron: Direct Space Partition via Manifo

dayang_wang 4 Apr 28, 2022
QI-Q RoboMaster2022 CV Algorithm

QI-Q RoboMaster2022 CV Algorithm

2 Jan 10, 2022
Pytorch implementation of “Recursive Non-Autoregressive Graph-to-Graph Transformer for Dependency Parsing with Iterative Refinement”

Graph-to-Graph Transformers Self-attention models, such as Transformer, have been hugely successful in a wide range of natural language processing (NL

Idiap Research Institute 40 Aug 14, 2022
Self-driving car env with PPO algorithm from stable baseline3

Self-driving car with RL stable baseline3 Most of the project develop from https://github.com/GerardMaggiolino/Gym-Medium-Post Please check it out! Th

Sornsiri.P 7 Dec 22, 2022
This library is a location of the LegacyLogger for PyTorch Lightning.

neptune-contrib Documentation See neptune-contrib documentation site Installation Get prerequisites python versions 3.5.6/3.6 are supported Install li

neptune.ai 26 Oct 07, 2021