You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When training detection models, sometimes only certain regions of an image are labeled to reduce labeling costs. For example, in footage of a zoo, we might label only the birds inside an area and ignore birds outside the area.
The request is to add a flag that, when enabled, restricts training, validation, and testing to the labeled regions of each image. These regions would be computed automatically by enclosing the labeled bounding boxes in a polygon (such as a convex hull) or a bounding rectangle.
During training, the loss should only be computed within these regions, so the model isn't penalized for detecting unlabeled objects outside them. During validation and testing, any detections outside the regions would be ignored and not counted as false positives. This would ensure both training and evaluation focus only on the labeled areas, producing accurate metrics for partially labeled datasets.
I've been thinking about it today, and I don't think it's a good addition to LibreYOLO at the moment because it would touch sensitive parts of training and validation in basically every model, and those are the parts I least want to break.
I think this belongs in preprocessing. Since your cameras are fixed, you can paint the unlabeled part of each camera's view flat gray (114, 114, 114), one polygon per camera, or crop to the labeled area, and do it the same way for training, validation and inference. That way the model never sees the unlabeled birds, so it isn't taught they are background.
I'm open to changing my mind if you think my arguments are wrong or I've missed something, but for now, after thinking it through, I'd rather not add it for now.
Activity
EHxuban11 commentedon Oct 17, 2026
Hey @christuchez ,
Thank you for opening this issue, as always!
I've been thinking about it today, and I don't think it's a good addition to LibreYOLO at the moment because it would touch sensitive parts of training and validation in basically every model, and those are the parts I least want to break.
I think this belongs in preprocessing. Since your cameras are fixed, you can paint the unlabeled part of each camera's view flat gray (114, 114, 114), one polygon per camera, or crop to the labeled area, and do it the same way for training, validation and inference. That way the model never sees the unlabeled birds, so it isn't taught they are background.
I'm open to changing my mind if you think my arguments are wrong or I've missed something, but for now, after thinking it through, I'd rather not add it for now.
Ignore COCO crowd regions in the confusion matrix and image metrics