SkillAgentSearch skills...

MPIB

MPIB: An MPI-Based Bokeh Rendering Framework for Realistic Partial Occlusion Effects (ECCV 2022)

Install / Use

/learn @JuewenPeng/MPIB
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MPIB: An MPI-Based Bokeh Rendering Framework for Realistic Partial Occlusion Effects (ECCV 2022)

Juewen Peng<sup>1</sup>, Jianming Zhang<sup>2</sup> Xianrui Luo<sup>1</sup>, Hao Lu<sup>1</sup>, Ke Xian<sup>1*</sup>, Zhiguo Cao<sup>1</sup>,

<sup>1</sup>Huazhong University of Science and Technology, <sup>2</sup>Adobe Research

<p align="center"> <img src=https://user-images.githubusercontent.com/38718148/178954886-9c8bc5bf-fdb2-4bba-bbcc-2b77831884e8.jpg width="90%"> </p>

Project | Paper | Supp | Poster | Video

This repository is the official PyTorch implementation of the ECCV 2022 paper "MPIB: An MPI-Based Bokeh Rendering Framework for Realistic Partial Occlusion Effects".

Installation

git clone https://github.com/JuewenPeng/MPIB.git
cd MPIB
pip install -r requirements.txt

Usage

Download pretrained models from Google Drive or Baidu Netdisk, and put them in the directory checkpoints. Note that we use LaMa as our inpainting model, and inpnet.pth orignates from https://github.com/saic-mdal/lama.

Run the following inference code.

python demo.py --image_path 'inputs/new_11_all-in-focus.jpg' --disp_path 'inputs/new_11_disparity.jpg' --save_dir 'outputs' --K 60 --disp_focus 207/255 --gamma 2.2
  • image_path: path of the input all-in-focus image
  • disp_path: path of the input disparity map (predicted by DPT in this example)
  • save_dir: directory to save the results
  • K: blur parameter
  • disp_focus: refocused disparity (range from 0 to 1)
  • gamma: gamma value

See demo.py for more details.

Citation

If you find our work useful in your research, please cite our paper.

@inproceedings{Peng2022MPIB,
  title = {MPIB: An MPI-Based Bokeh Rendering Framework for Realistic Partial Occlusion Effects},
  author = {Peng, Juewen and Zhang, Jianming and Luo, Xianrui and Lu, Hao and Xian, Ke and Cao, Zhiguo},
  booktitle = {The Proceedings of the European Conference on Computer Vision (ECCV)},
  year = {2022}
}
View on GitHub
GitHub Stars50
CategoryDevelopment
Updated2mo ago
Forks1

Languages

Python

Security Score

95/100

Audited on Jan 22, 2026

No findings