diff --git a/label_studio_ml/examples/yolo/control_models/rectangle_labels.py b/label_studio_ml/examples/yolo/control_models/rectangle_labels.py index 035eb7d1..1c47754b 100644 --- a/label_studio_ml/examples/yolo/control_models/rectangle_labels.py +++ b/label_studio_ml/examples/yolo/control_models/rectangle_labels.py @@ -33,7 +33,8 @@ def is_control_matched(cls, control) -> bool: return control.tag == cls.type def predict_regions(self, path) -> List[Dict]: - results = self.model.predict(path) + max_det = int(self.control.attr.get("model_max_det", 300)) + results = self.model.predict(path, max_det=max_det) self.debug_plot(results[0].plot()) # oriented bounding boxes are detected, but it should be processed by RectangleLabelsObbModel