docs: update README and RUN guides with engine auto-recompilation details

This commit is contained in:
proitlab committed 2026-08-19 10:21:30 +07:00
1 parent 010f6e1493
commit a2f44167a2
2 files changed
+34 -9

No files matched your search

+21
View File
@@ -26,6 +26,8 @@ visual.
configs/
cameras/example_camera.yaml
cycle7_batch.yaml
cycle7_batch_optimized.yaml
mortality_config.yaml
trackers/botsort_chicken.yaml
src/chicken_counter/
batch_discovery.py
@@ -35,6 +37,8 @@ src/chicken_counter/
compress.py
config.py
counting.py
engine_utils.py
mortality.py
motion.py
overlay.py
pipeline.py
@@ -42,6 +46,9 @@ src/chicken_counter/
tracking.py
types.py
video_writer.py
dashboard.py
export_engine.py
export_excel_report.py
```
## Install
@@ -223,6 +230,20 @@ for tuning.
- The optical-flow trigger is vision-first, though the config structure leaves room for
a future controller/encoder integration path
## Cross-Machine Portability & Self-Healing Engine Auto-Recompilation
TensorRT `.engine` files are compiled specifically for the host GPU architecture and TensorRT version. When copying the project to a different machine (e.g. from Jetson to NUC or across different RTX GPUs):
- **Automatic Compatibility Check**: `src/chicken_counter/engine_utils.py` runs a fast health check on the specified `.engine` before counting starts.
- **Self-Healing Recompilation**: If an incompatibility (e.g. platform tag mismatch or different compute capability) is detected:
1. The system automatically searches `models/` for the matching base `.pt` model weights (stripping hardware prefixes like `NUC5070_` or `jetson_`).
2. Automatically compiles a new optimized `.engine` on the host machine using FP16 precision.
3. Updates `defaults.detection.model_path` in `configs/cycle7_batch_optimized.yaml` automatically.
- **Manual Export Tool**: You can also compile engines manually anytime using `export_engine.py`:
```bash
./venv/bin/python export_engine.py models/chicken-detection-model-v26n-300e-best-2026-05-02-NEW.pt --half --workspace 4
```
## Multi-Stage Growth Cycles & Day 0 Configuration
The pipeline dynamically adjusts detection and ROI entry thresholds based on flock age (Days Old Chick / DOC vs Mid-Cycle):