'Can we combine YOLOv5 object detection model with anomaly detection?

I am working on a helmet detection model using yolov5, I need to detect only safety helmets as helmet class and other helmets(bike helmets, cricket helmets, no helmets) as no helmet class. So Is there any way to perform object detection on no helmet class without labeling the data? Can we perform anomaly detection on such kind of dataset?

dataset



Solution 1:[1]

YOLO as any other object detection model will output those things, that you will label - if you label only safety helmets, well trained model will try to give you only safety helmets, and ignore all other kind of helmets (or heads without helmets). If you want to detect "no helmets", you will need to label another class "no helmets".

Sure it's possible to use anomaly detection here (e.g. simple encoder-decoder architecture) above detections (input of anomaly detection model will be output, bounding box, of YOLO). Probably results will be better, but this solution will be more resource-intensive (run two models vs one).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maxim Lyuzin