Browse Source
- Remove INPUT_SIZE, NUM_DETECTIONS, NUM_CLASSES constants - Use generic fallback values (640, 300, 96) instead of named constants - All model metadata now extracted dynamically from ONNX runtime at initialization - Fallbacks only used if dynamic extraction fails (safety net) - Ensures complete consistency between model training and inference The system now: 1. Extracts input size from ONNX model input tensor shape 2. Extracts detection count from ONNX model output tensor shape 3. Extracts class count from dataset.yaml (via ClassificationManager) 4. Infers output features per detection from model output shape This eliminates all hardcoded assumptions about the specific model being used. Related todos: #remove-hardcoded-constants 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>arch-002-ml-inference-engine
1 changed files with 5 additions and 8 deletions
Loading…
Reference in new issue