Giter Club home page Giter Club logo

fusionmatting's Introduction

A Late Fusion CNN for Digital Matting


This is the github project for our paper A Late Fusion CNN for Digital Matting.

We provide the supplementary material of our paper here.

Sorry for the inconvience but due to Alibaba's policy we cannot share our human matting dataset currently.

Code, Model & Clarification

You can download the code and model at https://1drv.ms/u/s!AuG441T6ysq5gytUc8LNhwv-MlqY?e=n0cpaU

Please note: In our paper, we used two different datasets: DIM dataset and our human matting dataset.

The model we released is trained on DIM dataset's TRAIN split and finetuned on our human matting dataset's TRAIN split, which consists of DIM human images in the DIM training split + collected training human images.

The state in previous version of Background Matting in CVPR2020 (arXiv: 2004.00626) Section 4.1: 'as the released model was trained on all of the Adobe data, including the test data used here (confirmed by the authors)' is not true.

We thank the authors of Background Matting in CVPR2020 for the quick correction. The arXiv version should be updated soon.

More test cases & Limitation

Our human matting dataset mostly consists of portrait-type images (upper body). About fifth of the images has upper body + around 2/3 of lower body, and only few images has full human body. All of the images are near front view images.

We provide more test cases here and analyse the limitation of our released model.

Good cases

For most images that are simliar to the image setting in our dataset, with relatively salient foreground object, our model could perform well.

test

keanu

photo-1533227268428-f9ed0900fb3b

sunlight-forest

The-Maze-Runner-Actor

Outdoor

Influence of rotation and salient object ratio

Although we used rotation and cropping as our data augmentation, due to insuffcient sampling (we use -15 to +15 degrees of random rotation, and 512*512, 800*800 for cropping), our model is still not very robust to rotation and foregound object's scale.

Also, due to the lack of full body training data, it is also difficult for the model to well handle this kind of images.

Rotation

By rotating the image to the straight position, the model performs better.

Before rotation

191014

After rotation

191014_r

Crop

By cropping the image (keep the foregound object's scale relatively large), the model performs better.

Before cropping

1

a0a1

After cropping

1_crop

a0a1_crop

Full Body

Since the training images are created by composing the foreground and background images, the foregound objects in training images usually looks separate from the background. In addition, we don't have full body images in our training dataset. Thus, for the case shown below, our model gives a bad result: 181204

Test on Background Matting Images

First we want to thank the authors of background matting paper in CVPR2020 for providing the test images.

The images provided by the authors of CVPR 2020 background matting paper are of size 512*512 without keeping the aspect ratio. Thus, we resized them back to resonable aspect ratio before inference.

Our test result is consistent with the background matting paper except the photo in Fig.6(b) in the paper (bgm_images/135_org.png). The different size of the image the might be the reason of the different performance.

We'll test the original images once the test videos are released.

Good cases

25_org

39_org

78_org

86_org

135_org

150_org

Bad cases

We don't have back view images in our training data, thus our model cannot handle these two cases.

50_org

72_org

Contact

Please contact us ([email protected]) using the email address assigned by your organization.

fusionmatting's People

Contributors

yunkezhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fusionmatting's Issues

Dataset examples

Hello!

Can you provide, please, 1 or 2 dataset samples (img, mask) as an example?

Thank you!

Different resize methods influence the result infered a lot.

I found that in the training process, the image is resized by skimage.transform.resize method. In infer stage, if the resized method is one of cv2 inter cubic, area, ..., the matting result is worse normally. I want to know is it normal? I am a fresher in DL

Automating Banner Design效果怎么样?

你好,非常感谢作者的论文Layout Style Modeling for Automating Banner Design,请问这个效果怎么样?可以应用在产品上吗?请问目前还有其他的高效算法吗?准备调研Automate Banner Design,找到的资料比较少,请作者帮忙解答,谢谢!

dataset request

Hi, I sent an email to request for the dataset and code of the paper, I sincerely hope you can permit my download requests:)

results on group images

good day and congratulations for your great work,
I have been testing it with more generic human pictures (like groups of people with overlapping of limbs), and the results are not very good (using your pretrained model that you provided). Is this because your datasets are focused on just portrait pics of single people?
to work with these kind of human group pictures do you think that I would need to retrain the model with something like COCO or similar?

thank you for any tips :)

low resolution leads to bad result

hello, I used your model to infer a picture from the internet, however, low resolution picture seems to work bad, but high resolution picture works well, and I read your paper, you paper say the network works well for various poses and scales of human in the foreground, do you know what is the reason of bad results in low resolution images?

AttributeError: 'Tensor' object has no attribute '_keras_history'

Hi, I encountered this error when I tried to train on my toy datasets, do you have any idea why? Thanks a Lot !!

It seemed to be some problem when building the Fusion model, the inference stage and the classifier training are all good.

By the way, I'm running under keras==2.1.6, tensorflow==1.10 according to the readme file.

Traceback (most recent call last): File "main.py", line 1136, in <module> model_dir=args.logs) File "main.py", line 138, in __init__ self.keras_model = self.build(mode=mode, config=config) File "main.py", line 332, in build model = KM.Model(inputs, outputs, name='fusion_network') File "/home/wm/anaconda3/envs/mpe/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/wm/anaconda3/envs/mpe/lib/python3.6/site-packages/keras/engine/topology.py", line 1734, in __init__ build_map_of_graph(x, finished_nodes, nodes_in_progress) File "/home/wm/anaconda3/envs/mpe/lib/python3.6/site-packages/keras/engine/topology.py", line 1724, in build_map_of_graph layer, node_index, tensor_index) File "/home/wm/anaconda3/envs/mpe/lib/python3.6/site-packages/keras/engine/topology.py", line 1695, in build_map_of_graph layer, node_index, tensor_index = tensor._keras_history AttributeError: 'Tensor' object has no attribute '_keras_history'

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.