Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You Only Erase Once: Erasing Anything without Bringing Unexpected Content [CVPR2026]

Introduction

This repository contains the official implementation of the paper YOEO.

Install

pip3 install -e .

Install Entity:

git clone https://github.com/zyxunh/Entity_for_entity_erasure.git third_party/Entity
cd third_party/Entity/Entityv2
bash init.sh
cd -

download Mask2Former_hornet_3x_576d0b.pth from https://huggingface.co/datasets/qqlu1992/Adobe_EntitySeg/tree/main/CropFormer_model/Entity_Segmentation/Mask2Former_hornet_3x, then modify third_party/Entity/Entityv2/CropFormer/configs/entityv2/entity_segmentation/mask2former_hornet_3x.yaml WEIGHTS to your model path.

Train

Download dataset from https://pan.baidu.com/s/1vEXvw60QbUaR-WB0lxbvCA code: 74rh

cd unhcv/projects/rlhf
# stage1
bash train_rlhf.sh 1 --train_batch_size 10 \
--gradient_accumulation_steps 100 --save_steps 400 --train_steps 800 \
--dataset_config config/dataset_config/dataset.py --model_config config/model_config/yoeo1.yml

# stage2
bash train_rlhf.sh 1 --train_batch_size 7 \
--save_steps 5000 --train_steps 15000 \
--dataset_config config/dataset_config/dataset.py --model_config config/model_config/yoeo2.yml

# stage3
bash train_rlhf.sh 1 --train_batch_size 7 \
--save_steps 1000 --train_steps 3600 \
--dataset_config config/dataset_config/dataset_with_pair0.py --model_config config/model_config/yoeo3.yml

Inference

Download model from https://huggingface.co/unhzyx/yoeo/tree/main

python3 unhcv/projects/rlhf/test.py

Acknowledgements

This project makes use of the following open-source repositories:

We sincerely thank the authors for open-sourcing their valuable work.

Reference

If you use this codebase or models in your research, please consider cite .

@inproceedings{YOEO,
title={You Only Erase Once: Erasing Anything without Bringing Unexpected Content},
author={Zhu, Yixing and Zhang, Qing and Xu, Wenju and Zheng, Wei-Shi},
booktitle={CVPR},
year={2026}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages