No description
  • Python 98%
  • Dockerfile 1.6%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-12 18:22:37 +02:00
app init 2026-07-12 18:22:37 +02:00
migrations init 2026-07-12 18:22:37 +02:00
tests init 2026-07-12 18:22:37 +02:00
.env.example init 2026-07-12 18:22:37 +02:00
.gitignore init 2026-07-12 18:22:37 +02:00
docker-compose.yml init 2026-07-12 18:22:37 +02:00
Dockerfile init 2026-07-12 18:22:37 +02:00
entrypoint.sh init 2026-07-12 18:22:37 +02:00
pyproject.toml init 2026-07-12 18:22:37 +02:00
README.md init 2026-07-12 18:22:37 +02:00
uv.lock init 2026-07-12 18:22:37 +02:00

senden-contentscanner

Content scanner for Senden attachments uploads.

uses:

  • PDQ hash matching
  • SigLIP2
  • NudeNet

Run locally

uv sync
cp .env.example .env          # set API_TOKEN and point DATABASE_URL at Postgres
uv run uvicorn app.main:app --reload

On macOS the classifier runs on CPU/mps automatically. On the GPU host it uses CUDA.

Run with Docker with GPU

docker compose up --build      # scanner on :8000 + its own postgres

Needs the NVIDIA driver + nvidia container toolkit on the host.

Try it

All endpoints except /health require the API_TOKEN from your .env:

TOKEN=your-api-token

curl -H "Authorization: Bearer $TOKEN" \
  -F file=@some.jpg -F sha256=$(shasum -a 256 some.jpg | cut -d' ' -f1) \
  http://localhost:8000/scan

# add a fingerprint for reported+removed content (stores the hash, not the image)
curl -H "Authorization: Bearer $TOKEN" \
  -F file=@bad.jpg -F source=internal_report -F category=csam \
  http://localhost:8000/hashes