Background Matting: The World is Your Green Screen

Overview

Background Matting: The World is Your Green Screen

alt text

By Soumyadip Sengupta, Vivek Jayaram, Brian Curless, Steve Seitz, and Ira Kemelmacher-Shlizerman

This paper will be presented in IEEE CVPR 2020.

Project Page

Go to Project page for additional details and results.

Paper (Arxiv)

Blog Post

Background Matting v2.0

We recently released a brand new background matting project: better quality and REAL-TIME performance (30fps at 4K and 60fps at FHD)! You can now use this with Zoom! Much better quality! We tried this on a Linux machine with a GPU.

Check out the code!

Project members

Acknowledgement: Andrey Ryabtsev, University of Washington

License

This work is licensed under the Creative Commons Attribution NonCommercial ShareAlike 4.0 License.

Summary

Updates

April 21, 2020:

April 20,2020

April 9, 2020

  • Issues:
    • Updated alignment function in pre-processing code. Python version uses AKAZE features (SIFT and SURF is not available with opencv3), MATLAB version also provided uses SURF features.
  • New features:

April 8, 2020

  • Issues:
    • Turning off adjustExposure() for bias-gain correction in test_pre_processing.py. (Bug found, need to be fixed)
    • Incorporating 'uncropping' operation in test_background-matting_image.py. (Output will be of same resolution and aspect-ratio as input)

Getting Started

Clone repository:

git clone https://github.com/senguptaumd/Background-Matting.git

Please use Python 3. Create an Anaconda environment and install the dependencies. Our code is tested with Pytorch=1.1.0, Tensorflow=1.14 with cuda10.0

conda create --name back-matting python=3.6
conda activate back-matting

Make sure CUDA 10.0 is your default cuda. If your CUDA 10.0 is installed in /usr/local/cuda-10.0, apply

export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
export PATH=$PATH:/usr/local/cuda-10.0/bin

Install PyTorch, Tensorflow (needed for segmentation) and dependencies

conda install pytorch=1.1.0 torchvision cudatoolkit=10.0 -c pytorch
pip install tensorflow-gpu==1.14.0
pip install -r requirements.txt

Note: The code is likely to work on other PyTorch and Tensorflow versions compatible with your system CUDA. If you already have a working environment with PyTorch and Tensorflow, only install dependencies with pip install -r requirements.txt. If our code fails due to different versions, then you need to install specific CUDA, PyTorch and Tensorflow versions.

Run the inference code on sample images

Data

To perform Background Matting based green-screening, you need to capture:

  • (a) Image with the subject (use _img.png extension)
  • (b) Image of the background without the subject (use _back.png extension)
  • (c) Target background to insert the subject (place in data/background)

Use sample_data/ folder for testing and prepare your own data based on that. This data was collected with a hand-held camera.

Pre-trained model

Please download the pre-trained models from Google Drive and place Models/ folder inside Background-Matting/.

Note: syn-comp-adobe-trainset model was trained on the training set of the Adobe dataset. This was the model used for numerical evaluation on Adobe dataset.

Pre-processing

  1. Segmentation

Background Matting needs a segmentation mask for the subject. We use tensorflow version of Deeplabv3+.

cd Background-Matting/
git clone https://github.com/tensorflow/models.git
cd models/research/
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
cd ../..
python test_segmentation_deeplab.py -i sample_data/input

You can replace Deeplabv3+ with any segmentation network of your choice. Save the segmentation results with extension _masksDL.png.

  1. Alignment

Skip this step, if your data is captured with fixed-camera.

  • For hand-held camera, we need to align the background with the input image as a part of pre-processing. We apply simple hoomography based alignment.
  • We ask users to disable the auto-focus and auto-exposure of the camera while capturing the pair of images. This can be easily done in iPhone cameras (tap and hold for a while).

Run python test_pre_process.py -i sample_data/input for pre-processing. It aligns the background image _back.png and changes its bias-gain to match the input image _img.png

We used AKAZE features python code (since SURF and SIFT unavilable in opencv3) for alignment. We also provide an alternate MATLAB code (test_pre_process.m), which uses SURF features. MATLAB code also provides a way to visualize feature matching and alignment. Bad alignment will produce bad matting output. Bias-gain adjustment is turned off in the Python code due to a bug, but it is present in MATLAB code. If there are significant exposure changes between the captured image and the captured background, use bias-gain adjustment to account for that.

Feel free to write your own alignment code, choose your favorite feature detector, feature matching and alignment.

Background Matting

python test_background-matting_image.py -m real-hand-held -i sample_data/input/ -o sample_data/output/ -tb sample_data/background/0001.png

For images taken with fixed camera (with a tripod), choose -m real-fixed-cam for best results. -m syn-comp-adobe lets you use the model trained on synthetic-composite Adobe dataset, without real data (worse performance).

Run the inference code on sample videos

This is almost exactly similar as that of the image with few small changes.

Data

To perform Background Matting based green-screening, you need to capture:

  • (a) Video with the subject (teaser.mov)
  • (b) Image of the background without the subject (use teaser_back.png extension)
  • (c) Target background to insert the subject (place in target_back.mov)

We provide sample_video/ captured with hand-held camera and sample_video_fixed/ captured with fixed camera for testing. Please download the data and place both folders under Background-Matting. Prepare your own data based on that.

Pre-processing

  1. Frame extraction:
cd Background-Matting/sample_video
mkdir input background
ffmpeg -i teaser.mov input/%04d_img.png -hide_banner
ffmpeg -i target_back.mov background/%04d.png -hide_banner

Repeat the same for sample_video_fixed

  1. Segmentation
cd Background-Matting/models/research/
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
cd ../..
python test_segmentation_deeplab.py -i sample_video/input

Repeat the same for sample_video_fixed

  1. Alignment

No need to run alignment for sample_video_fixed or videos captured with fixed-camera.

Run python test_pre_process_video.py -i sample_video/input -v_name sample_video/teaser_back.png for pre-processing. Alternately you can also use test_pre_process_video.m in MATLAB.

Background Matting

For hand-held videos, like sample_video:

python test_background-matting_image.py -m real-hand-held -i sample_video/input/ -o sample_video/output/ -tb sample_video/background/

For fixed-camera videos, like sample_video_fixed:

python test_background-matting_image.py -m real-fixed-cam -i sample_video_fixed/input/ -o sample_video_fixed/output/ -tb sample_video_fixed/background/ -b sample_video_fixed/teaser_back.png

To obtain the video from the output frames, run:

cd Background-Matting/sample_video
ffmpeg -r 60 -f image2 -i output/%04d_matte.png -vcodec libx264 -crf 15 -s 1280x720 -pix_fmt yuv420p teaser_matte.mp4
ffmpeg -r 60 -f image2 -i output/%04d_compose.png -vcodec libx264 -crf 15 -s 1280x720 -pix_fmt yuv420p teaser_compose.mp4

Repeat same for sample_video_fixed

Notes on capturing images

For best results capture images following these guidelines:

  • Choose a background that is mostly static, can be both indoor and outdoor.
  • Avoid casting any shadows of the subject on the background.
    • place the subject atleast few feets away from the background.
    • if possible adjust the lighting to avoid strong shadows on the background.
  • Avoid large color coincidences between subject and background. (e.g. Do not wear a white shirt in front of a white wall background.)
  • Lock AE/AF (Auto-exposure and Auto-focus) of the camera.
  • For hand-held capture, you need to:
    • allow only small camera motion by continuing to holding the camera as the subject exists the scene.
    • avoid backgrounds that has two perpendicular planes (homography based alignment will fail) or use a background very far away.
    • The above restirctions do not apply for images captured with fixed camera (on a tripod)

Training on synthetic-composite Adobe dataset

Data

  • Download original Adobe matting dataset: Follow instructions.
  • Separate human images: Use test_data_list.txt and train_data_list.txt in Data_adobe to copy only human subjects from Adobe dataset. Create folders fg_train, fg_test, mask_train, mask_test to copy foreground and alpha matte for test and train data separately. (The train test split is same as the original dataset.) You can run the following to accomplish this:
cd Data_adobe
./prepare.sh /path/to/adobe/Combined_Dataset
  • Download background images: Download MS-COCO images and place it in bg_train and in bg_test.
  • Compose Adobe foregrounds onto COCO for the train and test sets. This saves the composed result as _comp and the background as _back under merged_train and merged_test. It will also create a CSV to be used by the training dataloader. You can pass --workers 8 to use e.g. 8 threads, though it will use only one by default.
python compose.py --fg_path fg_train --mask_path mask_train --bg_path bg_train --out_path merged_train --out_csv Adobe_train_data.csv
python compose.py --fg_path fg_test --mask_path mask_test --bg_path bg_test --out_path merged_test

Training

Change number of GPU and required batch-size, depending on your platform. We trained the model with 512x512 input (-res flag).

CUDA_VISIBLE_DEVICES=0,1 python train_adobe.py -n Adobe_train -bs 4 -res 512

Notes:

  • 512x512 is the maximum input resolution we recommend for training
  • If you decreasing training resolution to 256x256, change -res 256, but we also recommend using lesser residual blocks. Use: -n_blocks1 5 -n_blocks2 2.

Cheers to the unofficial Deep Image Matting repo.

Training on unlabeled real videos

Data

Please download our captured videos.. We will show next how to finetune your model on fixed-camera captured videos. It will be similar for hand-held cameras, except you will need to align the captured background image to each frame of the video separately. (Take a hint from test_pre_process.py and use alignImages().)

Data Pre-processing:

  • Extract frames for each video: ffmpeg -i $NAME.mp4 $NAME/%04d_img.png -hide_banner
  • Run Segmentation (follow instructions on Deeplabv3+) : python test_segmentation_deeplab.py -i $NAME
  • Target background for composition. For self-supervised learning we need some target backgrounds that has roughly similar lighting as the original videos. Either capture few videos of indoor/outdoor scenes without humans or use our captured background in the background folder.
  • Create a .csv file Video_data_train.csv with each row as: $image;$captured_back;$segmentation;$image+20frames;$image+2*20frames;$image+3*20frames;$image+4*20frames;$target_back. The process is automated by prepare_real.py -- take a look inside and change background_path and path before running.

Training

Change number of GPU and required batch-size, depending on your platform. We trained the model with 512x512 input (-res flag).

CUDA_VISIBLE_DEVICES=0,1 python train_real_fixed.py -n Real_fixed -bs 4 -res 512 -init_model Models/syn-comp-adobe-trainset/net_epoch_64.pth

Dataset

We captured videos with both fixed and hand-held camera in indoor and outdoor settings. We release this data to encourage future research on improving background matting. The data is released for research purposes only.

Download data

Google Colab

Thanks to Andrey Ryabstev for creating Google Colab version for easy inference on images and videos of your choice.

Google Colab

Notes

We are eager to hear how our algorithm works on your images/videos. If the algorithm fails on your data, please feel free to share it with us at [email protected]. This will help us in improving our algorithm for future research. Also, feel free to share any cool results.

Citation

If you use this code for your research, please consider citing:

@InProceedings{BMSengupta20,
  title={Background Matting: The World is Your Green Screen},
  author = {Soumyadip Sengupta and Vivek Jayaram and Brian Curless and Steve Seitz and Ira Kemelmacher-Shlizerman},
  booktitle={Computer Vision and Pattern Regognition (CVPR)},
  year={2020}
}

Related Implementations

Microsoft Virtual Stage: Using our background matting technology along with depth sensing with Kinect, Microsoft opensourced this amazing code for virtual staging. Follow this link for details of their technique.

Weights & Biases: Great presentation and detailed discussions and insights on pre-processing and training our model. Check out Two Minutes Paper's take on our work.

Comments
  • Self supervised target background for composition

    Self supervised target background for composition

    Hi, first of all great work!

    I'm testing your fixed-camera model on full body standing videos (with a fixed camera obviously) and, although is pretty good, there are still some errors in feet, near hands and between the legs.

    After reading your post on towardsdatascience, I've retrained your final model with a couple of these videos, but, contrary to what I expected, the resulting inference has been slightly worse. I'm using the captured bacgrounds provided.

    According to documentation, target backgrounds should have roughly similar lighting as the original videos. Could that be the cause? If that so, how could I create backgrounds with similar light as the video I'm trying to process?

    Alpha mask with original fixed-cam model: 0001_out

    Alpha mask with retrained model: 0001_out

    Original Image: 0001_img

    opened by emepetres 10
  • Why reimplemented results are so terrible?

    Why reimplemented results are so terrible?

    Following README.md, I re-implement test phase using sampled data(author offered)and real-fixed-cam model file. The results from deeplabV3 is good , but the matting results are pretty bad, is author upload a wrong model file?

    img_seg fg

    opened by tczuo 10
  • Colab notebook

    Colab notebook

    opened by loretoparisi 9
  • windows env conda support?

    windows env conda support?

    How to run on windows? seems path problem

    Background-Matting-master\Models\real-fixed-cam>export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim 'export' is not recognized as an internal or external command, operable program or batch file.

    Can it be work in google colab?

    opened by bitcoin5000 5
  • Output foreground vs original foreground

    Output foreground vs original foreground

    Hi, question:

    What's the difference between the output foreground, and let's say getting original pixels * (alpha > 0.95)? Is the network changing somehow the color information in the output?

    Thanks!

    good first issue 
    opened by emepetres 4
  • shape miss,After Update(4.8)

    shape miss,After Update(4.8)

    CUDA Device: 0 Using image mode Traceback (most recent call last): File "test_background-matting_image.py", line 179, in comp_im_tr1=composite4(fg_out0,back_img10,alpha_out0) File "/content/drive/My Drive/Background-Matting/functions.py", line 8, in composite4 im = alpha * fg + (1 - alpha) * bg ValueError: operands could not be broadcast together with shapes (1080,1920,1) (1080,1980,3)

    background/0002.png miss. 0001.png is ok.

    opened by jjandnn 4
  • Very cool technology, is there hope to be implemented on the mobile terminal (iOS / Android)?

    Very cool technology, is there hope to be implemented on the mobile terminal (iOS / Android)?

    Very cool technology, is there hope to be implemented on the mobile terminal (iOS / Android)? Or are there any ideas or reference programs that can be used for reference.

    Thank you very much!

    English is not my native language; please excuse typing errors.

    opened by Jinxiansen 3
  • weird output from image pre processing

    weird output from image pre processing

    download I took pictures with my iPhone7. It was a JPG so I just renamed it to the .png extension. It was upside down when I uploaded it (something got to do with the metadata at the point of capture). This was my output from the preprocessing script.

    opened by gordon-lim 3
  • Crop Area differences between frames in sequence, may be related to aberrations in mask.

    Crop Area differences between frames in sequence, may be related to aberrations in mask.

    First off, This tool works very well in the situation that you describe and on the sample data. Also, the directions are good enough that I was able to run the sample as well as try my own data. Congratulations to that. One thing that is missing from many projects is good directions.

    That said, it looks like minor differences in the categorization maskDL for each frame of the video may be causing the composited result frame to be cropped/resized differently. 146 147

    I exported a video to PNG images as well as the same background for each frame. The camera is on a tripod so I used the real-fixed-cam model. I then ran the procedure with a solid green background so I can key the background out later.

    This worked mostly exactly as the sample data but but there was a reflection against an appliance that made some aberrations in the deeplab mask.

    This may have caused the subject focus to change between frames and 're-centered' the frame around the subject. In some cases, it resized the subject in one dimension only making some frames with the subject 'thin/compressed' and others with the subject normal.

    opened by Teravus 3
  • Everyday objects | Looking for suggestions

    Everyday objects | Looking for suggestions

    Following are the images I provided. Image: mug_img Background: mug_back Target Background: target I used Facebook's Detectron2 to get the mask. The mask is clearly not good. mug_masksDL following are the results that I got. Compose: mug_compose Foreground: mug_fg Matte: mug_matte out: mug_out

    I'm thinking of retraining the Adobe network on all 450 images instead just the non-transparent ones as mentioned in the paper. I'm also in search of a better segmentation model. One that is trained on everyday objects instead of just humans. Please let me know if you're aware of any.

    Do you have any other suggestions that I should look into? Please let me know, thanks!

    opened by sixftninja 2
  • Assertion failed

    Assertion failed

    There is no problem in running the alignment part of the demo.What is the reason for the following error when running my own picture?

    python test_pre_process.py -i sample_data/my_photo/

    Traceback (most recent call last): File "test_pre_process.py", line 108, in back_align = alignImages(back, image,mask) File "test_pre_process.py", line 42, in alignImages im1Reg = cv2.warpPerspective(im1, h, (width, height)) cv2.error: OpenCV(3.4.5) /io/opencv/modules/imgproc/src/imgwarp.cpp:2927: error: (-215:Assertion failed) (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 3 && M0.cols == 3 in function 'warpPerspective'

    opened by shxiangyan 2
  • Bump pillow from 6.1 to 9.3.0

    Bump pillow from 6.1 to 9.3.0

    Bumps pillow from 6.1 to 9.3.0.

    Release notes

    Sourced from pillow's releases.

    9.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.3.0 (2022-10-29)

    • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

    • Initialize libtiff buffer when saving #6699 [radarhere]

    • Inline fname2char to fix memory leak #6329 [nulano]

    • Fix memory leaks related to text features #6330 [nulano]

    • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

    • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

    • Fixed set_variation_by_name offset #6445 [radarhere]

    • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

    • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

    • Added ExifTags enums #6630 [radarhere]

    • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

    • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

    • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

    • Added GPS TIFF tag info #6661 [radarhere]

    • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

    • Do not attempt normalization if mode is already normal #6644 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump numpy from 1.17.0 to 1.22.0

    Bump numpy from 1.17.0 to 1.22.0

    Bumps numpy from 1.17.0 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump opencv-python from 3.4.5.20 to 4.2.0.32

    Bump opencv-python from 3.4.5.20 to 4.2.0.32

    Bumps opencv-python from 3.4.5.20 to 4.2.0.32.

    Release notes

    Sourced from opencv-python's releases.

    4.2.0.32

    OpenCV version 4.2.0.

    Changes:

    • macOS environment updated from xcode8.3 to xcode 9.4
    • macOS uses now Qt 5 instead of Qt 4
    • Nasm version updated to Docker containers
    • multibuild updated

    Fixes:

    • don't use deprecated brew tap-pin, instead refer to the full package name when installing #267
    • replace get_config_var() with get_config_vars() in setup.py #274
    • add workaround for DLL errors in Windows Server #264

    3.4.9.31

    OpenCV version 3.4.9.

    Changes:

    • macOS environment updated from xcode8.3 to xcode 9.4
    • macOS uses now Qt 5 instead of Qt 4
    • Nasm version updated to Docker containers
    • multibuild updated

    Fixes:

    • don't use deprecated brew tap-pin, instead refer to the full package name when installing #267
    • replace get_config_var() with get_config_vars() in setup.py #274
    • add workaround for DLL errors in Windows Server #264

    4.1.2.30

    OpenCV version 4.1.2.

    Changes:

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Using sample data does not achieve the effect in the paper

    Using sample data does not achieve the effect in the paper

    Hi First,thanks a lot for the source code. When I follow the README to test the sample_video_fixed data downloaded from Google drive,it did not separate the portrait from the background well, and there was still a part of the background remaining in the segmentation. What can I do to make it work better? Thanks again.

    opened by Ligouhi 0
  • Could he be trained to split other things, such as supermarket goods?

    Could he be trained to split other things, such as supermarket goods?

    I want to train him with the data set of supermarket goods, but I don't know how to use the trained file. Which file should I replace with the trained.pth file?

    opened by yzew 0
Real-Time High-Resolution Background Matting

Real-Time High-Resolution Background Matting Official repository for the paper Real-Time High-Resolution Background Matting. Our model requires captur

Peter Lin 6.1k Jan 3, 2023
PyMatting: A Python Library for Alpha Matting

Given an input image and a hand-drawn trimap (top row), alpha matting estimates the alpha channel of a foreground object which can then be composed onto a different background (bottom row).

PyMatting 1.4k Dec 30, 2022
Github project for Attention-guided Temporal Coherent Video Object Matting.

Attention-guided Temporal Coherent Video Object Matting This is the Github project for our paper Attention-guided Temporal Coherent Video Object Matti

null 71 Dec 19, 2022
[IJCAI'21] Deep Automatic Natural Image Matting

Deep Automatic Natural Image Matting [IJCAI-21] This is the official repository of the paper Deep Automatic Natural Image Matting. Introduction | Netw

Jizhizi_Li 316 Jan 6, 2023
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Peter Lin 6.5k Jan 4, 2023
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting (RVM) English | 中文 Official repository for the paper Robust High-Resolution Video Matting with Temporal Guidance. RVM is specific

flow-dev 2 Aug 21, 2022
MODNet: Trimap-Free Portrait Matting in Real Time

MODNet is a model for real-time portrait matting with only RGB image input.

Zhanghan Ke 2.8k Dec 30, 2022
Video Matting Refinement For Python

Video-matting refinement Library (use pip to install) scikit-image numpy av matplotlib Run Static background python path_to_video.mp4 Moving backgroun

null 3 Jan 11, 2022
Official implementation of the paper "Lightweight Deep CNN for Natural Image Matting via Similarity Preserving Knowledge Distillation"

Lightweight-Deep-CNN-for-Natural-Image-Matting-via-Similarity-Preserving-Knowledge-Distillation Introduction Accepted at IEEE Signal Processing Letter

DongGeun-Yoon 19 Jun 7, 2022
Rethinking Portrait Matting with Privacy Preserving

Rethinking Portrait Matting with Privacy Preserving This is the official repository of the paper Rethinking Portrait Matting with Privacy Preserving.

null 184 Jan 3, 2023
Automatic Image Background Subtraction

Automatic Image Background Subtraction This repo contains set of scripts for automatic one-shot image background subtraction task using the following

Oleg Sémery 6 Dec 5, 2022
A Web API for automatic background removal using Deep Learning. App is made using Flask and deployed on Heroku.

Automatic_Background_Remover A Web API for automatic background removal using Deep Learning. App is made using Flask and deployed on Heroku. ?? https:

Gaurav 16 Oct 29, 2022
PyTorch implementation of ''Background Activation Suppression for Weakly Supervised Object Localization''.

Background Activation Suppression for Weakly Supervised Object Localization PyTorch implementation of ''Background Activation Suppression for Weakly S

null 35 Jan 6, 2023
Codes for the paper Contrast and Mix: Temporal Contrastive Video Domain Adaptation with Background Mixing

Contrast and Mix (CoMix) The repository contains the codes for the paper Contrast and Mix: Temporal Contrastive Video Domain Adaptation with Backgroun

Computer Vision and Intelligence Research (CVIR) 13 Dec 10, 2022
Feedback is important: response-aware feedback mechanism for background based conversation

RFM The code for the paper: "Feedback is important: response-aware feedback mechanism for background based conversation." Requirements python 3.7 pyto

Jiatao Chen 2 Sep 29, 2022
RobustVideoMatting and background composing in one model by using onnxruntime.

RVM_onnx_compose RobustVideoMatting and background composing in one model by using onnxruntime. Usage pip install -r requirements.txt python infer_cam

Quantum Liu 4 Apr 7, 2022
In this project, we'll be making our own screen recorder in Python using some libraries.

Screen Recorder in Python Project Description: In this project, we'll be making our own screen recorder in Python using some libraries. Requirements:

Hassan Shahzad 4 Jan 24, 2022