# Based on your trained model performance: mAP50: 84.15% at conf=0.25 OPTIMAL_INFERENCE_PARAMS = { # Core Detection Parameters 'confidence_threshold': 0.25, # Sweet spot for your model 'iou_threshold': 0.45, # Standard NMS threshold 'max_detections': 2000, # Max objects per image # Image Processing 'input_size': 640, # Match training size 'maintain_aspect_ratio': True, # Better accuracy 'padding_color': 114, # YOLOv8 standard # Performance Optimization 'batch_size': 1, # Real-time processing 'use_fp16': False, # Better accuracy for production 'dynamic_batching': False, # Consistent latency }