# SeroSlop documentation

> Install the SeroSlop Chrome extension, choose a scanning mode, read its scores correctly, build and verify it from source, and understand its runtime and model lock.

Project page: https://dbaney.com/projects/seroslop/

## Install a release

1. Download the latest `seroslop-*.zip` from [GitHub Releases](https://github.com/baney75/SeroSlop/releases/latest).
2. Unzip it to a folder you will keep.
3. In desktop Chrome 121 or newer, open `chrome://extensions` and turn on **Developer mode**.
4. Choose **Load unpacked** and select the unzipped folder.
5. Leave the setup tab open until it says **Offline ready**, then choose a scanning mode.

Chrome on iPhone and Android cannot load unpacked extensions. A Chrome Web Store listing is not published yet. GitHub builds do not update themselves: download the newer ZIP, replace the folder, then choose **Reload** on `chrome://extensions`.

## Choose a mode

| Mode | What it scans |
| --- | --- |
| Choose an image | Waits for you. Press the extension button and pick an image, or right-click an image and choose **Analyze this image with SeroSlop**. |
| Main images | Supported images in the main content, excluding headers, navigation, sidebars and footers. |
| Every image | Every supported visible image on the page. |

In image-picking mode you can also move with Tab, press Enter to analyze and press Esc to cancel.

## Read a result

Each result stays attached to the image it describes.

- A score of **65.0/100 or more** is flagged as likely AI. The rule is inclusive and fixed.
- Below 65 the label reads **Below flag threshold** with the numeric score.
- If analysis fails, the label says **unavailable** instead of inventing a score.

The score is not a calibrated probability, and a badge is not proof of origin or authenticity.

## Build from source

Requires Node.js 20.9 or newer, Python 3.10 or newer, `npm`, `zip` and Chrome 121 or newer.

```sh
git clone https://github.com/baney75/SeroSlop.git && cd SeroSlop
python3 -m venv .verify-venv
source .verify-venv/bin/activate
python -m pip install -r benchmark/verify-requirements.txt
npm ci && npm run verify:static
```

Load the generated `dist/` folder with **Load unpacked**. To update a source build, run `git pull --ff-only`, `npm ci` and `npm run build`, then press **Reload**.

## Verify a release

```sh
npm run verify:static      # model, evidence, package and lineage checks
npm run browser:install    # one-time project browser install
npm run test:chrome        # fresh profile, offline, forced WASM end to end
npm run test:chrome:webgpu # the same contract through WebGPU
```

The browser test takes the browser offline before analysis and checks setup progress, model persistence across a restart, zero network requests after the cutoff, result placement and failure states. Release builds are rebuilt under two time zones and must be byte-identical.

## Evaluation

On a fixed, score-blind panel of 600 Met Open Access real images and 600 publisher-labeled synthetic images, run offline in a clean Chrome profile, the packaged extension reached **85.83% balanced accuracy** at the 65/100 threshold: 77.67% real-image recall and 94.00% synthetic-image recall. This is a public proxy result; it does not predict a score on any private benchmark. Earlier evaluation packets that failed a frozen gate remain recorded as failed.

## Runtime design

1. The content script finds targets and creates local pixel or viewport-crop requests.
2. The Manifest V3 service worker rate-limits capture, bounds work and restores the offscreen document.
3. The offscreen document verifies the model bytes, decodes and preprocesses the image, then runs WebGPU or its WASM fallback and applies the frozen calibration.
4. The content script accepts only the matching request and renders the result.

A page-controlled URL is never fetched by extension code. Oversized sources, corrupt model bytes, unsupported protocols and decode failures fail closed.

## Model lock

| Field | Value |
| --- | --- |
| Artifact | `weights/prooflens-cf384.onnx` |
| Size | 87,442,080 bytes |
| SHA-256 | `a994b1bd4d0323909b2b308db848bf668fd00e2f02c8973ec546c400efe2dc47` |
| Input and output | `pixel_values [N,3,384,384]` to `logits [N,1]` |
| Backbone | Community Forensics ViT-S/16, frozen; only the classifier head is retrained |

Historical paths keep the earlier `prooflens` name so past evidence stays reproducible.

## Privacy

SeroSlop has no detector API, localhost process, hash lookup, telemetry or post-install model download. Images are analyzed in the browser and never uploaded.
