HumanSignal / HumanSignal/label-studio-ml-backend
YOLO backend Max number of detection 300. Can we config via docker arg?
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 490
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
I wanted to use my own YOLO models for auto-labelling my images, but they only label up to 300 instances.
After some digging, I found this is due to a limit in Ultralytic's `.predict()` function.
I solved my case by just changing `results = self.model.predict(path)` to `results = self.model.predict(path, max_det=3000)` in `control_models/rectangle_labels.py` under the `predict_regions` function.
Can it be configured in the Docker Compose file to make it easier to change?
I might end up doing it at some point myself, but it may be a while before I get around to these changes, so I thought someone else might be able to get to them before me.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in control_models/rectangle_labels.py at predict_regions and trace how the YOLO model is created and how Docker Compose passes configuration into the backend. Determine where the max detection value can be exposed, then verify that auto-labelling supports a configured value above 300 and retains the existing default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, python
- Domain
- backend, devops, machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100