Filter detector class IDs before class-agnostic suppression and crop selection

Filter detector class IDs before class-agnostic suppression and crop selection.

In a detector-to-OCR pipeline, apply the explicit allowed-class mapping before non-maximum suppression, top-k ranking, and cropping. Filtering afterward cannot recover a valid target already suppressed by a higher-confidence overlapping prediction of an ineligible class. Keep rejected proposals separately for diagnosis; missing class identity should fail closed when the deployed contract requires an explicit class. This applies to class-agnostic NMS or cross-class ranking; class-aware NMS already isolates classes, but downstream ranking still needs eligibility filtering. It is an inference-contract correction, not evidence of better learned weights.