forked from zakaria/chicken-counting-sukawarna-det
docs: update README, RUN guide, and add CHANGELOG for recent bugfixes and optimizations
This commit is contained in:
1 parent
2061fbf08c
commit
d9daf0ab01
3 files changed
+35
-2
No files matched your search
@@ -0,0 +1,29 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to the `chicken-counting-sukawarna-det` project are documented in this file.
|
||||
|
||||
## [Unreleased] - 2026-08-19
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
- **Multi-Floor Script Syntax (`run_all_coops.sh`)**:
|
||||
- Resolved fatal `syntax error: unexpected end of file` caused by missing `done` in floor configuration discovery loop.
|
||||
- Expanded config discovery pattern from `K*-L*.yaml` to `*.yaml` to support custom named coops (e.g. `kandang-atas.yaml`).
|
||||
- **Excel Report Empty Result Crash (`export_excel_report.py`)**:
|
||||
- Added empty DataFrame pre-check to prevent `IndexError` when exporting reports for dates with no batch runs or newly initialized databases.
|
||||
- **Multi-Threaded SQLite Concurrency (`dashboard.py`)**:
|
||||
- Replaced global single `sqlite3` connection with thread-local connections (`threading.local()`) to prevent cursor collision and race conditions across concurrent HTTP worker threads.
|
||||
- Enabled `PRAGMA busy_timeout = 5000` and `PRAGMA journal_mode = WAL` to avoid database lock conflicts during batch processing writes.
|
||||
- **Editable Package Installation**:
|
||||
- Configured `pip install -e .` in environment setup to resolve `chicken_counter` imports and enable automatic unit test discovery without manual `PYTHONPATH` prefixes.
|
||||
|
||||
### ⚡ Performance & Optimization
|
||||
- **Disk Traversal Caching in Live Dashboard (`dashboard.py`)**:
|
||||
- Replaced repetitive `Path.rglob()` scans on every `/api/mortality/*` endpoint with a thread-safe 15-second in-memory TTL cache (`_MORTALITY_CACHE_TTL = 15.0s`).
|
||||
- Added $O(1)$ memory index lookup for serving annotated images (`/api/mortality/image/<filename>`), eliminating full filesystem traversals across 30GB+ video datasets.
|
||||
|
||||
### 📁 Configuration & Directory Structure
|
||||
- **Floor Configuration & Skeleton Paths**:
|
||||
- Created `configs/floor_config/kandang-atas.yaml` extending `cycle7_batch_optimized.yaml`.
|
||||
- Initialized missing directory skeletons for coops `K1-L1` through `K5-L2` under `../VIDEOS/cycle7/`.
|
||||
- **Documentation**:
|
||||
- Updated `README.md` and `RUN.md` with editable install steps and updated project layout.
|
||||
@@ -24,8 +24,9 @@ visual.
|
||||
|
||||
```text
|
||||
configs/
|
||||
floor_config/ ← Lightweight floor configs (K1-L1 to K5-L2)
|
||||
floor_config/ ← Lightweight floor configs (K1-L1 to K5-L2, kandang-atas)
|
||||
K1-L1.yaml .. K5-L2.yaml ← Extends cycle7_batch_optimized.yaml
|
||||
kandang-atas.yaml ← Extends cycle7_batch_optimized.yaml
|
||||
cameras/example_camera.yaml
|
||||
cycle7_batch.yaml
|
||||
cycle7_batch_optimized.yaml ← Base batch processing config
|
||||
@@ -62,6 +63,7 @@ test_run_folder/ ← Archive of test run scripts and logs
|
||||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements.txt
|
||||
venv/bin/pip install -e .
|
||||
```
|
||||
|
||||
For Jetson deployment you will usually want a Jetson-compatible OpenCV and PyTorch
|
||||
|
||||
@@ -22,6 +22,7 @@ cd chicken-counting-sukawarna-det
|
||||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements.txt
|
||||
venv/bin/pip install -e .
|
||||
```
|
||||
|
||||
> **Note**: If moving the project from another machine, always recreate the venv.
|
||||
@@ -34,8 +35,9 @@ venv/bin/pip install -r requirements.txt
|
||||
```text
|
||||
chicken-counting-sukawarna-det/
|
||||
├── configs/
|
||||
│ ├── floor_config/ ← Lightweight floor configs (K1-L1 to K5-L2)
|
||||
│ ├── floor_config/ ← Lightweight floor configs (K1-L1 to K5-L2, kandang-atas)
|
||||
│ │ ├── K1-L1.yaml .. K5-L2.yaml ← Extends cycle7_batch_optimized.yaml
|
||||
│ │ └── kandang-atas.yaml ← Extends cycle7_batch_optimized.yaml
|
||||
│ ├── cycle7_batch_optimized.yaml ← Main base batch processing config
|
||||
│ ├── cycle7_batch.yaml ← Alternate batch config
|
||||
│ ├── mortality_config.yaml ← Mortality (carcass) detection config
|
||||
|
||||
Reference in new issue
Block a user