Skip to content

Commit 464af3c

Browse files
authored
Add max_det parameter to model prediction
1 parent b991f4f commit 464af3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

label_studio_ml/examples/yolo/control_models/rectangle_labels.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def is_control_matched(cls, control) -> bool:
3333
return control.tag == cls.type
3434

3535
def predict_regions(self, path) -> List[Dict]:
36-
results = self.model.predict(path)
36+
max_det = int(self.control.attr.get("model_max_det", 300))
37+
results = self.model.predict(path, max_det=max_det)
3738
self.debug_plot(results[0].plot())
3839

3940
# oriented bounding boxes are detected, but it should be processed by RectangleLabelsObbModel

0 commit comments

Comments
 (0)