Skip to content

About

Official code for CVPR 2026 paper "BlackMirror: Black-Box Backdoor Detection for Text-to-Image Models via Instruction-Response Deviation"

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Co-Erasing: Collaborative Erasing with Text-Image Prompts

This is the official code for the paper "BlackMirror: Black-Box Backdoor Detection for Text-to-Image Models via Instruction-Response Deviation" accepted by Computer Vision and Pattern Recognition Conference (CVPR 2026).

paper

Paper Title: BlackMirror: Black-Box Backdoor Detection for Text-to-Image Models via Instruction-Response Deviation

Authors: Feiran Li, Qianqian Xu*, Shilong Bao, Zhiyong Yang, Xilin Zhao, Xiaochun Cao, Qingming Huang*

example

Installation

Detection

  • Run:

    CUDA_VISIBLE_DEVICES=0,1,2 python main_detect.py \
    --method BadT2I --trigger $'\u200b' \
    --original dog \
    --target cat \
    --csv_file_path "BadT2I/dog_prompts.csv" \
    --attack_type object

The current script requires three gpus to run: diffusion model, VLM and LLM. You can adjust the code to meet your requirements.

Evaluation

Running evaluate.py with the result csv file can obtain the detection performance.

Citation

If you find this work or repository useful, please cite the following:

@inproceedings{li2026blackmirror,
title={BlackMirror: Black-Box Backdoor Detection for Text-to-Image Models via Instruction-Response Deviation}, 
author={Feiran Li and Qianqian Xu and Shilong Bao and Zhiyong Yang and Xilin Zhao and Xiaochun Cao and Qingming Huang},
booktitle={Proceedings of the IEEE/CVF conference on computer vision and pattern recognition},
year={2026}
}

Contact us

If you have any detailed questions or suggestions, feel free to email us: [email protected]! Thanks for your interest in our work!

About

Official code for CVPR 2026 paper "BlackMirror: Black-Box Backdoor Detection for Text-to-Image Models via Instruction-Response Deviation"

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages