ct.models.pipeline.Pipeline gives different predictions than it's models run consecutively #2445
Labels
bug
Unexpected behaviour that should be corrected (type)
tf2.x / tf.keras
Issue could be related to tf2.x where coremltools isn't supported (component)
triaged
Reviewed and examined, release as been assigned if applicable (status)
🐞Describing the bug
The bug became apparent when we were trying to export a detection model to CoreML, using
ct.models.pipeline.Pipeline
to combine the detector (which outputs raw xywh boxes and confidences) and NMS model. The resulting pipeline model is giving incorrect predictions.However when we take the pipeline's models separately and run NMS model on the detector predictions the results are correct.
To Reproduce
Output (both pipeline predictions and individual models' predictions should be the same):
System environment (please complete the following information):
Summary:
pipeline_model.predict({'image': img})
we get incorrect resultsnms_from_pipeline.predict(detector_from_pipeline.predict({'image': img}))
the results are correct.n_classes
e.g. 1, 2 the code works as expectedThe text was updated successfully, but these errors were encountered: