---
title: RASR-Flickr30 Benchmark
url: https://www.emergentmind.com/topics/rasr-flickr30
type: topic
---

# RASR-Flickr30 Benchmark

RASR-Flickr30 is the first public benchmark specifically designed for Retrieval-Augmented Super Resolution (RASR). Introduced together with RASRNet, it departs from prior Reference-based Super Resolution settings that rely on manually curated target-reference image pairs by providing per-category reference databases that support open-world retrieval. The benchmark focuses on 30 animal species, with each species serving both as a target class for low-quality/high-quality (LQ/HQ) pairs and as a category for a standalone reference database [2508.09449].

## 1. Benchmark definition and design rationale

RASR-Flickr30 was constructed to study a practical RefSR regime in which a system is given only a low-quality input and must retrieve semantically relevant high-resolution references from a database before restoration. In the formulation introduced with the benchmark, the task is to restore $x_{LQ}$ conditioned on retrieved references rather than on a manually paired exemplar:

$$
\mathrm{RASR}(x_{LQ}) = \mathcal{G}(x_{LQ}, R(x_{LQ})),
$$

where $R(x_{LQ}) \subseteq \mathcal{D}_{ref}$ is the retrieval function [2508.09449].

The dataset design reflects this problem definition. Unlike prior datasets with fixed target-reference pairs, RASR-Flickr30 provides per-category reference databases to support open-world retrieval. The stated motivation is practical deployment in settings such as mobile photos taken in environments like zoos or museums, where category-specific reference data can be readily collected or pre-curated. This framing places the benchmark at the intersection of semantic retrieval, reference-based image restoration, and diffusion-based super-resolution, with the retrieval stage treated as a first-class component rather than a preprocessing convenience.

## 2. Dataset construction, composition, and preprocessing

The source of the imagery is Flickr.com, with collection prioritizing high-resolution, aesthetically pleasing animal photographs. Filtering criteria were visual clarity, photographic quality, and correct species label. The benchmark contains 30 categories, each corresponding to a species [2508.09449].

| Component | Per-category count | Total |
|---|---:|---:|
| Target images | 45 per species | 1,350 images |
| Reference images | $\sim 100$ per species | 3,000 images |

For the target set, each species contributes 45 images, split into 40 train and 5 test. The resulting train set comprises $30 \times 40 = 1{,}200$ HQ-LQ pairs, while the validation/test set comprises $30 \times 5 = 150$ HQ-LQ pairs. The same reference pool is used, held out from target images. This structure makes the benchmark category-organized rather than pair-organized, which is central to its retrieval-augmented character.

LQ-HQ pair generation follows the same degradation pipeline as Real-ESRGAN, specifically random blur, noise, JPEG compression, and downsampling. For each HQ target image, its LQ version is generated through that pipeline. During training, HQ targets and references are cropped into $768 \times 768$ patches. The protocol then pre-retrieves top-5 references by cosine similarity in embedding space per HQ and randomly samples one per iteration; for each sampled reference, $512 \times 512$ patches are randomly cropped from HQ and reference. Augmentation consists of random horizontal flipping and rotation. These design choices indicate that retrieval is integrated into the training protocol rather than appended only at inference time.

## 3. Retrieval formulation and reference database organization

The retrieval function is defined as top-$K$ nearest neighbors under cosine similarity in an embedding space $f(\cdot)$:

$$
R(x_{LQ}) = \{r_i\}_{i=1}^{K},
$$

with

$$
r_i = \arg\max_{r \in \mathcal{D}_{ref} \setminus \{r_1 \dots r_{i-1}\}} \mathrm{Sim}(f(x_{LQ}), f(r)),
$$

and

$$
\mathrm{Sim}(u,v) = \frac{u \cdot v}{\|u\| \|v\|}.
$$

The semantic reference retriever uses a pretrained DINOv2 vision transformer as the feature extractor $f(\cdot)$. Offline, all reference images $r \in \mathcal{D}_{ref}$ are encoded and their embeddings are stored in a vector database, Qdrant. Online, the LQ input is encoded to $f(x_{LQ})$, cosine similarity is computed against stored embeddings, and the top-$K$ references are retrieved. The selected retrieval set is denoted $\mathcal{R} = R(x_{LQ})$, with $K = 1$ at test time and $K = 5$ during train pre-selection [2508.09449].

This arrangement is significant because it makes retrieval quality a measurable factor in restoration quality. The benchmark therefore does not only evaluate reconstruction from degraded inputs; it also evaluates the quality of semantic indexing and nearest-neighbor selection under realistic database search.

## 4. Baseline system: RASRNet

RASRNet is the baseline model proposed alongside RASR-Flickr30. Its architecture is summarized as RIRR (retriever) plus RefDSR (generator). RefDSR is built on a pretrained latent diffusion SISR model with a frozen VAE encoder $\mathcal{E}$, decoder $\mathcal{D}$, and UNet $\mathcal{F}$. Reference conditioning is injected through a ControlNet branch $\mathcal{F}^{REF}_{\theta}$ with LoRA adapters [2508.09449].

Conditioning combines text and visual reference signals. Separate captions $c_{LR}$ and $c_{REF}$ are extracted for the LQ input and each retrieved reference, then concatenated as $c_{text}$. Reference features are defined as

$$
z_{REF} = \mathcal{E}^{REF}(I_{REF}), \qquad h_{REF} = \mathcal{F}^{REF}_{\theta}(z_{REF}).
$$

Fusion occurs in the UNet decoder at the first three blocks $i \in \{0,1,2\}$. During training,

$$
\hat f_{\mathrm{UNet}}^{\,i} = f_{\mathrm{UNet}}^{\,i} + f_{\mathrm{ControlNet}}^{\,i},
$$

and during inference, balanced fusion is used:

$$
\hat f_{\mathrm{UNet}}^{\,i} = f_{\mathrm{UNet}}^{\,i} + 0.5 \cdot f_{\mathrm{ControlNet}}^{\,i}.
$$

The final decoder block uses cross-attention to $c_{text}$. The denoising objective is given as

$$
\nabla_{\theta} \mathcal{L}_{denoise}
=
E_{t, I_{GT}, \epsilon}
\left[
\|\epsilon - \epsilon_{\theta}(z_t, t, c)\|_2^2
\right].
$$

Additional loss terms are an MSE loss,

$$
L_{MSE} = \|\hat I_{HR} - I_{GT}\|_2^2,
$$

a perceptual LPIPS loss,

$$
L_{LPIPS} = LPIPS(\hat I_{HR}, I_{GT}),
$$

a GAN loss with a DINO-based discriminator,

$$
L_{GAN} = E[-\log D(\hat I_{HR})],
$$

and a Gram loss,

$$
L_{Gram} =
\sum_{\ell \in \mathcal{L}}
\lambda_{\ell}
\frac{1}{C_{\ell} H_{\ell} W_{\ell}}
\|G_{\ell}(\hat I_{HR}) - G_{\ell}(I_{GT})\|_2^2,
$$

where $G_{\ell}(\cdot)$ is the Gram matrix of VGG-16 layer $\ell$. The total training loss is

$$
\mathcal{L}
=
L_{MSE}
+
\lambda_{LPIPS} L_{LPIPS}
+
\lambda_{Gram} L_{Gram}
+
\lambda_{GAN} L_{GAN}.
$$

The model therefore combines latent diffusion restoration, semantic retrieval, and explicit reference-conditioned control. A plausible implication is that the benchmark is intended not merely for conventional SR scoring, but for studying how retrieval quality, conditioning strength, and perceptual losses interact.

## 5. Quantitative results and ablation structure

On the RASR-Flickr30 test set, the reported comparison is against OSEDiff as baseline. RASRNet improves PSNR, SSIM, MUSIQ, and CLIPIQA, while reducing LPIPS, DISTS, FID, and NIQE [2508.09449].

| Metric | OSEDiff | RASRNet |
|---|---:|---:|
| PSNR | 23.29 | 23.67 |
| SSIM | 0.5624 | 0.5687 |
| LPIPS | 0.3404 | 0.3273 |
| FID | 65.59 | 56.83 |

The paper summarizes these gains as $+0.38$ dB PSNR and $-0.0131$ LPIPS, with more realistic textures. Qualitative examples include a puffin case in which a retrieved puffin eye image is used to reconstruct realistic iris patterns, and a peacock case in which intricate feather patterns are injected more effectively than in diffusion-only methods.

Ablation studies examine prompt conditioning, loss composition, and retrieval encoder choice. For text prompt conditioning with $K=1$ retrieval, the combination REF + LR yields PSNR $23.67$, LPIPS $0.3273$, FID $56.83$, and CLIPIQA $0.7706$, outperforming the no-prompt, LR-only, and REF-only variants. For loss components, the joint use of Gram and GAN losses yields the best CLIPIQA, with the configuration $\lambda_{Gram}=\checkmark$, $\lambda_{GAN}=\checkmark$ giving PSNR $23.67$, FID $56.83$, NIQE $4.1139$, and CLIPIQA $0.7706$. For retrieval encoder comparison, random retrieval is clearly worse than VGG16, CLIP, and DINOv2, while DINOv2 is the selected retriever in the final system. Additional evaluation on the WR-SR test set reports RASRNet at PSNR $21.92$, SSIM $0.5761$, LPIPS $0.3254$, FID $57.82$, and NIQE $3.6509$.

These results position retrieval as a substantive source of performance gain rather than a cosmetic add-on. The ablations also show that the benchmark supports controlled study of retrieval backbones and conditioning pathways under a fixed restoration architecture.

## 6. Practical implications, limits, and relation to other Flickr-derived datasets

The practical implications identified for RASR-Flickr30 are open-world retrieval, scalability, and flexibility. Per-category reference pools eliminate the need for manually paired references. New species or object categories can be added by collecting a small reference database, without retraining the retriever. The same database can support multiple LQ inputs across different scenes, including zoos, museums, and wildlife photography [2508.09449].

The limitations are also explicit. Retrieval latency is reported as $\sim 0.15\,\mathrm{s}$ per query on $\sim 85\mathrm{K}$ images in Qdrant. Single-step diffusion plus retrieval overhead is described as promising for real-time use, but end-to-end latency remains a barrier for mobile deployment. The move beyond 30 species to general “in-the-wild” scenes is said to require semantic clustering and dynamic database updates. Fine details, particularly very small text or subtle patterns, remain difficult, motivating possible future work on patch-level retrieval or multi-scale reference fusion.

The naming of RASR-Flickr30 may invite comparison with other Flickr-derived datasets, but those resources address different problems. Flickr30K, analyzed in the context of stereotype-driven descriptions and unwarranted inferences, is a crowdsourced caption dataset rather than an image restoration benchmark [1605.06083]. The extended SPID 2018 dataset used for predicting popularity over 30 days is organized around daily view-count sequences, social metadata, and visual features for approximately 20 000 Flickr images [2108.01326]. This suggests that “Flickr” in RASR-Flickr30 primarily indicates image provenance, while “30” denotes the benchmark’s 30 animal species rather than a shared annotation protocol or prediction task.

Within super-resolution research, the central contribution of RASR-Flickr30 is therefore infrastructural as much as algorithmic: it establishes a benchmark in which retrieval from a category-organized reference database is part of the formal problem definition. That makes it suitable for evaluating whether retrieval augmentation can bridge the gap between academic RefSR research and real-world applicability, which is the core claim advanced by the benchmark and its baseline system [2508.09449].

Source: https://www.emergentmind.com/topics/rasr-flickr30