The invention discloses a safety helmet wearing detection and identification method and
system based on construction site scene context information guidance, and a medium, and belongs to the technical field of
visual identification, and the method comprises the steps: firstly, extracting the feature information of a picture sample through a
backbone network part; dynamic context information attention is utilized to guide refined feature information, and the focusing capability of the model on a safety helmet target is enhanced; multi-scale
feature fusion is performed based on guidance of a multi-stage dynamic context information attention module, and feature information in a
model learning process is refined. And identifying the gradient change of the attention distribution through a second-order central difference gradient approximate calculation method. And finally, detecting and identifying by a classifier and a
detector respectively. According to the method, the feature information in the
model learning process is refined, and the gradient information is added, so that the discrimination of fine-grained features can be adaptively improved, and the regional focusing capability is enhanced, and therefore, the detection precision and robustness of the safety
helmet worn by the
human body in a construction site scene can be remarkably enhanced.