Problem Statement
The smart automatic fallback routing layer described in docs/tensorrt_conversion.md is currently missing from the Detector class. This causes all unit tests in tests/test_tensorrt_routing.py to fail with AttributeError (as self.model_path is not set on the Detector object), and prevents the system from automatically utilizing optimized .engine formats or falling back gracefully to .pt formats when CUDA is unavailable or when running on CPU.
Proposed Solution
Add fallback routing logic, file path existence checks, and exception handling inside Detector.__init__ in services/detection/detection.py. When initializing, the detector should check if an engine model exists and can be loaded. If not, it should log a warning and fall back to the baseline .pt model, setting self.model_path correctly.
Affected Component
Detection (YOLOv8/v9 — services/detection/)
Estimated Difficulty
🟡 Intermediate — Requires understanding of one service
Alternatives Considered
No response
Additional Context
No response
Contribution
Checklist
Problem Statement
The smart automatic fallback routing layer described in
docs/tensorrt_conversion.mdis currently missing from theDetectorclass. This causes all unit tests intests/test_tensorrt_routing.pyto fail withAttributeError(asself.model_pathis not set on theDetectorobject), and prevents the system from automatically utilizing optimized.engineformats or falling back gracefully to.ptformats when CUDA is unavailable or when running on CPU.Proposed Solution
Add fallback routing logic, file path existence checks, and exception handling inside
Detector.__init__inservices/detection/detection.py. When initializing, the detector should check if an engine model exists and can be loaded. If not, it should log a warning and fall back to the baseline.ptmodel, settingself.model_pathcorrectly.Affected Component
Detection (YOLOv8/v9 — services/detection/)
Estimated Difficulty
🟡 Intermediate — Requires understanding of one service
Alternatives Considered
No response
Additional Context
No response
Contribution
Checklist