| Smoking not only affects people’s health,but also poses a major potential safety hazard in the construction site as a kindling.Although smoking is strictly prohibited on the construction site,there are still many workers smoking on the construction site,and even many fire accidents caused by smoking have occurred.It is of great research significance to monitor the smoking behavior of workers.In thesis,in the next work,we investigate the YOLOv4-based field smoking detection algorithm.(1)The prediction frame evaluation metrics and loss functions of the YOLOv4 algorithm are investigated.The distance between the prediction box and the center point of the real box in the horizontal and vertical directions is fully considered,and thesis reintroduces a new loss function.The loss function can use the ratio of the rectangular area mapping the horizontal and vertical distances between the centers of the two boxes to the minimum closed area of the two boxes as the location loss term,and the penalty term for the overlapping area of the two boxes is the latter penalty term of the intersection and merge ratio(IOU),while the penalty term for the aspect ratio is also the latter penalty term of the full IOU(CIOU).The test results show that the AP value of YOLOv4+SIOU model has reached 87.69%,and the recall rate has reached 90%,indicating that the SIOU prediction box evaluation index and YOLOv4 algorithm are highly effective in improving the accuracy of smoking detection,which can provide more accurate positioning for smoking in the construction site and reduce the possibility of missing smoking detection.(2)The YOLOv4-based site smoking detection algorithm has a large number of network parameters,requires more resources,and takes longer to detect,which is difficult to apply in embedded systems.Thesis proposes an optimization scheme of smoking detection algorithm for construction sites based on YOLOv4: first,lightweight.Thesis uses Mobile Netv2 lightweight network to replace YOLOv4+SIOU’s CSPMarknet53 for feature extraction,thus realizing the lightweight network structure.Secondly,Thesis optimizes the feature fusion module of YOLOv4+SIOU algorithm,adds an effective feature layer to detect the head size 104 * 104,and fuses it with the other three feature layers to form an enhanced feature extraction network of four feature layers.The improved Small-YOLOv4+SIOU algorithm can not only improve the site smoking detection accuracy,but also greatly improve the detection rate,with the Frames Per Second(FPS)detection rate increasing from 19.8 to 35.3.(3)In order to implement the site smoking detection,thesis transposes the site smoking detection algorithm to a mobile platform site smoking detection system using Raspberry Pi 4B as the development board.The system is equipped with HD camera and smart carts,and a computational stick is used to assist in computing and designing the site smoking detection system.Through experiments,we know that SmallYOLOv4+SIOU algorithm has a higher FPS value of 13.2 in the Raspberry Pi system for site smoking detection,which is more suitable for the actual testing requirements.Therefore,this paper will use Small-YOLOv4+SIOU algorithm for site smoking detection. |