Expose max_det parameter in detect/segment mode
In detect/segment mode, YOLO limits the number of predicted objects to 300 by default. However, in some cases (newspapers) this is not enough.
We should expose the max_det
parameter in the worker, and update the prediction to:
results = self.model(
image,
device=self.device,
conf=self.confidence_threshold,
+ max_det=self.max_detection
)