Person identification and helmet detection

1. Background

        In many industries such as industrial production, building construction, mining, transportation, etc., safety helmets are all personal protective equipment that must be worn. The traditional helmet inspection method mainly relies on manual inspection, which requires a lot of manpower and time, and there may be problems such as incomplete inspection and missed detection. The personnel recognition and helmet detection system realized by computer vision technology can monitor the construction site around the clock, and can automatically detect and alert workers who do not wear helmets, thereby improving site safety and management efficiency.

2. Difficulties

  1. Complex scenes: On the construction site, there are dense personnel and mechanical equipment, and the environment is complex, and problems such as occlusion and insufficient lighting are prone to occur, making detection more difficult.

  2. Diversity of helmet colors and styles: The colors and styles of helmets on different construction sites may be different, and the colors may change due to time and usage. Therefore, for the algorithm, the treatment of diversity is A big challenge.

  3. High real-time requirements: Real-time performance is required for helmet detection on construction sites, because in the absence of helmets, once an accident occurs, the consequences will be very serious, so the algorithm needs to make a trade-off between real-time and accuracy.

  4. Face occlusion problem: On the construction site, personnel may wear masks and other occlusions, making face recognition more difficult, which in turn affects the accuracy of helmet detection.

        Therefore, hard hat detection on construction sites needs to overcome difficulties such as complex scenes, diverse helmet styles, high real-time requirements, and face occlusion in order to achieve accurate and effective helmet detection.

3. Technical solution

(1) Software design

1. Image collection: use the camera to collect real-time images and videos of the construction site

2. Image preprocessing: preprocessing and image enhancement for possible problems such as noise and insufficient light in the image

3. Target detection algorithm: Use YOLO and other algorithms to detect people and helmets

4. Data labeling: label the collected images, and mark the positions of personnel and helmets

5. Algorithm training: Use the labeled data set to train the target detection algorithm

6. System integration: build a complete system, web + mobile

 (2) Hardware design

1. Image acquisition equipment: camera, such as Hikvision. Pay attention to the installation position, angle, quantity, etc.

2. Data processor: use high-performance computers or embedded devices to process images and perform algorithmic operations

3. Storage device: hard disk and other storage devices to store the collected images

4. Network communication equipment: the system needs to use network equipment to transmit and interact with the algorithm model and the collected images

5. Front-end equipment: the system needs to use monitors, touch screens and other equipment as the front-end interface to provide human-computer interaction functions

 4. Target detection

Using the YOLOV5 algorithm, the main steps are as follows:

1. Data labeling (use cpu to run YOLOV5 for the first time, select 120 pictures of cats for experiments, and label them with labelme)

2. Data training: The marked data set was used for training. Since it was run by CPU, it took more than 6 hours for 120 pictures. View training results in runs/train/exp 

 

 3. Data test: It is found that cat has been recognized as personԅ(☉Д☉)╮, the reason is that the category name in the cat.yaml file was not changed to cat during training

 5. Helmet testing

 The training steps of helmet data weights are the same as above, here are the trained weights:

click

 Picture test: as follows, under the training of a large number of data sets, the map value is around 0.95, and the accuracy is high

Video detection:

 Camera detection:

 6. Unresolved issues

1. Failure to detect whether the helmet is worn correctly

Difficulties: In the real environment, it is easily affected by light, angle, occlusion, etc.;

Idea: Using various technologies, such as installing smart sensors on hard hats to test whether the wearer is wearing the hard hat correctly (but will increase the cost problem);

2. Failure to detect hard hats of different colors

Difficulties: In the real environment, it is affected by light, distance, etc.;

Idea: When labeling data, mark the color of each helmet; during image preprocessing, denoise, color space conversion, etc., to improve accuracy;

3. Failure to remind personnel to wear safety helmets

Idea: Using a variety of technologies, when the camera detects that a person is not wearing a helmet, real-time information is fed back to the security officer; the smart helmet will also emit a warning sound.

7. Summary

This article originated from a report PPT of the computer vision course, which is relatively simple and has many shortcomings. At that time, I spent the main time and energy on the yolov5 experiment. The yolov series is very powerful and has a wide range of applications. I hope that I will have a lot of energy to learn YOLOV in the future. 


Guess you like

Origin blog.csdn.net/weixin_44686138/article/details/130168417