6.8 KiB
6.8 KiB
Changelog
All notable changes to this project are documented here. Format follows
Keep a Changelog (dated entries; no
version tags are cut in this repo — POC stage, main is the release line).
[Unreleased]
Added
- DO-gated manual batch mode (
autodefault ·do_manual· legacymanual): smartphone photo capture → OCR draft → plate-grouped start gates → net expected/counted on live panel → stop soft-warn + force → discard only when both grosscountandbox_loadingare 0. config.yamlbatch.default_mode+do:block;DoConfiginsrc/config_loader.py; runtime$OUTPUT_DIR/do_settings.json.delivery_orderstable + additivebatchescolumns (plate,do_numbers,expected_*,net_*); photo treedo_photos/YYYY-MM-DD/(7-day retention).- APIs:
POST /api/batch/stop-preview, DO CRUD +POST /api/do/upload,GET|POST /api/do/settings(all gated fields office-only: require_plate/require_do/ocr_engine, 403 on operator), office-only mode/model_mode POST (403 on operator; 409 when batch active). src/do_batch.py(pure gates/nets/units),src/do_ocr.py(extract_do_fieldsrapid|tesseract|paddle|none).- RapidOCR default engine (
rapidocr_onnxruntime, bundled PP-OCR models); tesseract + paddle kept as backups, explicit error if a dep is missing. - Operator DO panel (no OCR toggle); monitoring 3-way mode switch + model mode +
OCR selector with labels
RapidOCR (Default, Light & Accurate)/Tesseract (Backup, Light)/PaddleOCR (Accuracy, Heavy to run)/None (Manual)+ require-plate controls; history/export plate, DO, expected, net columns. ERD.md(Mermaid ERD, repo root; supersededdocs/do-erd.md); teststests/test_do_batch.py.- History
Klipbutton → office-onlyGET /api/batch-clip/<date>/<batch_number>trims+concatenates motionEye recordings to the batch window (src/clip.py), downloadb<n>-<date>-<HH-MM-SS>.mp4.
Changed
- OCR engine default
rapid(wastesseract) acrossconfig.yaml,DoConfig,empty_do_settings,extract_do_fields;ocr_enginewrite moved office-only (was both ports); OCR engine selector removed from operator page. - Default batch mode seed
auto(was hard-codedmanualwhenbatch_mode.jsonmissing);predict.pyacceptsdo_manualas operator-driven and persists sackunloadingfor net-at-stop. - Finalize discard rule (dashboard stop and
predict.pyfinalize_batch): keep row if either net ≠ 0 (box-only batches no longer dropped). - Batch discard rule now gross-based: drop only when
count == 0andbox_loading == 0(was both nets 0 — kept rows likecount=0, unloading=7). - Event log wording:
masuk/keluarnow match event direction (unloading no longer logged asmasuk,TOTALline follows direction); wired the existing-but-unusedsrc/logger.pyCSVLoggerintopredict.py(batch_summary.csv,sack_events.csvunderoutput.dir).
2026-09-18 — Config tuning: Sack confidence and batch timeout
Changed
config.yaml: Decreasedmodels.detection_params.sack.conffrom0.35to0.30for improved sack sensitivity.config.yaml: Decreasedbatch.timeout_secondsfrom30.0to20.0for faster batch cycle completion.config.yaml: Clarified deprecation note onbatch.merge_threshold_seconds.
2026-09-17 — Unified config.yaml with extensible model presets
Added
config.yaml— single canonical config (stream, models, counting knobs, batch, output paths, camera). Secrets/deployment-only values stay in.env.src/config_loader.py— stdlib-dataclasses + pyyaml loader, zero new dependencies. Missing file falls back to.env+ legacy defaults with aUserWarning;MODEL_MODEenv still honoured once with aDeprecationWarning.tests/test_config_loader.py— 8 smoke tests (load/validate, precedence, atomic mode-switch round-trip, YAML-only mode-E extension, legacy warnings).- Per-class
iouandmin_bbox_areainmodels.detection_params(shared across modes;ioudefault0.7= Ultralytics default, no behaviour change). --configCLI flag onpredict.py(default:config.yamlnext topredict.py).
Changed
- Model modes are data:
config.yaml → models.modesholds engines (path key + contributed classes) and class filters only.predict.pyderives tracker roles structurally — adding mode E/F/... needs no code change, and the dashboard/api/model-modeslists new modes automatically. - Dashboard
POST /api/batch/mode {"model_mode": "X"}validates againstconfig.yamland persists atomically (tmp+replace, comments preserved) tomodels.active_mode. Manualkarung-counterrestart still required. batch_mode.jsonkeeps only the manual/auto batchmode; its legacymodel_modekey is ignored (warned when it disagrees).zones.jsonkeeps geometry only (polygons + left/right limits); legacy knob keys there are ignored with a warning —config.yaml counting.*is canonical.deploy_to_jetson.pyalso syncsconfig.yaml.src/tracking.py/src/detection.pyaccept aniouparameter (default0.7, v3 callers unaffected).
2026-09-15 — Default model mode B → C
- Production default is now Mode C (combined v4 sack+truck + yolo11n
box-only on a dedicated tracker) instead of Mode B (shared sack+box tracker).
Changed in
predict.py,counter_dashboard.py,.env.example, and docs. Sack path uses the proven v4 model; sack/box track-ID spaces no longer collide.
2026-09-14 — models/modelREADME.md rename
models/README.md→models/modelREADME.mdto avoid confusion with the root README. No content change.
2026-09-11 — Model weights tracked, per-mode matrix
models/*.pt+*.onnxare now git-tracked (clone-ready);*.enginestays gitignored (rebuildable viaexport_model.pyon the Jetson).- All weights moved under
models/with a per-mode detector/filter matrix (models/modelREADME.md);predict.pypaths,deploy_to_jetson.py, and docs updated. - Multi-model modes (A/B/C/D, default B at the time) + box counting +
manual-mode banner (
6e4af50).
2026-09-10 — Single predict.py entrypoint, experiments archived
- Production + dev CLI unified in
predict.py(runs askarung-counter.servicewith zero args). Retired experiments moved toarchive/viagit mv(predict_new.py,rpo_iki/,simple_predict.py, check/merge/test scripts). - Docs guides added (
docs/architecture.md,models.md,configuration.md,scripts.md) plus DB/batch helper scripts; pytest smoke tests + CI.
2026-08-24 — Manual & auto batch modes, dual-port dashboards
- Manual/auto batch counting, operator (port 5000) + monitoring (port 5721) dashboards, historical batch data views and corrections.