This repository is the official PyTorch implementation of our IEEE TCSVT paper "Mirror Detection via Multi-Directional Similarity Perception and Spectral Saliency Enhancement")
The mirror detection datasets can be downloaded here
conda create -n <yourenv_name> python=3.7
conda activate <yourenv_name>
pip3 install torch torchvision torchaudio
pip3 install openmim
mim install mmcv==1.7.1
pip install -e . # or "python setup.py develop"
pip install -r requirements/optional.txt
Please refer to here for the installation of Oriented Response Networks (ORN) related environments
The pretrained weights of Swin-S can be downloaded here
python tools/train.py /configs/m2sd/m2sd_msd.py --load-from pretrain_checkpoint.pth
python tools/test.py /configs/m2sd/m2sd_msd.py ./checkpoint.pth --eval mIoU
python tools/test.py /configs/m2sd/m2sd_msd.py ./checkpoint.pth --show --show-dir save_path
| Dataset | IoU | F | MAE |
|---|---|---|---|
| MSD | 87.11 | 0.936 | 0.032 |
| PMD | 69.77 | 0.846 | 0.024 |
| RGBD-Mirror | 78.60 | 0.904 | 0.030 |
The mirror detection results on test datasets can be downloaded here
If you use this code for your research, please cite our paper:
@article{shao2025mirror,
title={Mirror Detection via Multi-Directional Similarity Perception and Spectral Saliency Enhancement},
author={Shao, Zhiwen and Chen, Rui and Shi, Xuehuai and Liu, Bing and Li, Canlin and Ma, Lizhuang and Yeung, Dit-Yan},
journal={IEEE Transactions on Circuits and Systems for Video Technology},
year={2025},
publisher={IEEE}
}