No description
  • Python 49.3%
  • HTML 46.2%
  • Dockerfile 2.7%
  • Shell 1.8%
Find a file
2026-10-15 11:51:39 +02:00
app first commit 2026-10-15 11:49:15 +02:00
data first commit 2026-10-15 11:49:15 +02:00
models first commit 2026-10-15 11:49:15 +02:00
scripts first commit 2026-10-15 11:49:15 +02:00
.gitignore Extend gitignore 2026-10-15 11:51:39 +02:00
docker-compose.webcam.yml first commit 2026-10-15 11:49:15 +02:00
docker-compose.yml first commit 2026-10-15 11:49:15 +02:00
Dockerfile first commit 2026-10-15 11:49:15 +02:00
README.md first commit 2026-10-15 11:49:15 +02:00
requirements.txt first commit 2026-10-15 11:49:15 +02:00
run-mac.sh first commit 2026-10-15 11:49:15 +02:00

speedcam v2 (YOLO + tracking, offline-capable)

Any COCO object (person, bike, car, dog, …): Ultralytics YOLO detects, ByteTrack tracks, Python turns ground-plane movement into km/h. UI is plain HTML/CSS/JS, no CDNs.

./run-mac.sh        # http://localhost:8000

First run needs internet (pip packages + weights into ./models). After that it runs fully offline. The browser camera is the default source (the page asks for camera access on load). Source 0 = native webcam via OpenCV; RTSP/HTTP URLs and video files work too. A config already saved in ./data keeps its old source.

Docker (server / Raspberry Pi 64-bit)

docker compose up --build

Weights are downloaded at build time and baked into the image; the running container needs no internet. Docker on a Mac runs CPU-only inside a Linux VM (no MPS, no webcam passthrough) – use "Browser camera" there, or run natively. Linux/Pi webcam: docker compose -f docker-compose.yml -f docker-compose.webcam.yml up --build. Pi: model yolo11n.pt, inference size 320, processing width 640. GPU (NVIDIA): --build-arg TORCH_INDEX=https://download.pytorch.org/whl/cu124 + compose GPU reservation.

Other models

Drop any Ultralytics .pt into ./models (native) or /data/models (Docker volume); it appears in the model picker.

Scale (auto-scale = no setup, rough; calibration = accurate)

Line (2 points + distance) or plane (4 ground corners, handles perspective). A banner warns if the camera view moved afterwards. Detections log to ./data/detections.csv. Ultralytics is AGPL-3.0.

Resolution: defaults are tuned for a Mac (browser cam 1280×720, processing width 1280, inference size 960). RAM is not the limit, compute is: raise inference size / model size until fps drops, then back off. On a Pi use the lower values above.