Skip to content

Stalker-Cam – local camera monitoring and object tracking tool with UI and CLI

Notifications You must be signed in to change notification settings

FoxRav/Stalker-Cam

Repository files navigation

Stalker-Cam

Stalker-Cam UI screenshot

😄 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.

Features

  • 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

Requirements

  • Linux (tested on Linux Mint)
  • Python 3
  • Camera available as /dev/video*
  • Recommended: v4l2-ctl for camera/resolution listing

Install tools:

sudo apt update
sudo apt install -y git v4l-utils

Setup

Create and activate a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip

Install Python dependencies (adjust to your needs):

pip install opencv-python ultralytics pillow

Run (UI)

python3 ui_camcount.py

Run (CLI) - recommended headless flow

Preview 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 30

Run for a fixed time (example: 8 hours):

python3 camcount.py \
  --device /dev/video0 \
  --preview_secs 60 \
  --headless \
  --minutes 480 \
  --outdir ./runs/night

Output

By default results are written under ./runs/ (ignored by git):

  • counts.csv (timestamps + counts)
  • objects/ (saved frames per track/class)

Notes

  • Model weights are intentionally not tracked (see .gitignore).
  • If v4l2-ctl is missing, camera/resolution listing will fall back to common defaults.
  • Screen blanking uses xset dpms force off and requires an X11 session.

License

No license has been added yet. Add one if you want reuse/redistribution.

About

Stalker-Cam – local camera monitoring and object tracking tool with UI and CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published