Liebucha Wu2, Shanyuan Liu2, Dawei Leng2,‡, Yuhui Yin2
RevealLayer decomposes an RGB image into multiple RGBA layers, enabling precise layer separation and reliable recovery of occluded content in natural scenes.
For more visual results, go checkout our project page.
- [2026.05] We released the RevealLayer checkpoint on Hugging Face.
- [2026.05] We released the RevealLayer paper and inference code.
- Release RevealLayer-100K and RevealLayerBench.
- Release an improved version of RevealLayer with stronger layer consistency and higher inference efficiency.
RevealLayer focuses on occlusion-aware image layer decomposition, recovering visible and hidden RGBA layers from a single RGB image with region guidance.
We construct a large-scale multi-layer image decomposition dataset, including RevealLayer-100K for training and RevealLayerBench for evaluation. RevealLayer-100K contains 100K multi-layer natural image tuples with RGB images, background layers, RGBA foreground layers, and bounding boxes. RevealLayerBench contains 200 high-quality manually curated images, covering challenging cases such as complex occlusions, large-area objects, transparent materials, small foreground objects, and multi-layer scenes.
🔥 We will release RevealLayer-100K and RevealLayerBench on Hugging Face. We hope they can serve as useful training and evaluation resources for future research on occlusion-aware image layer decomposition.
🚩 The datasets are intended for research use. Please follow the license and terms provided with the released dataset.
We tested our inference code with Python 3.10 and CUDA GPUs.
git clone https://github.com/Zhao0100/RevealLayer.git
cd RevealLayer
conda create -n reveallayer python=3.10
conda activate reveallayer
pip install -r requirements.txt
pip install flash-attn --no-build-isolation
cd diffusers
pip install .
cd ..Model files are hosted with Git LFS, so please enable Git LFS before cloning model repositories.
git lfs installDownload the RevealLayer checkpoint:
git clone https://huggingface.co/qihoo360/RevealLayer models/RevealLayerDownload FLUX.1-dev:
git clone https://huggingface.co/black-forest-labs/FLUX.1-dev models/FLUX.1-devThe expected model directory structure is:
models
├── RevealLayer
│ ├── pytorch_lora_weights.safetensors
│ ├── layer_pe.pt
│ ├── Refiner.pt
│ ├── xvae
│ │ └── transparent_decoder_ckpt.pth
│ └── ...
├── FLUX.1-dev
│ ├── transformer
│ ├── vae
│ ├── text_encoder
│ ├── text_encoder_2
│ ├── tokenizer
│ ├── tokenizer_2
│ └── ...
If your local model directory is different, please modify the corresponding paths in the inference script.
The input JSON should contain a list of samples. Each sample should include the input image path and detected bounding boxes.
Example:
[
{
"imgid": "examples",
"full_image": "RevealLayer-Bench/examples/full_image.png",
"background": "RevealLayer-Bench/examples/background.png",
"LayerInfoRaw": [
"RevealLayer-Bench/examples/layer_0.png",
"RevealLayer-Bench/examples/layer_1.png"
],
"detections": [
{
"bbox": [x1, y1, x2, y2]
},
{
"bbox": [x1, y1, x2, y2]
}
]
}
]The expected fields are:
imgid : sample id
full_image : path to the input RGB image
background : path to the background image, optional for inference
LayerInfoRaw : paths to the ground-truth RGBA layers, optional for inference
detections : detected foreground objects
bbox : bounding box in [x1, y1, x2, y2] format
Run inference with:
bash infer.sh 0Note:
--guidance_scalecontrols the decomposition strength. In our experiments, we use--guidance_scale 1.0, which provides the best background removal performance while preserving background details.
Before running, please make sure the paths in infer.sh and infer.py match your local model and data directories.
If you find our work useful for your research, please consider citing:
@inproceedings{wang2026reveallayer,
title={RevealLayer: Disentangling Hidden and Visible Layers via Occlusion-Aware Image Decomposition},
author={Wang, Binhao and Zhao, Shihao and Cheng, Bo and Ji, Qiuyu and Ma, Yuhang and Wu, Liebucha and Liu, Shanyuan and Leng, Dawei and Yin, Yuhui},
booktitle={International Conference on Machine Learning},
year={2026}
}This project is licensed under the Apache License 2.0.



