0
$\begingroup$

I want to detect the people that are NOT wearing PPE vests using a pre-trained object detection model like YOLO or Grounding Dino.

The models are able to detect people and vests separately, but I am not sure how to detect person WITHOUT a vest.

How do I go about doing this in the general sense? Below are the options that I could think of:

  1. Collect datasets of people wearing vests and not wearing vests, annotate them, and train the model for these. I am unsure because I think the differences are minor.

  2. Detect person, get the bounding box. Inside that box, detect a vest. If it does not exist, it's a person without a vest. Not sure if there is a term for this or how I'd code it.

  3. Detect "person" and "vest". If number of people > number of vests detected, then there is a person without a vest. Not sure how to detect which person is without a vest. Perhaps find a person that has no overlap with a vest

Which of the above options is a viable solution? Any other suggestions are also welcome. I am new to this, so I don't know if this is a common problem or how to solve it. If anyone could guide me towards the correct direction, I'd greatly appreciate it.

$\endgroup$

2 Answers 2

0
$\begingroup$

I'd go with option 2 personally, given that you already have a model that can detect people and vests to a level you are comfortable with. YOLO will output a "boxes" variable that contains the dimensions and class of your boxes. When boxes.cls indicates that this box contains a person, crop at the box dimensions given by boxes.xyxy, and look for a vest in the cropped image (or just check if boxes.xyxy when boxes.cls is a vest is contained by the boxes.xyxy for the person). That way you know who is and isn't wearing a vest, rather than just whether there is difference in the number of person and vest detections, and don't have to train a whole new model to detect people with and without vests.

$\endgroup$
0
$\begingroup$

I would augment the model by adding a binary classification output for each detected object, which is responsible for predicting whether or not a person is wearing a vest. This approach requires data labeling, which can be automatically labeled using an existing pre-trained model that can accurately detect both people and vests in the images.

The options 2 and 3 may require manual tuning of parameters, such as thresholds for object detection and classification. This can be achieved by training the DNN end-to-end. Also, option 2 may cause performance issues if the detector is invoked two times.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .