You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 month ago | |
|---|---|---|
| .. | ||
| __pycache__ | 1 month ago | |
| README.md | 1 month ago | |
| __init__.py | 1 month ago | |
| alarms.py | 1 month ago | |
| app.py | 1 month ago | |
| calibration.py | 1 month ago | |
| cameras.toml | 1 month ago | |
| cameras_io.py | 1 month ago | |
| config(main).py | 1 month ago | |
| config.py | 1 month ago | |
| cpp_bridge.py | 1 month ago | |
| detection.py | 1 month ago | |
| events.py | 1 month ago | |
| geo-autocal.py | 1 month ago | |
| geom.py | 1 month ago | |
| heartbeat.py | 1 month ago | |
| hik_isapi.py | 1 month ago | |
| logging_utils.py | 1 month ago | |
| main.py | 1 month ago | |
| media.py | 1 month ago | |
| model.py | 1 month ago | |
| notify.py | 1 month ago | |
| patrol.py | 1 month ago | |
| postprocess(main).py | 1 month ago | |
| postprocess.py | 1 month ago | |
| postprocess04.02.py | 1 month ago | |
| preview.py | 1 month ago | |
| ptz_io(main).py | 1 month ago | |
| ptz_io.py | 1 month ago | |
| sector.py | 1 month ago | |
| servers.py | 1 month ago | |
| state.py | 1 month ago | |
| status.py | 1 month ago | |
| streaming.py | 1 month ago | |
| toml_persist.py | 1 month ago | |
| utils.py | 1 month ago | |
| wiper.py | 1 month ago | |
README.md
PTZ Tracker — Modular Version
Structure
ptz_tracker_modular/
├── app.py # entrypoint (async main)
├── calibration.py # preset/sector and pan-sign calibration
├── config.py # constants + camera config
├── events.py # alarms, detection event plumbing
├── geom.py # angular math and sector helpers
├── heartbeat.py # UDP heartbeat
├── model.py # YOLO loading + forward
├── patrol.py # patrol logic (bounded/smooth + sync)
├── postprocess.py # PTZ control + zoom + notify_detected
├── preview.py # JPEG encode and preview publishing
├── ptz_io.py # PTZ HTTP session + worker + bounded move
├── sector.py # sector init and autocalculation
├── state.py # runtime shared state
├── status.py # PTZ status poller
├── streaming.py # WS servers, MicroBatcher, CPP bridges
└── __init__.py
Run
python -m ptz_tracker_modular.app
Optional env:
YOLO_WEIGHTS=/path/to/weights.ptCAM_<ID>_PASSWORD=...for every camera id
Dependencies: opencv-python, torch, ultralytics, websockets, requests, numpy.