| With the progress of society and the continuous improvement of living standards,people are increasingly raising dogs.Pet dogs have gradually integrated into people’s daily lives,bringing joy to people but also bringing many problems.Due to improper management of pet dog ownership or blind selection of dog breeds solely based on personal preferences,incidents of pet dog injuries often occur,Relevant departments have formulated corresponding management methods and regulations.In order to effectively monitor the violations of dogs in public places,this article studies the target detection of dog and chain objects to achieve the judgment basis for dogs wearing traction necklaces and achieve violation behavior monitoring.This article is based on the YOLOv5(You Only Look Once)algorithm for object detection research,and has made improvements according to actual needs.The core is to optimize the backbone network to improve detection efficiency.The specific optimization is as follows:(1)In order to solve the problem of detection object loss caused by blurring and occlusion of small and medium-sized targets in actual scenes,one of the C3 structures in the backbone layer network of YOLOv5 s is replaced with the CBAM attention mechanism to improve the model’s anti-interference ability.This improvement can encourage the model to ignore some irrelevant information,focus more attention on key features,and improve target detection accuracy.(2)In order to deal with the problem of losing Receptive field due to too large shape change of chain objects,one of the Conv ordinary convolution kernels is replaced by Dconv deformable convolution on the backbone network of YOLOv5 s.This improvement can help the model expand the Receptive field and improve the detection performance of deformed objects by changing the length and width and rotating on the basis of the original convolution kernel.In order to verify the detection efficiency and practicality of the formed YOLOv5 s DCB detection model,the Py Torch deep learning framework was used to deploy the trained dog violation detection model,and a prototype program was developed using Py Qt,providing beneficial engineering practice for dog violation behavior detection. |