This repository contains the code and resources for reproducing the main experiments in the TPAMI paper "SEGA: A Transferable Signed Ensemble Gaussian Black-box Attack Method for No-Reference Image Quality Assessment Models."
SEGA.py: Main implementation of the SEGA attack.test_transferability.py: This script evaluates attack performance across different target models. Note: Results are generated directly from float image data and may show minor variations from the paper's reported results, which are based on saved.bmpimages.threatmodels.py: Definitions of NR-IQA threat models used in the experiments.threatmodels_class.py: Model classes for NR-IQA models.livec-test.csv: A CSV file containing image ids and quality labels for testing on the CLIVE dataset.checkpoints/: Directory containing pretrained model checkpoints required for running the attack.
- Python >= 3.7
- PyTorch >= 1.8
- NumPy
- OpenCV
- scikit-image
- Download the LIVEC dataset and place the center-cropped images in the following directory:
'YOUR/PATH/TO/CLIVE/CENTERCROPPED/IMAGES'
Then, update line 89 intest_transferability.pywith this path. - Download the pretrained checkpoints from the provided google drive URL or baidu pan URL and place them in the
checkpoints/directory.
To run the transferability evaluation, use the following command:
python test_transferability.py --target_model DBCNN --source_model_set LIQE,HyperIQA,LinearityIQA --num_samples 10 --smooth_std 10./255