# Image classify page sources

## Recorded model output

- Model: `Qwen/Qwen3-VL-Reranker-2B` on `/v1/score`
- Model card: <https://huggingface.co/Qwen/Qwen3-VL-Reranker-2B>
- SIE model config Hugging Face revision:
  `4bd860ac4f15ad1897a214615cccc700f8f71818`
- Comparison model: `google/siglip2-base-patch16-224` on `/v1/encode`
  (dense), SIE model config Hugging Face revision
  `75de2d55ec2d0b4efc50b3e9ad70dba96a7b2fa2`
- Served revision header (`x-sie-model-revision`), identical for both models:
  `10333b84de80b402376b626eb25366fb081d3faeb893eb4b01cf32e8c27e4aff`
- Endpoint: SIE Cloud, `https://api.superlinked.com`, server version `0.7.3`
- Runner: `apps/site/tests/fixtures/reference/image-classify/run.py`
- Run directories: `apps/site/tests/fixtures/reference/image-classify/runs/`,
  each with the pre-registered `inputs.json`, every request (image bytes
  replaced by their SHA-256), every raw response and a manifest

Each page score is one entry of the `/v1/score` response for the request the
playground snippet sends: the photo as the query and the two label strings as
items `0` and `1`. The reranker returns `sigmoid(yes - no)` for each label
independently, so the two scores do not sum to 1. The page prints each score
to three decimals, the format of the shared output panel. SigLIP 2 scores are
cosine similarities recomputed from the raw vectors, the same calculation the
snippet runs in the client; the page shows only which label won.

A piece is marked flagged or passed when one label scores strictly higher than
the other. Equal scores are a tie.

Both runs were pre-registered: the commit that added each `inputs.json` is
older than the first call of its run, by 18 seconds for run 01 and 11 seconds
for run 02. Each file's `pre_registered_utc` first carried a hand-entered time
that postdated its own run. Those two values are corrected to the author date
of the commit that added the file, which is the timestamp the claim rests on.
The correction changed metadata only, so run 02's recorded `inputs_sha256`
still describes the file as it was sent, and no case, request or response
changed. The page tests pin the case list by its own checksum instead.

## Run 02-pass-reject (displayed)

- Pre-registered in commit `b4ae6ae7` before any call; recorded in `ae52c947`
- Run started `2026-09-15`, 32 calls, all HTTP 200
- 16 photos: for each of cashew, fryum, pipe fryum and chewing gum, the first two
  VisA `normal` images and the first two images with one structural defect
  label, in filename order, skipping images run 01 used
- Labels per photo: `whole undamaged <item>` and `broken or damaged <item>`,
  with `<item>` set to `cashew`, `fryum wheel`, `snack tube` or `gum pellet`

| Model | Damaged pieces flagged | Intact pieces passed | Ties |
| --- | --- | --- | --- |
| `Qwen/Qwen3-VL-Reranker-2B` | 8 of 8 | 7 of 8 | 1 |
| `google/siglip2-base-patch16-224` | 6 of 8 | 6 of 8 | 0 |

The proof board shows one pair per product, eight of the sixteen: the whole
piece beside the damaged one, picked so the four breaks look different (a bite
out of a cashew edge, a snapped fryum ring, a notched snack tube wall, a chunk
missing from a gum pellet). Every VisA class on a displayed card matches what
its photo shows. `chewinggum-damaged-005` stays recorded but off the page:
VisA labels it `corner missing` while the photo shows a crater in the middle of
the top edge with all four corners intact. The totals above and on the page
cover all 16 photos.

The tie is `fryum-intact-003`: both labels scored `0.562176525592804`, and the
response ranks item `0` first. The runner's manifest summary counts it as
correct because Python's `max` keeps the first label on equal scores; the page
and its tests count it as a tie. SigLIP 2
passed both chipped cashews (`cashew-damaged-014`, `cashew-damaged-015`) and
flagged `fryum-intact-002` and `pipe-fryum-intact-000`.

## Run 01-grades (first design, not displayed)

- Pre-registered in commit `3004ce32`; recorded in `3a14dc8a`. The run used
  that runner with one fix to its repository-root path.
- 16 photos: cashew and fryum, two per VisA class for normal, corner or edge
  breakage, middle breakage and stuck together
- Four labels per photo: whole, with a chipped edge, broken in the middle and
  stuck together

Both models matched the VisA class on 4 of 16 photos, the rate four labels give
by chance. The reranker put "with a chipped edge" first for 12 of the 16 photos
and SigLIP 2 for all 16. The page therefore does not claim that either model
separates these grades, and the second run asks the coarser question an
inspection line asks first: pass or send to review.

## Source images

- Dataset: VisA (Visual Anomaly), Amazon Science. Zou, Jeong, Pemula, Zhang
  and Dabeer, *SPot-the-Difference Self-Supervised Pre-training for Anomaly
  Detection and Segmentation*, ECCV 2022: <https://arxiv.org/abs/2207.14315>
- Repository: <https://github.com/amazon-science/spot-diff>
- Registry: <https://registry.opendata.aws/visa/>
- License: CC BY 4.0 (<https://creativecommons.org/licenses/by/4.0/>), stated
  in `LICENSE-DATASET` inside the archive and on the AWS registry page
- Archive: `VisA_20220922.tar`, SHA-256
  `2eb8690c803ab37de0324772964100169ec8ba1fa3f7e94291c9ca673f40f362`
- Ground truth: the image-level `label` column of each product's
  `image_anno.csv`, written by the VisA annotators; file checksums are in each
  run's `inputs.json`

Every model call received the unmodified VisA JPEG, pinned by the SHA-256 in
`inputs.json`. The page serves 480px wide WebP copies of the 16 run 02 photos
(resized and re-encoded) and crops them to 4:3 around the centre for display;
the pieces sit in the middle of each VisA frame and every marked defect stays
inside the crop.

| Page file | VisA image | VisA label | SHA-256 of the original |
| --- | --- | --- | --- |
| `cashew-intact-002.webp` | `cashew/Data/Images/Normal/002.JPG` | normal | `538f350d15b89c2e524b47d8c899c86bad560bd8464be4dc7e8cc8153d9867bd` |
| `cashew-intact-003.webp` | `cashew/Data/Images/Normal/003.JPG` | normal | `acaed5e531906769a3757c5d986f992451b13553e301e292144e5d42d35cea02` |
| `cashew-damaged-014.webp` | `cashew/Data/Images/Anomaly/014.JPG` | corner or edge breakage | `6480685c4fb8abae24ba05f68846824d9bc50520f207841ba6314070106ad748` |
| `cashew-damaged-015.webp` | `cashew/Data/Images/Anomaly/015.JPG` | corner or edge breakage | `26fb234171e03a7e45c03379d2d624df92e60b1d66b7399deb2130bfe7305c57` |
| `fryum-intact-002.webp` | `fryum/Data/Images/Normal/002.JPG` | normal | `0ac8a8dafbd607c42130c0f2edc27d30b0bcd7e7674bb10f8003c30e52ef0eff` |
| `fryum-intact-003.webp` | `fryum/Data/Images/Normal/003.JPG` | normal | `1cb6417647c8830da9d18f469ddb37fb6f29ced9ed6c09a03f90780583731bff` |
| `fryum-damaged-012.webp` | `fryum/Data/Images/Anomaly/012.JPG` | corner or edge breakage | `22d46fe93b56c9c54c70798c09510990dd80427f764469d742ccab3ae19cd22c` |
| `fryum-damaged-013.webp` | `fryum/Data/Images/Anomaly/013.JPG` | corner or edge breakage | `e00723d8d2017eb3eee8726992d7f336908020e5585a1e1b8a3abce2c191c6e3` |
| `pipe-fryum-intact-000.webp` | `pipe_fryum/Data/Images/Normal/000.JPG` | normal | `8a768088f093062a789733a74040bc04c722cef86c78a847ab52327b73f671c9` |
| `pipe-fryum-intact-001.webp` | `pipe_fryum/Data/Images/Normal/001.JPG` | normal | `835bf381eb35b424c9fc07adf6632ce7a44aa0aead250f3a70c3cd0ed5c55329` |
| `pipe-fryum-damaged-015.webp` | `pipe_fryum/Data/Images/Anomaly/015.JPG` | corner and edge breakage | `3ee8db2fd5e2bee4cd7b51c1e84ad4ac396e750566673a96e7417278571ff4bc` |
| `pipe-fryum-damaged-016.webp` | `pipe_fryum/Data/Images/Anomaly/016.JPG` | corner and edge breakage | `06d6756770a3762dbd04216f88a4c14da3aa92683e06d584cecac3fb87a683b5` |
| `chewinggum-intact-000.webp` | `chewinggum/Data/Images/Normal/000.JPG` | normal | `d6d40b52237586bf27e20bc9299600379b5fc9ad483d4f6a03f532af4b37cd10` |
| `chewinggum-intact-001.webp` | `chewinggum/Data/Images/Normal/001.JPG` | normal | `a63cc5d3f3067cedfb6fc1b8a9cdd5522e092807c46147ccede2018b08cbc9c0` |
| `chewinggum-damaged-005.webp` | `chewinggum/Data/Images/Anomaly/005.JPG` | corner missing | `0926c26d4c1fe7d469bab6377c6e10b0d4b17e453b202cf3f7247713771b98ce` |
| `chewinggum-damaged-016.webp` | `chewinggum/Data/Images/Anomaly/016.JPG` | chunk of gum missing | `438435e9c59aa0c69157eaf3b529130455281675012d992b8aedbc2c31ac8ad1` |

The website does not serve the raw model files. Site CI compares page data
with the non-served fixtures in `apps/site/tests/fixtures/reference/image-classify/`.
