Image quality distortion detection and identification system and method and automatic tracking pusher
By using image quality distortion detection and automatic tracking technology in the mask wearing detection system, it solves the problem of error caused by image distortion and blur in the detection, and achieves accurate identification and automatic tracking of those who do not wear masks. Sexuality and application.
Patent Information
- Application Number
- CN202411967721.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The prior art detects whether a person wears a mask, which is affected by image distortion and blur, resulting in errors and inability to make accurate judgments.
The main control system, image acquisition unit, image processing unit, image recognition unit, and feature detection unit masks are adopted by the main system and automatic tracking device. Get the video stream through the OpenMV camera, use the image quality distortion detection method, including the gray value square meter computing and dual -value image filtering, identify and lock the person who is not wearing a mask, and help through the automatic tracking device and the shunter system.
Improve the accuracy and accuracy of the detection, automatically track and warn when identifying those who do not wear a mask, provide help, and reduce misunderstanding and error judgment.
Smart Images

Figure CN119380032A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mask wearing detection, and in particular relates to an image quality distortion detection and recognition system and method and an automatic tracking pusher. Background Art
[0002] With the rapid development of computer technology in recent years, video image object detection technology based on deep learning has gradually developed.
[0003] At present, most mask wearing recognition is based on algorithms, using the Yolo model and camera in target detection, only using the camera to recognize fixed images, and using the model to make probabilistic judgments about the people in the images. However, the above method results in a small supervision area, making it impossible to lock people, and unable to provide help and support for those who are not wearing masks.
[0004] In actual application, when detecting whether a person is wearing a mask, the image obtained by the camera is distorted and blurred because the person being detected is in a state of rapid movement, resulting in errors in detection and inability to make accurate judgments.
[0005] In view of this, how to solve the defects in the above technical solutions has become one of the urgent problems to be solved in the field of mask wearing detection technology. Summary of the invention
[0006] In view of the problems existing in the background technology, the present invention provides a mask wearing detection and recognition system, including a main system, a main control system of an automatic tracking device; an image acquisition unit; an image processing unit; an image recognition unit and a feature detection unit, and The detection method of the image quality distortion detection and recognition system is characterized by comprising the following steps: Step S1, first receiving a pedestrian mask wearing detection request sent by the main system; Step S2, determine the candidate area (using sliding windows of different sizes to frame a certain image area in the image as the candidate area), Use the openmv camera to obtain public places and personnel flow monitoring videos to obtain original sampled images; Step S3, extracting visual features related to the candidate regions of the original sampled image; Step S4, processing the acquired original sampled image; S4.1, convert the image into a grayscale image through the built-in img.to_grayscale function of the openmv camera, and obtain the standard deviation of the image grayscale value through the image.statistics.stdev function, and perform square operation through the grayscale value variance formula to obtain the grayscale value variance; S4.2, if the gray value variance of the image is higher than the set threshold value 300, the frame image is considered to have a higher definition and is applied, and the process proceeds to the next step S5; S4.3, if the gray value variance of the image is lower than the set threshold, the frame image is considered blurred, the frame image is discarded, and the process goes to step S2 to re-capture the image; Among them, the image gray value variance formula is: s=\frac {1} {{N}_{x}{\cdot N}_{y}}\sum ^{{N}_{x}}_{x=1} {\sum ^{{N}_{y}}_{y=1} \left [ {} \right ]}\left [ {f\left ( {x,y} \right )-g} \right ]^{2} Where g is the average grayscale value of the image pixels; s is the grayscale value variance of the image pixel grayscale value; is the number of horizontal pixels in the image; The number of vertical pixels in the image; Pixel The gray value of are the horizontal and vertical coordinates of the pixel points respectively; Step S5, using a classifier to identify, and analyzing and preprocessing the extracted data; such as: the location coordinates of the pedestrian, and determining whether the pedestrian is wearing a mask; S5.1, obtain the color threshold to be detected through the threshold editor of the machine vision system of the openmv camera, and adjust the maximum and minimum values of the three parameters L, A, and B in the LAB color space for the RGB565 image through the binary image filtering method to obtain a specific color threshold list thresholds; S5.2, identify the mask markers in each frame of the image acquired by the openmv camera, and divide the outer image into foreground, and divide the other images into background; according to the threshold calculation formula, If the pixel value belongs to the threshold range T, the pixel is classified as foreground; If the pixel value does not belong to the threshold range T, the pixel is classified as background; The formula is as follows: in, Indicates that the image is The L, A, and B thresholds at , T represents the range of values that the three parameters L, A, and B can take; S5.3, after binary filtering, the find_blobs function built into the openmv camera is used to find the foreground (i.e., mask) area in the image in the form of color blocks, and feedback relevant information (location information, and whether a mask is worn); S5.4, receiving the information from step S5.3, analyzing and judging the received data, if the person is wearing a mask, proceed to the next step S6; If the pedestrian is not wearing a mask / wearing a mask abnormally, the pre-processed image recognition information is input to the input end of the stm32 controller; S5.5, after the input end of the STM32 controller receives the signal processed by the image of the OpenMV camera, the OpenMV camera generates an identification frame, locks the pedestrian, obtains the relative position of the frame and the screen in real time, and transmits it to the STM32 controller, and the STM32 controller generates a PWM signal; S5.6, the automatic tracking device receives the pwm signal from the stm32 controller, and under the drive of the pwm signal, controls the automatic tracking device to automatically track the person, and feeds back the tracking status to the main control system of the automatic tracking device; Wherein, the automatic tracking device includes two states: Normal status: people who are not wearing masks are tracked; Abnormal status: No person without a mask was tracked; S5.7, the automatic tracking device receives the tracking status information transmitted from step S5.6. If the automatic tracking device tracks a person who is not wearing a mask, it proceeds to the next step S5.8; S5.8, the pusher system receives the tracking status information, pushes out a mask through the pusher, and at the same time gives a voice reminder through the voice reminder module to remind the pedestrian to take the mask and wear it; S5.9: If the mask is worn normally after the reminder, go to step S6. If the mask is not worn normally, the extracted pedestrian image information is transmitted to the system cloud to determine the identity information of the corresponding pedestrian, and the pedestrian is controlled and processed according to the identity information of the pedestrian; Step S6, continue to detect the next frame of image; Optionally, step S2 further includes the steps of: S2.1, obtaining the monitoring image collected by the openmv camera through the image acquisition unit, and the openmv camera captures the real-time video stream through its built-in sensor; S2.2, obtaining information of the image acquisition unit; Through the image processing unit, each frame of the video stream is converted into a sampled image by format conversion; Use sliding windows of different sizes to frame a certain image area in the image as a candidate area, and crop the candidate area in the sampled image to obtain a portrait image; S2.3, receiving all sampled images, obtaining portrait image information, identifying whether there is a face in the sampled image based on facial features through an image recognition unit, and generating a recognition result; S2.4, transmitting the recognition result to the feature detection unit, and using the classifier to perform recognition and judgment to determine whether the face is wearing a mask; Optionally, a database is constructed for training to improve the accuracy of mask wearing detection. The training methods include: (1) Collect a large number of facial images of people wearing and not wearing masks as initial data, and then annotate and classify these images; The face image is input into the trained classifier, and the information output by the learning model is used to indicate whether the target face in the partial face image is wearing a mask, thereby obtaining a face occlusion recognition model; (2) Deploy the trained face occlusion recognition model to the OpenMV camera; use the OpenMV camera to capture images in real time, extract the mask or facial features in the picture, and then lock and track them, and run the model deployed in it to determine whether the face in the image is wearing a mask.
[0007] Detection method for image quality distortion detection and recognition system, Optionally, step S5.6 includes two states: automatic tracking and manual remote control.
[0008] Optional, visual automatic tracking modes, including: ① Use the Openmv camera to identify the image in the lens, locate and identify the face, and determine the probability of wearing a mask (mask) or not wearing a mask (face); ② If the pedestrian is judged to be not wearing a mask, the center position of the box is obtained through the Openmv camera and compared with the center of the lens image; ③ Obtain the x-axis and y-axis coordinates, and transmit the two position coordinates to the stm32 controller through serial communication; ④ According to the x-axis and y-axis coordinates in step ③, the system drives the automatic tracking device so that the first gimbal drives the Openmv camera to move left and right; at the same time, the system drives the second gimbal so that the second gimbal drives the Openmv camera to move up and down, thereby tracking people who are not wearing masks.
[0009] Optionally, when the tracking mode does not need to be enabled in the actual situation and only a fixed angle needs to be identified and judged, the manual remote control mode is entered; The method for manually adjusting the direction of the camera includes the following steps: 1>Connect and transmit the Openmv camera to the host computer, and display the image observed by the camera in real time on the host computer; 2> If the camera's viewing direction does not meet the current monitoring requirements, shake the remote control's joystick to send out a radio wave signal; 3> The first pan-tilt and the second pan-tilt of the automatic tracking device respectively receive the radio wave signal from step 2>, start the first pan-tilt of the automatic tracking device, so that the first pan-tilt drives the Openmv camera to move left and right; at the same time, start the second pan-tilt, so that the second pan-tilt drives the Openmv camera to move up and down, thereby adjusting and locking the camera recognition direction.
[0010] Optional, tracking pusher, including: Automatic tracking device; and a pusher for use with an automatic tracking device; A remote controller used in conjunction with the automatic tracking device, the remote controller comprising a transmitter and a receiver, The receiver is connected to the main control system of the automatic tracking device. And the main control system of the automatic tracking device is connected to the openmv camera; The pusher comprises a body, and the body is detachably connected. The machine body is driven by a driving system, and the driving system has a built-in steering gear for controlling the first pan / tilt head to rotate in a horizontal direction; A detachably connected body is mounted on the first gimbal; An openmv camera is arranged on the body, wherein the openmv camera comprises a second pan-tilt platform and a high-performance camera and an stm32 controller installed on the second pan-tilt platform; And the second gimbal has a built-in drive system; The remote controller also includes a single chip microcomputer. The single chip microcomputer comprises: NRF24L01 module connection port, used to connect the NRF24L01 module on the remote control, through the NRF24L01 module on the remote control and the NRF24L01 module set in the stm32 main control system of the body, to transmit information and wirelessly communicate with 2.4G signals; OLED connection port; Right joystick wiring port; Switch wiring port; Left joystick wiring port; The NRF24L01 module wiring port is connected to the stm32 controller of the body main control system through signal transmission; The OLED connection port is connected to the OLED display screen. The right joystick connection port and the left joystick connection port are connected to the right joystick and the left joystick of the remote controller respectively. The switch wiring port is connected to a control switch of a remote controller.
[0011] Optionally, the machine body includes a push plate, The push plate is provided with a through slot for the mask storage part to extend into. The mask storage part is divided into two groups of upper and lower cavities by a push plate, and the end surface of the push plate located in the upper cavity is used to place the mask; the mask storage part cooperates with the push plate so that the push plate can move up and down along the longitudinal direction of the body, thereby adjusting the space of the upper cavity of the mask storage part; A first stepper motor is arranged in the body at a position far away from the push plate; A through groove is provided on the end surface of the mask storage component away from the first stepper motor; The machine body adopts a double-layer shell. The machine body is provided with an output port. The output port is arranged corresponding to the tank body; A second stepping motor is installed on the side end surface of the mask storage component near the position of the slot. The driving end of the second stepper motor is connected to the rotating shaft. The rotating shaft passes through the mask storage part. Extending into the tank, A mask pushing roller is installed on the rotating shaft located in the tank body. The mask advancing roller is detachably connected.
[0012] Optionally, the cross-sectional shape of the mask pushing roller is determined by angles α, β and c and the first end face, the second end face and the third end face; The extension line of the first end surface and the extension line of the second end surface intersect to form a first arc-shaped end portion, and the first arc-shaped end portion has an angle α, 5°≤a≤35°; The extension line of the first end face and the extension line of the third end face intersect to form a second arc-shaped end portion, and the second arc-shaped end portion has an angle c, 12°≤c≤75°; The extension line of the second end face intersects with the extension line of the third end face to form a third arc-shaped end portion, and the third arc-shaped end portion has an angle β, 8°≤β≤145°, and the diameter of the third arc-shaped end portion is greater than the first arc-shaped end portion and the second arc-shaped end portion.
[0013] Optionally, an upwardly inclined guide plate is installed on the machine body at the output port. And the inclination angle R is 3°, A mask separation component is provided on the body at a position opposite to the guide plate. The mask separation assembly is detachably connected. The mask separation component is made of rubber material; The mask separation assembly is used to make the distance between the guide plates L1, And L1 is 0.4 mm.
[0014] In summary, the beneficial effects of the present invention are: (1) The present invention has two modes: automatic tracking and manual adjustment tracking, which greatly improves its applicability and makes its application scope wider. By using the automatic tracking device in conjunction with the openmv camera, it can lock the person who is not wearing a mask. The present invention can automatically track and warn the person who is not wearing a mask while identifying that the person is not wearing a mask; it has wider applicability.
[0015] (2) The present invention uses the tracking mode to communicate with the serial port of the openmv camera and the stm32 microcontroller in actual application. When the openmv camera recognizes that there is a person who is not wearing a mask in the lens, it generates an identification frame lock. When the stm32 controller receives the signal processed by the image on the openmv camera, it generates a pwm signal and controls the movement of the automatic tracking device under the drive of the pwm signal, thereby increasing the supervision area. The automatic tracking device and the openmv camera are used together to achieve the locking of the person.
[0016] (3) The manual adjustment mode of the present invention converts analog signals into digital signals through the remote control, and uses the analog quantity generated by the resistance voltage change of the remote control joystick movement, which is converted into a digital signal through ADC sampling and stored in the single-chip microcomputer, and then different PWM signals are output for different digital quantities to control the movement and adjustment of the automatic tracking device. While improving the applicability, it prevents the automatic system from failing in an unexpected situation and timely intervention. Through the remote control, the operator can quickly adjust the automatic tracking device to adapt to environmental changes and ensure normal operation; When the tracking mode does not need to be enabled in the actual situation, and only a fixed angle needs to be identified and judged, the manual remote control mode is entered. Compared with the conventional mask recognition system, the camera recognition direction can be adjusted in real time through the remote control according to different situations to meet different monitoring needs.
[0017] (4) The present invention adds a pusher, and in actual application, uses an image quality distortion detection and recognition system to identify whether a pedestrian is wearing a mask. If the pedestrian is not wearing a mask, the person is locked by an automatic tracking device. At the same time, the pusher can provide masks in time to provide help and support to those who are not wearing masks.
[0018] (5) By adding a mask separation component, when the OpenMV camera detects that a pedestrian is not wearing a mask, the second stepper motor is started, thereby driving the rotating shaft to rotate, and the mask pushing roller disposed on the rotating shaft is driven to rotate through the rotation of the rotating shaft. Since the third arc-shaped end has the largest diameter, when the mask pushing roller rotates to the third arc-shaped end, so that the third arc-shaped end conflicts with the end face of the mask, the mask is pushed toward the output port through the third arc-shaped end until the mask is pushed out of the output port; when the mask is pushed out of the output port, only one mask is allowed to be pushed out, and the second mask will be blocked by the mask separation component, thereby preventing multiple masks from being output at one time.
[0019] (6) The present invention can reduce image distortion and blurring, which may lead to misidentification and misjudgment, improve detection accuracy, and enable accurate detection. When used, threshold segmentation can be used to optimize misidentification and misjudgment caused by complex and changeable scene backgrounds, and the range of the mask is assigned to the foreground, and other environmental displays are assigned to the background. By acquiring the foreground area, the image quality distortion detection and recognition system combined with the relative position after binarization can greatly improve the judgment accuracy and position accuracy of the mask. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flow chart of the steps of the mask wearing detection method of the present invention; Figure 2 For the present invention Figure 1 The middle part of the process is enlarged; Figure 3 For the present invention Figure 1 Another part of the process is enlarged; Figure 4 It is a schematic diagram of the structure of a single chip microcomputer of the image quality distortion detection and recognition system of the present invention; Figure 5 This is a schematic diagram of the overall structure of the pusher for mask wearing recognition and detection of the present invention; Figure 6 For the present invention Figure 7 Sectional view at the middle AA position; Figure 7 This is a schematic diagram of the internal structure of the pusher for mask wearing recognition and detection of the present invention; Figure 8 This is a schematic diagram of the overall structure of the push mechanism of the pusher for mask wearing recognition and detection of the present invention; Fig. 9 A schematic cross-sectional view of a mask pushing roller of a pushing mechanism of a pusher for mask wearing identification and detection of the present invention; Fig.10 For the present invention Figure 8 An enlarged view of the mask separation component structure at the position; Fig.11 This is an enlarged view of the push plate structure of the pusher for mask wearing identification and detection of the present invention; Fig.12 To obtain the foreground area of the mask wearing recognition detection of the present invention, the mask recognition model is combined with the effect diagram of the relative position after binarization.
[0021] Reference numerals: 100. Tracking pusher; 10. Single chip microcomputer; 101, OLED connection port; 102, NRF24L01 module wiring port; 103. Right joystick connection port; 104. Switch connection port; 105. Left joystick connection port; 20. Body; 201, output port; 202, first step motor; 203, lead screw; 204. Mask storage; 205, push plate; 2051, through the tank body; 207, tank body; 208. Gap; 30. Mask separation components; 40. openmv camera; 401. second PTZ; 50. Drive system; 60. Promoting agencies; 601, second stepping motor; 602, shaft; 603, mask pushing roller; 6031, first end surface; 6032, second end surface; 6033, third end surface; 70. The first cloud platform. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Although exemplary embodiments are disclosed in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to facilitate a thorough understanding of the present invention and to fully convey the concept of the present invention to those skilled in the art.
[0023] In the description of this specification, the description with reference to the terms "certain embodiments", "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0024] In the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance; the term "plurality" refers to two or more, unless otherwise clearly defined. The terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0025] Since the inspected personnel are in a state of rapid movement, the edge sharpness of the acquired image is reduced, and the grayscale distinction between pixels is not obvious, which leads to distortion and blurring of the image acquired by the camera; this leads to errors in the detection and inability to make accurate judgments. In order to solve the above technical problems, such as Figure 1-12 As shown, this embodiment provides an image quality distortion detection and identification system, including a main system, a main control system of an automatic tracking device and a pusher system; wherein the main system includes an image acquisition unit, an image processing unit, an image recognition unit and a feature detection unit.
[0026] like Figure 1-12 As shown, the mask wearing detection and image blur and distortion processing method of this embodiment includes the following steps: Step S1, first receiving a pedestrian mask wearing detection request sent by the main system; Step S2, determine the candidate area (using sliding windows of different sizes to frame a certain image area in the image as the candidate area), Use the openmv camera to obtain public places and personnel flow monitoring videos to obtain original sampled images; Step S3, extracting visual features related to the candidate area of the original sampled image (the face and mask image of the pedestrian); Step S4, processing the acquired original sampled image; S4.1, the image can be converted into a grayscale image through the built-in img.to_grayscale function of the openmv camera, and the standard deviation of the image grayscale value can be obtained through the image.statistics.stdev function. The grayscale value variance formula is used to perform a square operation to obtain the grayscale value variance; S4.2, compare the calculated result with the set variance threshold to determine whether the image is blurred. If the gray value variance of the image is higher than the set threshold of 300 (this value is the average value of the clear state obtained after multiple experiments), the frame image is considered to have a high definition and is applied to the next step. S4.3, if the gray value variance of the image is lower than the set threshold, the frame image is considered blurred, the frame image is discarded, and the process goes to step S2 to re-capture the image; thereby, misidentification can be effectively prevented; Image gray value variance formula: s=\frac {1} {{N}_{x}{\cdot N}_{y}}\sum ^{{N}_{x}}_{x=1} {\sum ^{{N}_{y}}_{y=1} \left [ {} \right ]}\left [ {f\left ( {x,y} \right )-g} \right ]^{2} In the formula, g is the average grayscale value of the image pixels; s is the grayscale value variance of the image pixel grayscale value; is the number of horizontal pixels in the image; The number of vertical pixels in the image; is a pixel, The gray value of are the horizontal and vertical coordinates of the pixel points respectively; In this embodiment, the image can be converted into a grayscale image through the built-in img.to_grayscale function of the openmv camera, and the image.statistics.stdev function can obtain the standard deviation of the grayscale value of the image, and then the variance can be obtained by performing a square operation through the grayscale value variance formula. When the grayscale value variance of the image is higher than the set threshold, the frame image is considered to have a higher clarity and is applied; otherwise, the frame image is considered to be blurred, the frame rate image is discarded, and the next frame image is recaptured to prevent misidentification and misjudgment.
[0027] Step S5, using a classifier (mask detection SVM model) for identification, and analyzing and preprocessing the extracted data; such as: the location coordinates of the pedestrian, and determining whether the pedestrian is wearing a mask; S5.1, obtain the color threshold to be detected through the threshold editor of the machine vision system of the openmv camera, and adjust the maximum and minimum values of the three parameters L, A, and B in the LAB color space for the RGB565 image through the binary image filtering method to obtain a specific color threshold list thresholds; In this embodiment, the blue mask is mainly used as the training premise, and the threshold parameters of the blue mask under specific circumstances are locked by adjusting the maximum and minimum values of the three parameters L, A, and B in the LAB color space. The sensor.snapshot function is used in the program to obtain the image information of each frame, and the built-in binary function of openmv is used to identify the markers of the blue mask and divide it into the foreground; other images are divided into the background.
[0028] S5.2, identify the mask markers in each frame of the image acquired by the openmv camera, and divide the outer image into foreground, and the other images into background; according to the calculation formula, If the pixel value belongs to the threshold range T, the pixel is classified as foreground (value is 255, indicating white), such as Fig.12 As shown; If the pixel value does not belong to the threshold range T, the pixel is classified as background (value 0, indicating black); S5.3, after binary filtering, the find_blobs function built into the openmv camera is used to find the foreground (i.e., mask) area in the image in the form of color blocks, and feedback relevant information (location information, and whether a mask is worn); S5.4, receiving the information from step S5.3, analyzing and judging the received data, if the person is wearing a mask, proceed to the next step S6; If the pedestrian is not wearing a mask / wearing a mask abnormally, the pre-processed image recognition information is input to the input end of the stm32 controller; The relevant formula is as follows: in, Indicates that the image is The L, A, and B thresholds at , and T represents the range of values that the three parameters L, A, and B can take.
[0029] In this embodiment, by threshold segmentation, the misidentification and misjudgment caused by the complex and changeable scene background can be optimized, and the range where the mask is located is allocated to the foreground, and other environmental displays are allocated to the background. By acquiring the foreground area, the image quality distortion detection and recognition system combined with the relative position after binarization can greatly improve the judgment accuracy and position accuracy of the mask.
[0030] The terminal output effect of only using the mask recognition detection system is as follows: ***********mask ********* Model: x110 y150 The terminal output effect of the system that can perform both mask recognition and detection and image quality distortion detection and threshold binarization processing is as follows: ***********mask ********* Model: x110 y150 Binarization: x105 y147 It can be seen that in actual effect, the relative position obtained after model recognition and binarization processing is close.
[0031] In actual application, the scenes and environments for mask detection are relatively complex, which leads to complex and changeable backgrounds of image information obtained by the camera, making it easy for the recognition ability to be weakened or for judgment to be wrong when detecting masks.
[0032] The present invention adopts a binary image filtering method, obtains the color threshold to be detected through the threshold editor of the openmv camera, and performs threshold segmentation. The present invention can optimize the situation of misrecognition and misjudgment caused by the complex and changeable scene background, allocates the range of the mask to the foreground, and allocates other environmental displays to the background. By acquiring the foreground area, the mask recognition model combined with the relative position after binarization can greatly improve the judgment accuracy and position accuracy of the mask.
[0033] S5.5, after the input end of the STM32 controller receives the signal processed by the image of the OpenMV camera, the OpenMV camera generates an identification frame, locks the pedestrian, obtains the relative position of the frame and the screen in real time, and transmits it to the STM32 controller, and the STM32 controller generates a PWM signal; S5.6, the automatic tracking device receives the pwm signal from the stm32 controller, and under the drive of the pwm signal, controls the automatic tracking device to automatically track the person, and feeds back the tracking status to the main control system of the automatic tracking device; In the above embodiment, the automatic tracking device includes two states: Normal status: people who are not wearing masks are tracked; Abnormal status: No person without a mask was tracked; S5.7, the automatic tracking device receives the tracking status information transmitted from step S5.6. If the automatic tracking device tracks a person who is not wearing a mask, it proceeds to the next step S5.8; S5.8, the pusher system receives the tracking status information, pushes out a mask through the pusher, and at the same time gives a voice reminder through the voice reminder module (when the pedestrian is not wearing a mask or is wearing the mask improperly), reminding the pedestrian to take the mask away and wear it; S5.9: If the mask is worn normally after the reminder, go to step S6. If the mask is not worn normally, the extracted pedestrian image information will be transmitted to the system cloud to determine the identity information of the corresponding pedestrian, and the pedestrian will be managed and processed according to the identity information of the pedestrian.
[0034] In actual application, when the pedestrian appears within the lens range of the openmv camera for the first time, is successfully identified, and the facial information of the pedestrian is locked, the openmv camera immediately saves the successfully identified photo; When the pedestrian is judged to be not wearing a mask and has been out of the lens range of the openmv camera without wearing a mask, it is judged that the pedestrian is not wearing a mask normally.
[0035] At this time, the openmv camera sends the saved picture to the stm32 main control system through the serial port. After receiving the picture information, the main control system transmits the picture to the host computer in the monitoring room via the Internet through the wifi module ESP8266. The relevant responsible personnel can confirm the identity information of the pedestrian and manage and control it.
[0036] Step S6, continue to detect the next frame of image; In this embodiment, the openmv camera includes a high-performance camera and an stm32 controller, and has a built-in image sensor, an image processing unit and a memory, and can directly process image data from the camera without an external computer.
[0037] In this embodiment, step S2 further includes the steps of: S2.1, obtaining the monitoring image collected by the openmv camera through the image acquisition unit, and the openmv camera captures the real-time video stream through its built-in sensor; S2.2, obtaining information of the image acquisition unit; Through the image processing unit, each frame of the video stream is converted into a sampled image by format conversion; Use sliding windows of different sizes to frame a certain image area in the image as a candidate area, and crop the candidate area in the sampled image to obtain a portrait image; S2.3, receiving all sampled images, obtaining portrait image information, identifying whether there is a face in the sampled image based on facial features through an image recognition unit, and generating a recognition result; S2.4, transmitting the recognition result to the feature detection unit, and using the classifier (mask detection SVM model) to perform recognition and judgment to determine whether the face is wearing a mask; Using a large amount of image data of people wearing masks and not wearing masks, the model is trained through machine learning or deep learning algorithms (such as convolutional neural networks (CNNs)). During the training process, the model learns how to distinguish between images of people wearing masks and those not wearing masks.
[0038] The trained neural network model is deployed to the OpenMV module. When the module captures a new image, it uses this model to classify the image and determine whether the person in the image is wearing a mask.
[0039] In this embodiment, in order to improve the accuracy of mask wearing detection during training, a database is constructed for training, and the training method includes: (1) Collect a large number of facial images of people wearing and not wearing masks as initial data, and then annotate and classify these images; (2) Deploy the trained face occlusion recognition model to the OpenMV camera; use the OpenMV camera to capture images in real time, extract the mask or facial features in the picture, and then lock and track them, and run the model deployed in it to determine whether the face in the image is wearing a mask; In practical applications, the performance evaluation of mask wearing detection systems mainly focuses on two indicators: accuracy and false alarm rate. Accuracy refers to the ratio of people wearing masks and those not wearing masks that the system correctly identifies, while false alarm rate refers to the ratio of people wearing masks that the system mistakenly identifies as not wearing masks or people not wearing masks as wearing masks. In practical applications, high accuracy and low false alarm rate are key indicators to measure the performance of the system.
[0040] In this embodiment, a data set of more than 451 facial images of people wearing masks and not wearing masks is collected. 80% of them are taken as training samples and 20% are taken as detection test samples. After training the recognition model multiple times, a training model with an accuracy of nearly 100% and a loss rate of nearly 0.01 is obtained.
[0041] Furthermore, in this embodiment, it should be noted that the face occlusion (mask) recognition model can be any deep learning model. That is, in addition to the deep learning models listed above, those skilled in the art can use any other applicable deep learning model for face occlusion recognition.
[0042] In this embodiment, using the OpenMV camera for mask wearing recognition is an efficient and convenient solution. It combines the advantages of machine vision and artificial intelligence, and can accurately detect faces without masks in complex scenes and issue warnings, thereby helping to improve public health safety.
[0043] In this embodiment, the present invention uses the serial port communication of the openmv camera and the stm32 single-chip microcomputer through the tracking mode in actual application. When the openmv camera recognizes that there is a person who is not wearing a mask in the lens, an identification frame lock is generated, and a pwm signal is generated after the stm32 controller receives the signal of the image processing of the openmv camera end, and the automatic tracking device is controlled to move under the drive of the pwm signal, thereby increasing the supervision area, and the automatic tracking device and the openmv camera are used in combination to achieve the locking of the person. The present invention can automatically track and warn the person who is not wearing a mask while recognizing that the person is not wearing a mask; it has wider applicability.
[0044] In this embodiment, step S5.6 also includes two states: automatic tracking and manual remote control; respectively: Visual automatic tracking mode, including: ① Use the Openmv camera to identify the image in the lens, locate and identify the face, and determine the probability of wearing a mask (mask) or not wearing a mask (face); ② If the pedestrian is judged to be not wearing a mask, the center position of the box is obtained through the Openmv camera and compared with the center of the lens image; ③ Obtain the x-axis and y-axis coordinates, and transmit the two position coordinates to the stm32 controller through serial communication; ④ According to the x-axis and y-axis coordinates in step ③, the system drives the automatic tracking device so that the first gimbal drives the Openmv camera to move left and right; at the same time, the system drives the second gimbal so that the second gimbal drives the Openmv camera to move up and down, thereby tracking people who are not wearing masks.
[0045] It includes a main system, a main control system of an automatic tracking device and a pusher system; wherein the main system includes an image acquisition unit, an image processing unit, an image recognition unit and a feature detection unit.
[0046] The present invention can also add a remote controller, and the remote controller is preferably a 2.4G remote controller. The principle of the remote controller mainly involves the transmission and reception of radio waves, and uses radio signals in the 2.4GHz frequency band to control the remote device.
[0047] Furthermore, the remote control includes a transmitter and a receiver, wherein the transmitter is installed on the handheld remote control end, the receiver is connected to the main control system of the automatic tracking device, and the main control system of the automatic tracking device is connected to the openmv camera, and the openmv camera is installed on the body of the automatic tracking device.
[0048] When the actual situation does not require the tracking mode to be enabled and only a fixed angle needs to be identified and judged, the manual remote control mode is entered; and The method for manually adjusting the direction of the camera includes the following steps: 1>Connect and transmit the Openmv camera to the host computer, and display the image observed by the camera in real time on the host computer; 2> If the camera's viewing direction does not meet the current monitoring requirements, shake the remote control's joystick to send out a radio wave signal; 3> The first pan-tilt and the second pan-tilt of the automatic tracking device respectively receive the radio wave signal from step 2>, start the first pan-tilt of the automatic tracking device, so that the first pan-tilt drives the Openmv camera to move left and right; at the same time, start the second pan-tilt, so that the second pan-tilt drives the Openmv camera to move up and down, thereby adjusting and locking the camera recognition direction.
[0049] Further, the remote controller includes a single chip microcomputer 10, and the single chip microcomputer 10 is preferably a stm32zet6 single chip microcomputer, and the single chip microcomputer 10 is provided with an NRF24L01 module wiring port 102, an OLED wiring port 101, a right joystick wiring port 103, a switch wiring port 104 and a left joystick wiring port 105; The NRF24L01 module wiring port 102 is connected to the stm32 controller of the openmv camera, the OLED wiring port 101 is connected to the OLED display screen, the right joystick wiring port 103 and the left joystick wiring port 105 are respectively connected to the right joystick and the left joystick of the remote control, and the switch wiring port 104 is connected to the control switch of the remote control.
[0050] Furthermore, the manual adjustment mode step ④ also includes the steps of: (1) Collect ADC signals from the joystick (left joystick / right joystick) through the microcontroller; (2) Shake the joystick to change the resistance value of the microcontroller, thereby changing the resistance voltage at the joystick; (3) After the analog quantity is sampled by ADC through the single-chip microcomputer, it is converted into digital quantity for storage and processing; Convert the acquired digital quantity from 12-bit data to 8-bit data as follows; AD2=AD_GetValue(ADC_Channel_2); AD3= AD_GetValue(ADC_Channel_3); AD0=AD_GetValue(ADC_Channel_0); AD2_2=(float)AD2 / 4095*255; AD3_2=(float)AD3 / 4095*255; AD0_2=(float)AD0 / 4095*255; (4) After the transformed digital quantity is collected, the data is processed and calculated in the single-chip microcomputer, and the change in the resistance voltage on the joystick (left joystick / right joystick) is further converted into a rotation angle that can be executed by the automatic tracking device.
[0051] (5) After pressing the control switch of the remote control, the internal circuit of the transmitter of the remote control is activated; the circuit converts electrical energy into a 2.4GHz radio wave signal (the radio wave signal contains the execution command, such as up, down, left, right, start and pause, etc.); (6) Radio wave signals are sent through the remote control's transmitter antenna.
[0052] In the above technical solution, in actual application, the image quality distortion detection and recognition system is used to identify whether the pedestrian is wearing a mask. If the pedestrian is not wearing a mask, the person is locked by the automatic tracking device. However, if the pedestrian does not carry a mask with him after being locked, it can only serve as a reminder and cannot provide help and support for those who are not wearing masks. In order to solve the above technical problems, please refer to Figure 7 As shown, a tracking pusher 100 for an image quality distortion detection and recognition system includes an automatic tracking device and a pusher used in conjunction with the automatic tracking device, wherein the pusher includes a body 20, wherein the body 20 is detachably connected, and the body 20 is driven by a driving system 50, so that the body 20 rotates, thereby driving an openmv camera 40 disposed on the body 20 to rotate; so that the openmv camera can track pedestrians who are not wearing masks; The OpenMV camera includes a second gimbal 401, a high-performance camera installed on the second gimbal 401, and an STM32 controller. The second gimbal 401 has a built-in driving system, which drives the second gimbal to rotate in the vertical direction through the driving system, and then drives the high-performance camera to rotate in the vertical direction through the second gimbal 401.
[0053] Furthermore, the driving system 50 has a built-in servo, and is connected to a first gimbal 70 installed on the driving system 50 through the servo. The built-in servo in the driving system 50 controls the rotation of the first gimbal 70 in the horizontal and vertical directions. A detachably connected body 20 is installed on the first gimbal 70, and disassembling the body 20 makes it convenient for staff to replenish masks immediately.
[0054] The servo and the built-in drive system of the second gimbal 401 both adopt DS6230 high-torque servo.
[0055] In this embodiment, since the servo and the second gimbal built-in drive system need to work together to achieve the two-dimensional rotation of the first gimbal and the OpenMV camera. The stm32 controller will calculate the angles that the servo and the second gimbal built-in drive system need to rotate respectively according to the rotation angle and direction set in advance, and send corresponding PWM signals respectively. The servo and the second gimbal built-in drive system receive the required PWM signals respectively, and then control the servo and the second gimbal built-in drive system to rotate according to the predetermined angle, thereby driving the platform to achieve two-dimensional rotation.
[0056] The duty ratio of the two PWM signals is the core content for realizing independent control of the first pan-tilt platform 70 and the second pan-tilt platform 401 in the horizontal and vertical directions; wherein the PWM signal output calculation formula is: PWM frequency: Freq = CK_PSC / (PSC+1) / (ARR+1) PWM duty cycle: Duty = CCR / (ARR+1) PWM resolution: Reso=1 / (ARR+1) When ARR is set to 20K and PSC is set to 72, the duty cycle time range of the PWM wave is 0.5ms to 2.5ms, and the angle conversion calculation formula of the servo can be obtained as follows: PWM_SetCompare=Angle / 180*2000+500 The above calculation formula shows that the horizontal rotation angle is 10° to 170°. Considering the protection of the servo, the built-in drive system of the second gimbal 401 and the stability of the structure of the connection and the reduction of wear, it is generally set to 10° to 170°. The vertical rotation angle range is generally 10° to 170°. Considering the protection of the servo, the built-in drive system of the second gimbal 401 and the stability of the structure of the connection and the reduction of wear, it is generally set to 45° to 135°.
[0057] In this embodiment, two independent PWM signals from the stm32 controller are received by the built-in drive system of the servo and the second gimbal 401 respectively, and each group of independent PWM signals controls the rotation angle of any one group of servos. By adjusting the duty ratio of the two PWM signals respectively, the independent control of the first gimbal 70 and the second gimbal 401 in the horizontal and vertical directions can be achieved. By independently controlling the horizontal direction of the first gimbal, the first gimbal 70 can drive the openmv camera 40 to adjust the angle from left to right or from right to left, so as to capture images in different directions. The horizontal rotation angle is 10° to 170°. By independently controlling the second pan-tilt platform 401 in the vertical direction, the second pan-tilt platform 401 can drive the openmv camera 40 to adjust the angle upward or downward, so as to obtain pictures in different directions. The vertical rotation angle range is generally 10° to 170°.
[0058] See also Figure 6-10 As shown: the machine body includes a push plate 205, and the push plate 205 is provided with a through groove 2051 for the mask storage part 204 to extend into.
[0059] Furthermore, the mask storage part 204 is divided into two groups of upper and lower cavities by the push plate 205, and the end surface of the push plate 205 located in the upper cavity is used to place the mask; and the mask storage part cooperates with the push plate so that the push plate 205 can move up and down along the longitudinal direction of the body 20, thereby adjusting the upper cavity space of the mask storage part 204; A first stepper motor 202 is disposed in the machine body 20 at a position away from the push plate 205 .
[0060] Furthermore, the driving end of the first stepper motor 202 is connected to the screw 203 through a bearing assembly, and a screw nut is installed on the screw 203, and the screw nut is connected to the push plate 205 through a fixed connecting member (any method that can achieve fixed connection such as a fastening screw or a fastening bolt), and the screw nut is located inside the push plate; the screw transmission structure is a prior art and will not be described in detail here.
[0061] In order to prevent the second stepper motor 601 from being damaged, the threshold (maximum rising height of the push plate) is set in advance to 300 mm; In this embodiment, when the position detection sensor (not noted in the figure) installed on the second stepper motor detects that the maximum rising height of the push plate is 300 mm, the system issues a stop command and the motor will no longer execute the rising command. At this time, there are not enough masks and the staff needs to replenish the masks in time.
[0062] In this embodiment, by starting the first stepper motor 202, the first stepper motor drives the lead screw 203 to rotate, thereby driving the push plate to move; thereby compressing the upper cavity to fill the vacancy of the mask outlet.
[0063] Furthermore, a through groove 207 is provided on the end surface of the mask storage member 204 away from the first stepper motor 202 to facilitate the mask to be pushed out.
[0064] Furthermore, a second stepper motor 601 is fixedly installed on the side end surface of the mask storage component 204 near the position of the groove body 207 by fastening screws, and the driving end of the second stepper motor 601 is connected to the rotating shaft 602 through a bearing assembly, and the rotating shaft 602 passes through the mask storage component 204 and extends into the groove body 207. A mask pushing roller 603 is installed on the rotating shaft 602 located in the groove body 207, and the mask pushing roller 603 is detachably connected.
[0065] In this embodiment, the second stepper motor 601 is started to drive the rotating shaft 602 to rotate, and the rotation of the rotating shaft 602 drives the mask pushing roller 603 to rotate.
[0066] Furthermore, the second stepper motor 601 , the rotating shaft 602 and the mask pushing roller 603 are combined to form a pushing mechanism 60 .
[0067] Further, the cross-sectional shape of the mask pushing roller 603 is determined by the angles α, β and c and the first end face 6031, the second end face 6032 and the third end face 6033; The extension line of the first end surface 6031 and the extension line of the second end surface 6032 intersect to form a first arc-shaped end portion, and the first arc-shaped end portion has an angle α, 5°≤a≤35°; The extension line of the first end face 6031 intersects with the extension line of the third end face 6033 to form a second arc-shaped end portion, and the second arc-shaped end portion has an angle c, 12°≤c≤75°; The extension line of the second end face 6032 intersects with the extension line of the third end face 6033 to form a third arc-shaped end, and the third arc-shaped end has an angle β, 8°≤β≤145°, and the diameter of the third arc-shaped end is greater than the first arc-shaped end and the second arc-shaped end.
[0068] Furthermore, the body 20 is a double-layer shell, and an output port 201 is provided on the body 20 , and the output port 201 is arranged corresponding to the slot 207 .
[0069] In this embodiment, when the OPENMV camera detects that a pedestrian is not wearing a mask, the second stepper motor 601 is started, thereby driving the rotating shaft 602 to rotate. The rotation of the rotating shaft 602 drives the mask pushing roller 603 disposed on the rotating shaft 602 to rotate. Since the third arc-shaped end has the largest diameter, when the mask pushing roller 603 rotates to the third arc-shaped end, so that the third arc-shaped end conflicts with the end face of the mask, the mask is pushed toward the position of the output port 201 through the third arc-shaped end until the mask is pushed out of the output port 201.
[0070] In actual application, since the masks are stacked together, when the mask pushing roller 603 is used to push the masks out, two groups of masks or even more masks are often pushed out together, resulting in waste of masks. Fig.12 As shown, an upwardly inclined guide plate is fixedly installed on the body at the position of the output port 201, and the inclination angle R is 3°, and a mask separation component 30 is provided on the body 20 at a position opposite to the guide plate, and the mask separation component 30 is detachably connected, and the mask separation component 30 is made of rubber material; The mask separation assembly 30 is used to make the spacing between the guide plates L1, and L1 is 0.4 mm, so only one mask can be output. The thickness of common masks is mostly 0.2-0.3 mm.
[0071] In this embodiment, when the openmv camera detects that the pedestrian is not wearing a mask, the second stepper motor 601 is started, thereby driving the rotating shaft 602 to rotate, and the mask pushing roller 603 disposed on the rotating shaft 602 is driven to rotate through the rotation of the rotating shaft 602. Since the third arc-shaped end is the largest diameter, when the mask pushing roller 603 rotates to the third arc-shaped end, so that the third arc-shaped end conflicts with the end face of the mask, the mask is pushed toward the position of the output port 201 through the third arc-shaped end until the mask is pushed out of the output port 201; When the masks are pushed out of the output port 201, only one mask is allowed to be pushed out, and the second mask will be blocked by the mask separation assembly 30, thereby preventing multiple masks from being output at one time.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention, and should be included in the scope of the claims of the present invention.
Claims
1. A detection method for an image quality distortion detection and recognition system, characterized in that: The following steps are involved: Step S1, first receiving a pedestrian mask wearing detection request sent by the main system; Step S2, determine the candidate area, Use the openmv camera to obtain public places and personnel flow monitoring videos to obtain original sampled images; Step S3, extracting visual features related to the candidate regions of the original sampled image; Step S4, processing the acquired original sampled image; S4.1, convert the image into a grayscale image through the built-in img.to_grayscale function of the openmv camera, and obtain the standard deviation of the image grayscale value through the built-in image.statistics.stdev function of the openmv camera, and then perform a square operation through the grayscale value variance formula to obtain the grayscale value variance; S4.2, if the gray value variance of the image is higher than the set threshold, the frame image is considered to have a higher definition and is applied, and the process proceeds to the next step S5; S4.3, if the gray value variance of the image is lower than the set threshold, the frame image is considered blurred, the frame image is discarded, and the process goes to step S2 to re-capture the image; Among them, the image gray value variance formula is: s=\frac {1} {{N}_{x}{\cdot N}_{y}}\sum ^{{N}_{x}}_{x=1} {\sum ^{{N}_{y}}_{y=1} \left [ {} \right ]}\left [ {f\left ( {x,y} \right )-g} \right ]^{2} In the formula, g is the average grayscale value of the image pixels; s is the grayscale value variance of the image pixel grayscale value; is the number of horizontal pixels in the image; The number of vertical pixels in the image; is a pixel, The gray value of are the horizontal and vertical coordinates of the pixel points respectively; Step S5, using a classifier to perform identification, and analyzing and preprocessing the extracted data; S5.1, obtain the color threshold to be detected through the threshold editor of the machine vision system of the openmv camera, adjust the image through the binary image filtering method, adjust the maximum and minimum values of the three parameters L, A, and B in the LAB color space, and obtain a specific color threshold list; S5.2, identify the mask markers in each frame of the image acquired by the openmv camera, and divide the outer image into foreground, and divide the other images into background; according to the threshold calculation formula, If the pixel value belongs to the threshold range T, the pixel is classified as foreground; If the pixel value does not belong to the threshold range T, the pixel is classified as background; The threshold calculation formula is as follows: in, Indicates that the image is The L, A, and B thresholds at , T represents the range of values that the three parameters L, A, and B can take; S5.3, after binary filtering, the find_blobs function built into the openmv camera is used to find the foreground area in the image in the form of color blocks, and relevant information is fed back; S5.4, the classifier receives the information from step S5.3 and analyzes and judges the received data. If the person wears a mask, proceed to the next step S6; If the pedestrian is not wearing a mask / wearing a mask abnormally, the pre-processed image recognition information is input to the input end of the stm32 controller; S5.5, after the input end of the STM32 controller receives the signal processed by the image of the OpenMV camera, the OpenMV camera generates an identification frame, locks the pedestrian, obtains the relative position of the frame and the screen in real time, and transmits it to the STM32 controller, and the STM32 controller generates a PWM signal; S5.6, the automatic tracking device receives the pwm signal from the stm32 controller, and under the drive of the pwm signal, controls the automatic tracking device to automatically track the person, and feeds back the tracking status to the main control system of the automatic tracking device; Wherein, the automatic tracking device includes two states: Normal status: people who are not wearing masks are tracked; Abnormal status: No person without a mask was tracked; S5.7, the automatic tracking device receives the tracking status information transmitted from step S5.
6. If the automatic tracking device tracks a person who is not wearing a mask, it proceeds to the next step S5.8; S5.8, the pusher system receives the tracking status information, pushes out a mask through the pusher, and at the same time gives a voice reminder to the pedestrian through the voice reminder module, reminding the pedestrian to take the mask and wear it; S5.9: If the mask is worn normally after the reminder, go to step S6. If the mask is not worn normally, the extracted pedestrian image information is transmitted to the system cloud to determine the identity information of the corresponding pedestrian, and the pedestrian is controlled and processed according to the identity information of the pedestrian; Step S6, continue detecting the next frame of image.
2. The detection method of the image quality distortion detection and identification system according to claim 1, characterized in that: Step S2 also includes the steps of: S2.1, obtaining the monitoring image collected by the openmv camera through the image acquisition unit, and the openmv camera captures the real-time video stream through its built-in sensor; S2.2, obtaining information of the image acquisition unit; Through the image processing unit, each frame of the video stream is converted into a sampled image by format conversion; Use sliding windows of different sizes to frame a certain image area in the image as a candidate area, and crop the candidate area in the sampled image to obtain a portrait image; S2.3, receiving all sampled images, obtaining portrait image information, identifying whether there is a face in the sampled image based on facial features through an image recognition unit, and generating a recognition result; S2.4, transmit the recognition result to the feature detection unit, and use the classifier to perform recognition and judgment to determine whether the face is wearing a mask.
3. The detection method of the image quality distortion detection and identification system according to claim 1, characterized in that: Build a database for training to improve the accuracy of mask wearing detection. The training methods include: (1) Collect a large number of facial images of people wearing and not wearing masks as initial data, and then annotate and classify these images; The face image is input into the trained classifier, and the information output by the learning model is used to indicate whether the target face in the partial face image is wearing a mask, thereby obtaining a face occlusion recognition model; (2) Deploy the trained face occlusion recognition model to the OpenMV camera; use the OpenMV camera to capture images in real time, extract the mask or facial features in the picture, and then lock and track them, and run the model deployed in it to determine whether the face in the image is wearing a mask.
4. The detection method of the image quality distortion detection and identification system according to claim 1, characterized in that: Step S5.6 includes two states: automatic tracking and manual remote control. The visual automatic tracking mode includes: ① Use the Openmv camera to identify the image in the lens, locate and identify the face, and determine the probability of wearing a mask or not wearing a mask; ② If the pedestrian is judged to be not wearing a mask, the center position of the box is obtained through the Openmv camera and compared with the center of the lens image; ③ Obtain the x-axis and y-axis coordinates, and transmit the two position coordinates to the stm32 controller through serial communication; ④ According to the x-axis and y-axis coordinates in step ③, the system drives the automatic tracking device so that the first gimbal drives the Openmv camera to move left and right; at the same time, the system drives the second gimbal so that the second gimbal drives the Openmv camera to move up and down, thereby tracking people who are not wearing masks.
5. The detection method of the image quality distortion detection and identification system according to claim 4, characterized in that: When the tracking mode does not need to be enabled in the actual situation and only a fixed angle needs to be identified and judged, the manual remote control mode is entered; The method of manually adjusting the direction of the camera includes: 1>Connect and transmit the Openmv camera to the host computer, and display the image observed by the camera in real time on the host computer; 2> If the camera's viewing direction does not meet the current monitoring requirements, shake the remote control's joystick to send out a radio wave signal; 3> The first pan-tilt and the second pan-tilt of the automatic tracking device respectively receive the radio wave signal from step 2>, start the first pan-tilt of the automatic tracking device, so that the first pan-tilt drives the Openmv camera to move left and right; at the same time, start the second pan-tilt, so that the second pan-tilt drives the Openmv camera to move up and down, thereby adjusting and locking the camera recognition direction.
6. Automatic tracking pusher, characterized in that: include: Automatic tracking device; and a pusher used in conjunction with the automatic tracking device; and a remote controller used in conjunction with the automatic tracking device, the remote controller comprising a transmitter and a receiver, The receiver is connected to the main control system of the automatic tracking device, and the main control system of the automatic tracking device is connected to the openmv camera.
7. The automatic tracking pusher according to claim 6, characterized in that: The pusher comprises a body, and the body is detachably connected. And the machine body is driven by a driving system, The driving system has a built-in steering gear for controlling the first pan / tilt head to rotate in the horizontal direction; An openmv camera is arranged on the body, The openmv camera includes a second pan-tilt platform and a high-performance camera and an stm32 controller installed on the second pan-tilt platform; And the second gimbal has a built-in drive system; The remote controller also includes a single chip microcomputer. The single chip microcomputer is provided with an NRF24L01 module wiring port, an OLED wiring port, a right joystick wiring port, a switch wiring port and a left joystick wiring port; The NRF24L01 module wiring port is connected to the stm32 controller of the main control system of the body for signal transmission; The OLED connection port is connected to the OLED display screen. The right joystick connection port and the left joystick connection port are connected to the right joystick and the left joystick of the remote controller respectively. The switch wiring port is connected to a control switch of a remote controller.
8. The automatic tracking pusher according to claim 7, characterized in that: The machine body includes a push plate, The push plate is provided with a through slot for the mask storage part to extend into; And the mask storage part cooperates with the push plate; The mask storage unit is divided into two groups of upper and lower cavities by the push plate. The push plate end surface located in the upper cavity is used for placing the mask; A first stepper motor is arranged in the body at a position far away from the push plate; A through groove is provided on the end surface of the mask storage component away from the first stepper motor; The machine body adopts a double-layer shell. The machine body is provided with an output port. The output port is arranged corresponding to the tank body; A second stepping motor is installed on the side end surface of the mask storage component near the position of the slot. The driving end of the second stepper motor is connected to the rotating shaft. The rotating shaft passes through the mask storage part and extends into the slot body. A mask pushing roller is installed on the rotating shaft located in the tank body. The mask advancing roller is detachably connected.
9. The automatic tracking pusher according to claim 8, characterized in that: The cross-sectional shape of the mask pushing roller is determined by the angles α, β and c and the first end face, the second end face and the third end face; The extension line of the first end surface and the extension line of the second end surface intersect to form a first arc-shaped end portion, and the first arc-shaped end portion has an angle α, 5°≤a≤35°; The extension line of the first end face and the extension line of the third end face intersect to form a second arc-shaped end portion, and the second arc-shaped end portion has an angle c, 12°≤c≤75°; The extension line of the second end face and the extension line of the third end face intersect to form a third arc-shaped end portion, and the third arc-shaped end portion has an included angle β, 8°≤β≤145°, and the diameter of the third arc-shaped end portion is greater than the first arc-shaped end portion and the second arc-shaped end portion; An upwardly inclined guide plate is installed on the machine body at the output port. And the inclination angle R is 3°, A mask separation component is provided on the body at a position opposite to the guide plate. The mask separation assembly is detachably connected. The mask separation component is made of rubber material; The mask separation assembly is used to make the spacing between the guide plates L1, and L1 is 0.4 mm.
10. Image quality distortion detection and recognition system, characterized in that: include: a main system, and a processor and a memory for the main system, The memory stores instructions executable by at least one of the processors, The instructions are executed by at least one of the processors to enable at least one of the processors to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for tracking attention of user based on face recognition technology
CN110633664A
Construction site personnel safety helmet wearing condition inspection method and system
CN111191586A
Mask face detection recognition and tracking temperature measurement method based on attention mechanism
CN112507783A
Camera-based moving object real-time tracking system and method
CN113194249A
Epidemic prevention system, mask wearing identification method and device, equipment and storage medium
CN114821455A
Cited By
Tracking identification method and system for specific work type
CN120747170A