Creating an Alpha Matting Dataset

Need for Complex Images

Deep learning, a sub-field of machine learning, is the optimal solution for image matting. Its effectiveness depends on learning from the provided examples, meaning that the quality and diversity of the training dataset significantly influence the model's accuracy and reliability.

We have developed a method to create high-quality training data for challenging photos. These photos typically feature objects with transparency or objects containing fine details, such as fur.

You can watch the video version of this article:

A Novel Approach to Dataset Generation

Recognizing the gap in existing solutions for generating high-quality image matting datasets, we developed a methodical approach tailored to address these challenges:


Use a tripod to stabilize the camera and set it to full manual mode. This includes fixing the focus, aperture, and shutter speed to ensure consistency across shots.

First Shot

Place the object, which serves as the foreground subject, in the scene and take a photo. Object in the Scene

Second Shot

Position a solid chroma backdrop behind the object. The chosen chroma color should be distinctly different from any colors present in the foreground subject to facilitate easier separation. Take a second photo. Object with Chroma Backdrop

Background Removal

The post-processing stage involves using image editing software like GIMP or Photoshop to eliminate the chroma color and extract the alpha channel. This process ensures that the intricate details of the subject, such as shadows and transparency, are preserved, maintaining the natural look and feel of the original scene.

Background Removal Alpha Channel Extraction


Alpha Matting with Backdrop Toy Example Alpha Matting with Backdrop - Unboxing Example

Benefits: Enhanced Accuracy and Realism

  • Complex Settings: Our method enables the generation of training examples that accurately represent complex settings.
  • High Accuracy: By preserving minute details, the alpha matte produced is of superior quality.
  • Naturalness Over Compositing: Unlike image compositing techniques, our method maintains the natural characteristics of the scene, including shadows and distortions, thus providing a more realistic outcome.


In conclusion, the methodology we have outlined marks a significant advancement in the generation of high-quality image matting datasets. However, it's important to note that due to the intricate and resource-intensive nature of this process, we are unable to publicly share the comprehensive dataset. Nonetheless, we previously released the withoutbg100 Image Matting Dataset, which is also of high quality and contains challenging examples, albeit developed using a different method.