Files
karung-counting-feedmill-se…/docs/scripts.md
T

1.8 KiB

Scripts reference

Entry points

  • predict.py — single entrypoint: production service (zero flags) + dev CLI. Combined sack+truck model + repo src/ modules, shapely zones, visual-similarity/Re-ID debounce, SQLite, live-frame publish. Run by karung-counter.service. Flags: --source/--env/--model/--output-dir/ --output-json/--sack-conf/--truck-conf/--box-conf(placeholder)/ --batch-timeout/--max-frames/--no-dashboard/--no-db (see predict.py --help).
  • src/main.py — deprecated shim: prints a pointer to predict.py, still runs the old v3 loop for backward compat.
  • archive/ — retired: predict_new.py (duo-model state machine), rpo_iki/ (alternate geometric engine + predict_rpo_iki.py), simple_predict.py (minimal CPU demo), ini.py, check/merge/test scripts. Not imported anywhere.

Calibration & data tools

  • get_coordinates.py / get_calib_frame.py — zone calibration (calib_frame.jpg, zones.json); capture_frame_native.py — grab native frames (live_frame_native.png).
  • extract_random_frames.py — sample frames for labeling; check_*.py (check_20_23, check_20_aug, check_all_after) — batch verification passes.
  • test_bytetrack.py, test_track_crash.py — tracker experiments/crash repro.

DB / ops helpers

counter_dashboard.py (dashboard), backup.py, dump_db.py, check_jetson_db.py, migrate_jetson_db.py, merge_batches_20_23.py, merge_batches_28_35.py, update_batches.py, diagnose_truck_jetson.py, deploy_to_jetson.py, export_model.py / export_v4.py (TensorRT export).

Ignored at runtime (.gitignore)

.env, *.db, state JSONs, batch_history_folder/, media (*.mp4/*.jpg/*.png), model binaries (*.pt/*.onnx/*.engine), venvs, IDE files — so the large weights, videos and local DBs in this working tree are intentionally untracked.