The invention provides a YOLOv5s-based
safety equipment wearing target detection method and
system, and the method comprises the steps: firstly obtaining a port safety operation image, carrying out the
safety equipment wearing compliance marking according to a preset marking criterion, introducing an SIoU
loss function on the basis of a YOLOv5s
network model to replace a GIoU
loss function in the YOLOv5s
network model, and obtaining a new YOLOv5s
network model; a new YOLOv5s network model neck network is constructed, a dynamic hierarchy adjustment strategy is combined with an adaptive
feature fusion mechanism, the number of neural network
layers of an FPN structure in the new YOLOv5s network model neck network is automatically and dynamically adjusted, an improved FPNX structure is obtained, an improved YOLOv5s network model is further obtained, then first-stage
small target screening detection and second-stage
large target screening detection are sequentially carried out, and a new YOLOv5s network model is obtained. And obtaining the second target detection result containing all the
safety equipment in the target image to complete the wearing detection of the safety equipment, so that the detection capability of small targets and large targets can be remarkably improved to adapt to different detection scenes.