😄 Origin story
This project started in a very practical (and slightly silly) way: I wanted to turn an old laptop into a "stalker machine" pointed at my kitchen window ☕👀 — and at the same time get hands-on practice with YOLO-based object detection.
What began as a weekend experiment slowly grew into a real tool with a UI, a CLI, logging, and headless operation.
🚧 Project status
Stalker-Cam is still a work in progress. The UI and overall structure will evolve over time as I refine the workflow and build a more robust and polished interface.
That said — it already works, and it works well enough to be genuinely useful (and fun 😅).
Stalker-Cam is a local camera monitoring + object tracking tool with both:
- UI (Tkinter) for quick setup (camera selection, resolution, start/stop, logs)
- CLI for headless/automation use (SSH, scripts, long runs)
Note: This repository currently contains some Finnish filenames/docs created during development. Most developers will still be able to navigate it easily. Cleaning/translation can follow later.
- Camera autodetection (
/dev/video*/v4l2-ctl) - Resolution + FPS selection (UI)
- Start/Stop control (UI spawns
camcount.py) - Optional screen blanking (DPMS)
- Logging view inside UI
- Headless operation for long unattended runs
- Linux (tested on Linux Mint)
- Python 3
- Camera available as
/dev/video* - Recommended:
v4l2-ctlfor camera/resolution listing
Install tools:
sudo apt update
sudo apt install -y git v4l-utilsCreate and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -U pipInstall Python dependencies (adjust to your needs):
pip install opencv-python ultralytics pillowpython3 ui_camcount.pyPreview for alignment (60s), then run headless and optionally blank the screen:
python3 camcount.py \
--device /dev/video0 \
--preview_secs 60 \
--headless \
--outdir ./runs/live \
--blank_after_sec 30Run for a fixed time (example: 8 hours):
python3 camcount.py \
--device /dev/video0 \
--preview_secs 60 \
--headless \
--minutes 480 \
--outdir ./runs/nightBy default results are written under ./runs/ (ignored by git):
counts.csv(timestamps + counts)objects/(saved frames per track/class)
- Model weights are intentionally not tracked (see
.gitignore). - If
v4l2-ctlis missing, camera/resolution listing will fall back to common defaults. - Screen blanking uses
xset dpms force offand requires an X11 session.
No license has been added yet. Add one if you want reuse/redistribution.
