No description
- Python 98%
- Dockerfile 1.6%
- Shell 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app | ||
| migrations | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
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