Coder Social home page Coder Social logo

composition_styles's Introduction

Infusing Definiteness into Randomness: Rethinking Composition Styles for Deep Image Matting

This repository includes the official implementation of triplet-style composition & quadruplet-style composition, presented in our paper:
Infusing Definiteness into Randomness: Rethinking Composition Styles for Deep Image Matting
Proceedings of AAAI Conference on Artificial Intelligence (AAAI 2023)
image.png

🏃Author

👤 Zixuan Ye1, Yutong Dai2, Chaoyi Hong1, Zhiguo Cao1, Hao Lu1
🏠1 Huazhong University of Science and Technology, China

🏠2 Australian Institute for Machine Learning, The University of Adelaide, Australia

📑More Information

[paper][video]

🔆Highlights

📘The first to delve into the data generation flow and demonstrate that careful treatment can improve the performance significantly.
📘Explain the problem in NCF and propose a Reasonable Combination of Foregrounds (RCF)
📘Introduce triplet-style composition which builds the relation of source foregrounds and combined foreground.
📘Reveal the property of twin foregrounds and introduce quadruplet-style composition.

✔️Instructions

Our composition styles can be used in any deep matting models. To use our composition styles in your project, you only need follow the steps below:
1️⃣ We need to renew the sample set each epoch, therefore follow the generate_index.ipynb to obtain the foreground list, background list for each epoch. Order list can be used to control whether relevant samples will appear in the same batch or just the same sample set.
2️⃣Use the dataloader.py to generate the dataset with the selected composition styles. The changes are made from L478 to L612.
3️⃣Modify your own training code to load the sample set with generated indexes each epoch.(The code below is an example)

for epoch in range(start_epoch, cfg.TRAIN.num_epochs):
    if cfg.DATASET.composition_style is not None:
        back_list = np.load(file = 'backlist.npy')
        fore_list = np.load(file = 'forelist.npy')
        order_list = np.load(file = 'orderlist.npy') 
        backlist = back_list[epoch]
        forelist = fore_list[epoch]
        trainset = dataset(cfg, phase='train', test_scale='origin', crop_size=cfg.TRAIN.crop_size, back_list = backlist, fore_list = forelist, order_list=order_list)

📚Reported Results

Effectiveness on four baselines

image.png


Reference

IndexNet Matting
GCA Matting
A2U Matting
Matteformer

composition_styles's People

Contributors

zixuan-ye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.