---
license: mit
library_name: onnxruntime
pipeline_tag: image-classification
tags:
  - ai-image-detection
  - onnx
  - quantized
  - webassembly
  - browser
  - waterspy
---

# WaterSpy Sieve ft1 INT8

This is a signed dynamic-INT8 ONNX conversion of Sieve ft1 for WaterSpy's CPU/WebAssembly fallback. It is not a new detector or a replacement for the FP16 WebGPU model.

## Provenance

- Base model: [Phineas1500/sieve-ai-image-detector](https://github.com/Phineas1500/sieve-ai-image-detector), commit `0ec11e5c70da3b1d6c7953ad1748ea255a3ffb7b`
- Base artifact: `ft1_best_fp16.onnx`
- Base SHA-256: `87277637277f7d4f82222f0aaf1b4b114132ca13e5e4f02f71a65693e9606aed`
- Quantized artifact: `sieve-int8s.onnx`
- Quantized SHA-256: `0d6e0c52e1187aa68f54ce7e185c4bf4c5bb214889f937628ab9d0a4e9fc96b0`
- Quantized bytes: `23,830,735`
- License: MIT

The FP16 graph was converted to FP32, then its constant `MatMul` and `Gemm` weights were dynamically quantized with ONNX Runtime 1.26 using signed per-tensor QInt8 weights. The resulting graph contains 49 `DynamicQuantizeLinear` and 49 `MatMulInteger` nodes.

## Input and output

Input is a float32 NCHW tensor with shape `[1, 3, 384, 384]`:

1. Resize the image so its shorter side is 440 pixels.
2. Center-crop to 384 by 384.
3. Normalize RGB with ImageNet mean `[0.485, 0.456, 0.406]` and standard deviation `[0.229, 0.224, 0.225]`.

The model returns one raw fake-image logit. WaterSpy applies `sigmoid(logit + 0.88)` and uses the result as one member of its frozen cascade. The extension's final AI decision threshold is 0.65.

## Validation

The integrated WaterSpy pipeline was evaluated on 700 SHA-256-disjoint original images across 11 real and AI families. Replacing only Sieve FP16 with this INT8 graph preserved the exact original confusion matrix:

- Balanced accuracy: 91.71%
- AI recall: 88.00% (308/350)
- Real specificity: 95.43% (334/350)
- Confusion matrix: TP 308, TN 334, FP 16, FN 42
- Original-image decision flips versus FP16: 0/700

On a separate 220-image JPEG/downscale robustness slice, one borderline Midjourney false negative became a true positive with no new false positives. Balanced accuracy moved from 92.32% to 92.68%.

Using ONNX Runtime Web 1.22 WASM with four threads, three warm-ups, and 20 measured runs on the test host:

| Model | Size | Session creation | Median inference | p95 inference |
|---|---:|---:|---:|---:|
| Sieve FP16 | 43.78 MB | 473.9 ms | 535.4 ms | 572.7 ms |
| Sieve INT8 signed | 23.83 MB | 117.5 ms | 359.3 ms | 378.3 ms |

The INT8 artifact is 45.6% smaller, creates its WASM session 75.2% faster, and reduces median WASM inference by 32.9% on that host. These are local proxy measurements, not guarantees for other hardware or datasets.

## Intended use and limitations

This artifact is intended for WaterSpy installs without usable hardware WebGPU. The dynamic quantization operators are not present in ONNX Runtime Web's WebGPU operator table, so GPU-capable installs should retain the original FP16 model.

AI-image detection is probabilistic. Generator coverage varies, recompression can change scores, public labels can contain errors, and training overlap cannot be ruled out. Do not use this model as the sole basis for high-impact decisions or treat a negative result as proof that an image is authentic.

## Included evidence

- `quantization.json`: exact conversion parameters and artifact hashes
- `holdout-summary.json`: full original and robustness aggregate metrics
- `wasm-benchmark.json`: exact saved four-thread WASM microbenchmark output

The WaterSpy source, quantizer, evaluation pipeline, and complete reports are maintained in the WaterSpy project. The model is redistributed under the upstream MIT license with attribution.
