CN114202793A - Face mask and social distance-oriented detection device - Google Patents

Face mask and social distance-oriented detection device Download PDF

Info

Publication number
CN114202793A
CN114202793A CN202210054188.2A CN202210054188A CN114202793A CN 114202793 A CN114202793 A CN 114202793A CN 202210054188 A CN202210054188 A CN 202210054188A CN 114202793 A CN114202793 A CN 114202793A
Authority
CN
China
Prior art keywords
module
mask
face
detection
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210054188.2A
Other languages
Chinese (zh)
Inventor
钟世达
潘家豪
冯昊港
慕镐泽
袁涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN202210054188.2A priority Critical patent/CN114202793A/en
Publication of CN114202793A publication Critical patent/CN114202793A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Emergency Alarm Devices (AREA)

Abstract

The invention discloses a face-oriented mask and a detection device of social distance, comprising: the device comprises a processor module, an instruction and data storage module, a logic control module, a function switching key module, a camera module, an ultrasonic ranging module and a face and mask wearing detection module; the processor module is electrically connected with the instruction and data storage module through a first bus; the logic control module, the function switching key module and the ultrasonic ranging module are respectively and electrically connected with the first bus through a second bus; the face and mask wearing detection module and the camera module are respectively and electrically connected with the first bus through a third bus, and the logic control module acquires an instruction sent by the processor module and controls the face and mask wearing detection module and the camera module to work. The technical scheme of the invention can realize unmanned management, save human resources and realize efficient face detection, mask wearing detection and social distance monitoring.

Description

Face mask and social distance-oriented detection device
Technical Field
The invention relates to a face mask detection device, in particular to a face mask and social distance detection device.
Background
With the rapid development of 5G communication technology and internet of things (IoT), large-scale sensors are very densely deployed in application scenarios such as buildings, agriculture, and smart cities. This means that a huge amount of data is generated at the edge, which presents an unprecedented transmission challenge for 5G networks. On the other hand, the development of AI has changed every area in our lives. With the advent of applications such as autopilot, smart factories, and telemedicine, the inference part of the AI model is increasingly pushed to the edge device side.
Today, the accelerated computing engine of the general deep learning algorithm is mostly a traditional CPU and GPU, but the CPU and the GPU consume more energy and are more costly than a special system on chip (SoC) oriented to a specific functional scene. Therefore, dedicated socs are more suitable for mobile and embedded systems.
With the outbreak of new crown epidemic situation, wear the gauze mask and keep safe social distance as important safeguard means, made important contribution for the prevention and control of epidemic situation and stopped, effectively wear the gauze mask and keep safe social distance and can reduce the infection risk of epidemic situation in the very big degree, protect self and other people's safety. However, in places where floating population is gathered, such as shopping malls or subway stations, a lot of human resources are consumed for reminding people to wear the mask and keep safe social distance in a manual mode.
In view of the above, there is a need to provide further improvement on the structure of the present face mask detection device.
Disclosure of Invention
In order to solve at least one of the above technical problems, the present invention provides a face mask and a social distance detection device.
In order to achieve the purpose, the invention adopts a technical scheme that: the utility model provides a face-oriented mask and social distance's detection device includes: the system comprises a processor module, an instruction and data storage module, a logic control module, a function switching key module, a camera module, an ultrasonic ranging module for executing a social distance monitoring and alarming function mode and a face and mask wearing detection module for executing a face detection and mask wearing detection function mode; the processor module is electrically connected with the instruction and data storage module through a first bus and is used for reading instructions and data in the instruction and data storage module through the first bus; the logic control module, the function switching key module and the ultrasonic ranging module are respectively and electrically connected with the first bus through a second bus; the face and mask wearing detection module and the camera module are respectively electrically connected with the first bus through a third bus, the logic control module acquires an instruction sent by the processor module and controls the face and mask wearing detection module and the camera module to work, and the function switching key module is used for switching a face detection function mode and a mask wearing detection function mode and a social distance monitoring and alarming function mode.
The face and mask wearing detection module comprises a face detection accelerator, a mask wearing detection accelerator, a first memory and a second memory, wherein the first memory stores decision tree parameters required by the face detection accelerator, the second memory stores decision tree parameters required by the mask wearing detection accelerator, the face detection accelerator and the mask wearing detection accelerator are respectively and electrically connected with a third bus, and the face detection accelerator is electrically connected with the first memory; the mask wearing detection accelerator is electrically connected with the second memory.
The mask wearing detection system comprises a first bus, a second bus, an alarm module and a control module, wherein the alarm module is electrically connected with the second bus and carries out alarm prompt according to a face detection accelerator and/or a mask wearing detection accelerator in a face detection and mask wearing detection function mode; and carrying out alarm prompt according to the detection result of the face detection accelerator and the ultrasonic ranging module or the detection result of the mask wearing detection accelerator and the ultrasonic ranging module in the social distance monitoring alarm function mode.
The alarm module further comprises a prompting LED lamp module and an active buzzer, and under the functional modes of face detection and mask wearing detection, the prompting LED lamp module carries out on-off prompting according to the detection results of the face detection accelerator and the mask wearing detection accelerator; under the social distance monitoring and alarming function mode, the LED lamp module and the active buzzer for prompting carry out alarming prompt according to the detection result that the face detection accelerator and the ultrasonic ranging module or the mask is worn to detect the accelerator and the ultrasonic ranging module.
The mask counting device is characterized by further comprising a first counting LED lamp module, a second counting LED lamp module and a timer, wherein the first counting LED lamp module, the second counting LED lamp module and the timer are respectively electrically connected with a second bus; second count LED lamp module is used for counting the people's face number of not wearing the gauze mask in real time, the time-recorder is used for carrying out face detection to the face detection accelerator in proper order to and wear the time that detects that the detection accelerator carries out the gauze mask and wears the detection to the gauze mask.
When the mask wearing detection accelerator detects that the number of faces without wearing the mask is larger than 0 or the number of faces detected by the face detection accelerator is larger than 0, and the social distance measured by the ultrasonic ranging module is smaller than a set safety distance, the LED lamp module for prompting is turned on, and the active buzzer sends out an alarm prompt; wear at the gauze mask and detect that the face quantity that the accelerator detected not wearing the gauze mask is greater than 0 or the face quantity that the face detection accelerator detected is greater than 0, and when the social distance that ultrasonic ranging module measured was greater than or equal to the safe distance of settlement, the suggestion is with LED lamp module group not bright light, and active buzzer does not report to the police.
The Bluetooth module further comprises a serial port communication module electrically connected with the second bus, and the serial port communication module is used for being connected with an external Bluetooth module.
The video camera further comprises a DDR3 memory, a DDR3 read-write control module and an HDMI output interface, wherein the DDR3 memory and the DDR3 read-write control module are respectively electrically connected with the third bus, the DDR3 read-write control module is electrically connected with the camera module and used for writing video images collected by the camera module into the DDR3 memory, and the DDR3 read-write control module is electrically connected with the HDMI output interface and used for outputting the video images stored in the DDR3 memory through the HDMI output interface.
The first bus is an AHB bus, the second bus is an APB bus, and the third bus is an AXI bus.
The bus interface further comprises an APB bridge and an AXI bridge, the first bus is electrically connected with the second bus through the APB bridge, and the first bus is electrically connected with the third bus through the AXI bridge.
The technical scheme of the invention mainly comprises a processor module, an instruction and data storage module, a logic control module, a function switching key module, an ultrasonic distance measurement module, a face and mask wearing detection module and a camera module, wherein the processor module can read instructions and data from the instruction and data storage module, and the logic control module can control the face and mask wearing detection module and the camera module to work according to the instructions and data of the processor module, so that the real-time detection of the wearing condition of the face and mask is realized; in addition, the ultrasonic ranging module can detect the social distance, and the function switching key module is used for switching a face detection and mask wearing detection function mode and a social distance monitoring alarm function mode, so that the face mask wearing detection and the continuous detection of the social distance according to the face detection or mask wearing detection result can be realized. According to the scheme, unmanned management can be achieved, manpower resources are saved, efficient face detection and mask wearing detection and social distance monitoring are achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a block diagram of a face mask and a detection apparatus of social distance according to an embodiment of the present invention;
FIG. 2 is a block diagram of an embodiment of a face mask and a detection device for social distance detection;
FIG. 3 is an AHB bus address map of the present invention;
FIG. 4 is an APB bus address map of the present invention;
fig. 5 is an AXI bus address map of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description of the invention relating to "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying any relative importance or implicit indication of the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a detection device for a face mask and a social distance, which is different from the problem that a large amount of human resources are consumed for reminding people of wearing the mask and keeping the safe social distance in a manual mode in the prior art. The specific structure of the face-oriented mask and the social distance detection device refers to the following embodiments.
Referring to fig. 1, fig. 1 is a block diagram of a face mask and a detection apparatus for social distance according to an embodiment of the present invention. In an embodiment of the present invention, the face-oriented mask and the device for detecting social distance include: the system comprises a processor module 100, an instruction and data storage module 200, a logic control module 400, a function switching key module 500, an ultrasonic ranging module 600 for executing a social distance monitoring and alarming function mode, a face and mask wearing detection module 700 for executing a face detection and mask wearing detection function mode, and a camera module 800; the processor module 100 is electrically connected to the instruction and data storage module 200 through a first bus 110, and is configured to read instructions and data in the instruction and data storage module 200 through the first bus 110; the logic control module 400, the function switching key module 500 and the ultrasonic ranging module 600 are electrically connected with the first bus 110 through the second bus 120 respectively; the face and mask wearing detection module 700 and the camera module 800 are electrically connected with the first bus 110 through the third bus 130, the logic control module 400 acquires an instruction sent by the processor module 100, and controls the face and mask wearing detection module 700 and the camera module 800 to work, and the function switching key module 500 is used for switching a face detection and mask wearing detection function mode and a social distance monitoring alarm function mode.
Specifically, the processor module 100 is an arm Cortex-M3 processor (1,2,3,4,5,6), and includes an arm Cortex-M3 core 1, a serial debug interface 2, an AHB interface 3, an I-CODE bus 4, a D-CODE bus 5, and a system bus 6. The three-level bus is the first bus 110: AHB bus 7, second bus 120: APB bus 13, third bus 130: AXI bus 34. The three-level bus forms the basic bus framework of the SoC of the scheme. Serial debug interface 2 connects the DAP downloader for real-time debugging of the arm Cortex-M3 kernel 1 program. an arm Cortex-M3 kernel 1 is respectively connected with an I-CODE bus 4, a D-CODE bus 5 and a system bus 6 through an AHB interface 3, and the I-CODE bus 4, the D-CODE bus 5 and the system bus 6 are respectively connected with an AHB bus 7. The instruction and data storage module 200 specifically includes an instruction tightly coupled memory 9(ITCM) and a data tightly coupled memory 11(DTCM), wherein the instruction tightly coupled memory 9(ITCM) is connected to the AHB bus 7 through an AHB interface 8, and the data tightly coupled memory 11(DTCM) is connected to the AHB bus 7 through an AHB interface 10. The logic control module 400, the function switching key module 500 and the ultrasonic ranging module 600 are respectively connected to the APB bus 13. The logic control module 400 is specifically a logic controller 22, and the logic controller 22 is connected to the APB bus 13 through the APB interface 21, and can acquire instruction data sent by the arm Cortex-M3 kernel 1, thereby controlling the camera module 800 and the face and mask wearing detection module 700. The camera module 800 described above is specifically an ov5640 binocular camera 50, and is capable of acquiring image data. The face and mask wear detection module 700 can perform face detection and mask wear detection on the image. The specific structure of the face and mask wearing detection module 700 refers to the following embodiments. The ultrasonic ranging module 600 is specifically an RCWL-1601 ultrasonic ranging module 26, which is connected to the APB bus 13 through the APB interface 25, and can implement SoC social distance monitoring and alarming. The function switching key module 500 is specifically a function switching key 28 connected to the APB bus 13 through the APB interface 27, and is used for switching a face detection and mask wearing detection function mode and a social distance monitoring alarm function mode, so that no manual operation is required, unmanned management is realized, manpower resources are saved, and efficient face detection and mask wearing detection and social distance monitoring alarm are realized.
Further, the face and mask wearing detection module 700 includes a face detection accelerator (36, 38), a mask wearing detection accelerator (41, 43), a first memory 39 storing decision tree parameters required by the face detection accelerator (36, 38), and a second memory 44 storing decision tree parameters required by the mask wearing detection accelerator (41, 43), wherein the face detection accelerator (36, 38) and the mask wearing detection accelerator (41, 43) are respectively electrically connected to the third bus 130, and the face detection accelerator (36, 38) is electrically connected to the first memory 39; the mask wearing detection accelerators (41, 43) are electrically connected to the second memory 44. Specifically, there are two face detection accelerators (36, 38) and two mask wearing detection accelerators (41, 43), and parallel cascade detection can be performed on the image area. The face detection accelerators (36, 38) are connected to the AXI bus 34 via AXI interfaces (35, 37), and the mask wearing detection accelerators (41, 43) are connected to the AXI bus 34 via AXI interfaces (40, 42). The scheme can realize the detection of the face appearing in the image through the face detection accelerators (36, 38), and can realize the detection of whether the face appearing in the image wears the mask through the mask wearing detection accelerators (41, 43). The first memory 39 and the second memory 44 use on-chip memory cells (Block RAM) of the FPGA to store weight parameters required for the operation of the accelerator, and are independently mounted on the corresponding accelerator, thereby avoiding accessing the DDR3 memory through the bus, reducing the workload of the bus, and improving the memory access efficiency of the SoC.
Further, the mask wearing detection device further comprises an alarm module 300 electrically connected with the second bus 120, wherein the alarm module 300 gives an alarm according to the face detection accelerators (36, 38) and/or the mask wearing detection accelerators (41, 43) in the face detection and mask wearing detection function mode. And in the social distance monitoring alarm function mode, alarm prompt is carried out according to the detection results of the human face detection accelerators (36, 38) and the ultrasonic distance measurement module 600 or the mask wearing detection accelerators (41, 43) and the ultrasonic distance measurement module 600. The alarm module 300 can give an alarm according to the detection result of the face detection accelerators (36, 38) and/or the mask wearing detection accelerators (41, 43). For example, in the face detection and mask wearing detection function mode, when the face detection accelerators (36, 38) detect a face in the image, an alarm prompt is given; under the functional modes of face detection and mask wearing detection, when the mask wearing detection accelerators (41, 43) detect that a face without wearing a mask exists in an image, alarm prompt is carried out; in the social distance monitoring and alarming function mode, when the distance measured by the ultrasonic ranging module 600 is smaller than a set distance and the mask wearing detection accelerators (41, 43) detect that a face without wearing a mask exists in an image, alarming is prompted; in the social distance monitoring alarm function mode, when the distance measured by the ultrasonic ranging module 600 is smaller than the set distance and the face detection accelerators (36, 38) detect that a face exists in the image, an alarm prompt is given. The alarm prompt can be flexibly set according to actual requirements. That is, the face detection accelerators (36, 38), the mask wearing detection accelerators (41, 43) and the ultrasonic ranging module 600 can be combined according to actual requirements, and alarm prompt can be performed according to the combined scheme.
Specifically, alarm module 300 still wears detection accelerator (41, 43) testing result and carries out the suggestion of putting on or off according to face detection accelerator (36, 38) and/or gauze mask with LED lamp module 18 for the suggestion under the detection function mode with the gauze mask is worn to reach active bee calling organ 24 including the suggestion, under face detection and gauze mask, LED lamp module 18 for the suggestion and active bee calling organ 24 wear detection accelerator (41, 43) and ultrasonic ranging detection module 600 or gauze mask according to face detection accelerator (36, 38) and ultrasonic ranging detection module 600 and carry out the warning suggestion with the testing result of ultrasonic ranging detection module 600. The prompting LED lamp module 18 is connected with the APB bus 13 through an APB interface 17. The active buzzer 24 is connected to the APB bus 13 through the APB interface 23. Under the functional modes of face detection and mask wearing detection, when the face detection accelerators (36, 38) detect a face, the LED lamp module 18 is used for prompting to light, and when the face detection accelerators (36, 38) do not detect the face, the LED lamp module 18 is used for prompting not to light; when the mask wearing detection accelerators (41, 43) detect the face without wearing the mask, the LED lamp module 18 for prompting is turned on, and when the mask wearing detection accelerators (41, 43) do not detect the face without wearing the mask, the LED lamp module 18 for prompting is not turned on. In the social distance monitoring and alarming function mode, when the mask wearing detection accelerators (41 and 43) detect that the face is not wearing the mask and the distance detected by the ultrasonic ranging module 600 meets a set value, a buzzer is not given out, and when the mask wearing detection accelerators (41 and 43) detect that the face is not wearing the mask and the distance detected by the ultrasonic ranging module 600 does not meet the set value, the buzzer is given out; when the human face detection accelerators (36, 38) detect the human face and the distance detected by the ultrasonic ranging module 600 meets the set value, the buzzer is not generated, and when the human face detection accelerators (36, 38) detect the human face and the distance detected by the ultrasonic ranging module 600 does not meet the set value, the buzzer is generated.
Further, the device also comprises a first counting LED lamp module 32, a second counting LED lamp module 30 and a timer 20 which are respectively electrically connected with the second bus 120, wherein the first counting LED lamp module 32 is connected with the APB bus 13 through an APB interface 31 and is used for counting the number of faces wearing the mask in real time; second count LED lamp module 30 passes through APB interface 29 and connects APB bus 13 for in real time to not wearing the face number of gauze mask to count, timer 20 passes through APB interface 19 and connects APB bus 13 for in proper order carry out face detection to face detection accelerator (36, 38), and wear the time that detects accelerator (41, 43) and carry out the gauze mask and wear the detection to the gauze mask and time. Through the data of the first counting LED lamp module 32 and the second counting LED lamp module 30, the wearing condition of the pedestrian mask in the area can be known, and then a further scheme is carried out according to the wearing result of the pedestrian mask. In this scheme, the detection function of first count LED lamp module 32 and second count LED lamp module 30 can be exchanged according to actual design demand is nimble, for example first count LED lamp module 32 can be used to count the face number of not wearing the gauze mask in real time, and second count LED lamp module 30 can be used to count the face number of wearing the gauze mask in real time.
In a specific embodiment, when the mask wearing detection accelerators (41, 43) detect that the number of faces without wearing masks is greater than 0 or the number of faces detected by the face detection accelerators (36, 38) is greater than 0 and the social distance measured by the ultrasonic ranging module 600 is less than the set safe distance, the prompting LED lamp module 18 is turned on and the active buzzer 24 gives an alarm prompt; when the number of the detected faces, which are not wearing the mask, of the mask wearing detection accelerators (41 and 43) or the number of the detected faces of the face detection accelerators (36 and 38) is greater than 0 and the social distance measured by the ultrasonic ranging module 600 is greater than or equal to the set safe distance, the LED lamp module 18 for prompting is not turned on, and the active buzzer 24 does not give an alarm. When the number of the face detection accelerators (41, 43) detecting that the face does not wear the mask is larger than 0 or the number of the faces detected by the face detection accelerators (36, 38) is larger than 0 and the social distance measured by the ultrasonic ranging module 600 is smaller than the set safe distance, that is, when the two conditions are triggered simultaneously, the LED lamp module 18 for prompting is turned on, and the active buzzer 24 emits buzzing sound to remind the working personnel and the pedestrians. The safety distance in the scheme is specifically 0.5m-1.5m, and the safety distance can be designed according to actual requirements.
Further, the bluetooth communication device further comprises a serial communication module 15 electrically connected with the second bus 120, wherein the serial communication module 15 is connected with the APB bus 13 through an APB interface 14 and is used for being connected with an external bluetooth module 16. In this embodiment, the serial port communication module 15(UART) is used to implement a data transmission function of the SoC, and a serial port-to-bluetooth communication module (HC-05 master-slave integrated bluetooth module) may be externally connected through the UART, thereby implementing wireless data transmission of the SoC.
Specifically, the video image processing device further comprises a DDR3 memory 46 for storing video images, a DDR3 read-write control module 48 and an HDMI output interface 49, wherein the DDR3 memory 46 and the DDR3 read-write control module 48 are respectively electrically connected to the third bus 130, the DDR3 read-write control module 48 is electrically connected to the camera module 800 and is used for writing the video images acquired by the camera module 800 into the DDR3 memory 46, and the DDR3 read-write control module 48 is electrically connected to the HDMI output interface 49 and is used for outputting the video images stored in the DDR3 memory 46 through the HDMI output interface 49. The DDR3 memory 46 is connected to the AXI bus 34 through an AXI interface 45. The DDR3 read-write control module 48 is connected to the AXI bus 34 through an AXI interface 47.
Wherein the first bus 110 is an AHB bus 7, the second bus 120 is an APB bus 13, and the third bus 130 is an AXI bus 34. Specifically, the system further includes an APB bridge 12 and an AXI bridge 33, the first bus 110 is electrically connected to the second bus 120 through the APB bridge 12, and the first bus 110 is electrically connected to the third bus 130 through the AXI bridge 33. In this embodiment, the AHB bus 7 adopts a sparse and fixed address mapping relationship, that is, each Slave port on the AHB bus 7 is not connected to each Master port, and the translation address between the Slave port and the Master port is fixed.
Referring to fig. 3, fig. 3 is a specific address space allocation diagram of the AHB bus. In the scheme, an I-CODE bus 4 and a D-CODE bus 5 in an arm Cortex-M3 processor (1,2,3,4,5,6) are respectively connected with an S0 port and an S1 port in an AHB bus 7, and access to an M0 port in the AHB bus 7 through 0x00000000-0x0000ffff addresses; the system bus 6 in the arm Cortex-M3 processor (1,2,3,4,5,6) is connected to the S2 port in the AHB bus 7 and accesses the M1 port in the AHB bus 7 through 0x20000000-0x3fffffff address, the M2 port in the AHB bus 7 through 0x40000000-0x4 fffffffffff address, and the M3 port in the AHB bus 7 through 0x60000000-0x9fffffff address.
A Peripheral Bus (APB) Bridge (AHB2APB Bridge) is extended and connected to the APB bus 13 to implement the carrying of low-speed peripherals, such as a serial port communication module 15(UART), a prompt LED lamp module 18, a Timer 20(Timer), and the like. An advanced extensible interface (AXI) Bridge (AHB2AXI Bridge) extends and connects to the AXI bus 34 to implement the loading of high-speed peripherals, such as a DDR3 memory 46, face detection accelerators (36, 38), a mask wearing detection accelerator (41, 43), and other modules.
Referring to fig. 4, fig. 4 is an address map of the APB bus according to the present invention, in which the APB bus 13 mainly includes ports S0 and M0-M8. Wherein, the port of S0 is connected with A Peripheral Bus (APB) Bridge (AHB2APB Bridge), and the address space is 0x40000000-0x4 fffffff; the M0 port is connected with a serial port communication module (UART), and the base address of the UART is 0x 40000000; an M1 port is connected with an LED lamp module (LED reader) for prompting, and the base address of the LED lamp module is 0x 40001000; an M2 port connection Timer (Timer) with a base address of 0x 40002000; an M3 port connection Logic Controller (Logic Controller), the base address of which is 0x 40003000; the M4 port is connected with an active Buzzer (Buzzer), and the base address of the active Buzzer is 0x 40004000; the port M5 is connected with a first counting LED lamp module, and the base address of the first counting LED lamp module is 0x 40005000; the port M6 is connected with a second counting LED lamp module, and the base address of the second counting LED lamp module is 0x 40006000; the M7 port is connected with a function switching Key (Key), and the base address of the function switching Key is 0x 40007000; the port of M8 is connected with an RCWL-1601 Ultrasonic ranging module (ultrasonnic), and the base address of the RCWL-1601 Ultrasonic ranging module is 0x 40008000.
Referring to fig. 5, fig. 5 is an AXI bus address map according to the present invention. The AXI bus includes M0, S0-S5 ports. Specifically, the S0 port is connected to an advanced extensible interface (AXI) Bridge (AHB2AXI Bridge), and the address space is 0x60000000-0x9 fffffff; the port of S1 is connected with the face detection accelerator 1; the port of S2 is connected with the face detection accelerator 2; the port of S3 is connected with a mask wearing detection accelerator 1; the port of S4 is connected with a mask wearing detection accelerator 2; the S5 port is connected with a DDR3 Read-Write control Module (DDR3 Read-Write Module); the M0 port is connected to the DDR3 memory 46, wherein the accessible DDR3 memory 46 address space is 0x60000000-0x9 fffffff.
In addition, the scheme can be used for downloading the FPGA program or solidifying the program in a Flash memory (Flash) through a JTAG debugging interface.
For better description of the present solution, the working principle of the present solution is explained as follows:
1) when the SoC is started, the arm Cortex-M3 processor (1,2,3,4,5,6) and various peripherals are reset. At the same time, the arm Cortex-M3 processor (1,2,3,4,5,6) performs instruction fetch (read instruction) operations from the instruction tightly coupled memory 9(ITCM) over the I-CODE bus 4 and D-CODE bus 5 at address space ranges 0x00000000-0x0000 ffff. In addition, the arm Cortex-M3 processor (1,2,3,4,5,6) performs data access operations from the data tightly coupled memory 11(DTCM) over the system bus 6 in the 0x20000000-0x3 fffffffff address space range to enable the arm Cortex-M3 processor (1,2,3,4,5,6) to control various peripherals.
2) The system enters a default functional mode: face detection and mask wearing detection functional modes. The arm Cortex-M3 kernel 1 sends instruction data for starting the ov5640 binocular camera 50 module to the Logic Controller 22(Logic Controller), enables the ov5640 binocular camera 50 module to perform image acquisition, and stores the image data in the DDR3 memory 46. After writing one frame of image data into the DDR3 memory 46, the ov5640 binocular camera 50 module sends an interrupt request to the arm Cortex-M3 core 1, wakes up the arm Cortex-M3 core 1 from a standby state and performs image processing, and detects images by cooperating with the face detection accelerators (36, 38) and the mask wearing detection accelerators (41, 43).
3) When the arm Cortex-M3 core 1 is awakened from the standby state, the arm Cortex-M3 core 1 will send instructions to the Logic Controller 22(Logic Controller) to awaken the face detection accelerators (36, 38) and the mask wearing detection accelerators (41, 43) in sequence, and start the Timer 20(Timer) to perform face detection on the face detection accelerators (36, 38) in sequence, and time the mask wearing detection accelerators (41, 43) perform mask wearing detection, and the arm Cortex-M3 core 1 enters the standby state at the same time. In the starting process of the two groups of hardware accelerators, the hardware accelerators are not influenced mutually and are independent from each other, and whether the hardware accelerators are started or not is only controlled by an interrupt instruction of an arm Cortex-M3 kernel 1.
4) After the two sets of hardware accelerators receive the instruction from the Logic Controller 22(Logic Controller), the hardware accelerators directly read the image Data from the DDR3 memory 46, read the parameter Data required by the hardware accelerators for face detection and mask wearing detection from the corresponding Block random access memories (39, 44) (tracking Data Block RAM) storing the parameter Data of the decision tree, and store the detection result in the DDR3 memory 46. Then, the hardware accelerator will initiate an interrupt request to the arm Cortex-M3 core 1, wake up the arm Cortex-M3 core 1 and perform frame processing on the image according to the detection result.
5) After the image after frame processing is stored in the DDR3 memory 46, the arm Cortex-M3 kernel 1 sends an instruction for switching the read/write address of the image data to the Logic Controller 22(Logic Controller), so as to prepare for collecting the image data of the next frame. Meanwhile, the arm Cortex-M3 kernel 1 sends an instruction to start the ov5640 binocular camera 50 module to the Logic Controller 22(Logic Controller), and enters a standby state until a new frame of image data is written into the DDR3 memory 46.
6) The frame-processed image is displayed by a display connected to the HDMI output interface 49. Meanwhile, the SoC transmits the detected number of faces without wearing the mask and the time required for detection, the number of faces wearing the mask and the time required for detection to the serial port-to-bluetooth communication module (model: HC-05 master-slave integrated bluetooth module) connected to a computer (PC) in sequence through the serial port communication module 15 on the FPGA development board externally connected to the serial port-to-bluetooth communication module (model: HC-05 master-slave integrated bluetooth module), and displays the GUI on a display connected to the HDMI output interface 49 in real time.
7) When the number of the faces without wearing the mask is not 0, the LED lamp module 18 for prompting on the FPGA development board is directly turned on normally and starts the active buzzer 24 to give an alarm, and meanwhile, the LED lamp module 30 for second counting is turned on and off correspondingly to count the number of the faces without wearing the mask in real time. The second counting LED module 30 is specifically a green light.
When the detected number of the faces wearing the mask is not 0, the LED lamp module 18 for prompting on the FPGA development board is not turned on and the active buzzer 24 is not started to give an alarm, and meanwhile, the LED lamp module 32 for first counting is correspondingly turned on and off to count the number of the faces wearing the mask in real time. The first counting LED lamp module 32 is specifically a red light.
And when the SoC detects that the number of faces without wearing the mask and the number of faces with wearing the mask are not 0, the LED lamp module 18 for prompting on the FPGA development board is directly turned on and the active buzzer 24 is started to give an alarm, and meanwhile, the LED lamp module 32 for first counting and the LED lamp module 30 for second counting are turned on and off correspondingly to count the number of faces without wearing the mask and the number of faces with wearing the mask in real time. It should be understood that the first counting LED lamp module 32 and the second counting LED lamp module 30 may be different from each other in terms of color.
Then, the arm Cortex-M3 kernel 1 sends an instruction to the Logic Controller 22(Logic Controller) to start the ov5640 binocular camera 50 module, and enters a standby state until a new frame of image data is written into the DDR3 memory 46.
8) And switching to a social distance monitoring and alarming function mode through a function switching key. At this time, the arm Cortex-M3 kernel 1 starts the ov5640 binocular camera 50 module through the logic controller 22 for image data acquisition and storage in the DDR3 memory 46. Then the ov5640 binocular camera 50 module initiates an interrupt request to the arm Cortex-M3 kernel 1, so that the arm Cortex-M3 kernel 1 performs frame processing of the image.
9) The face detection accelerators (36, 38) and the mask wearing detection accelerators (41, 43) are sequentially started to detect the images, and the detection results are stored in the DDR3 memory 46. At the same time, a Timer 20(Timer) is started to time the time for the face detection accelerator (36, 38) to perform the face detection and the mask wearing detection accelerator (41, 43) to perform the mask wearing detection.
10) The frame-processed image is displayed by a display connected to the HDMI output interface 49. Meanwhile, the SoC transmits the detected number of faces without wearing the mask and the time required for detection, the number of faces wearing the mask and the time required for detection to the serial port-to-bluetooth communication module (model: HC-05 master-slave integrated bluetooth module) connected to a computer (PC) in sequence through the serial port communication module 15 on the FPGA development board externally connected to the serial port-to-bluetooth communication module (model: HC-05 master-slave integrated bluetooth module), and displays the GUI on a display connected to the HDMI output interface 49 in real time.
When the SoC detects that the number of faces without wearing the mask is not 0 and detects that the distance between the person and the system is smaller than the set safe distance, the LED lamp module 18 for prompting on the FPGA development board is directly turned on and starts the active buzzer 24 to alarm, so as to remind the wearer of keeping a safe social distance.
When the SoC detects that the number of faces without wearing the mask is not 0 and detects that the distance between the person and the system is greater than or equal to the set safety distance, the LED lamp module 18 for prompting on the FPGA development board does not light up and the active buzzer 24 does not start alarming.
In addition, the arm Cortex-M3 kernel 1 sends an instruction to start the ov5640 binocular camera 50 module to the Logic Controller 22(Logic Controller) and enters a standby state until a new frame of image data is written in the DDR3 memory 46.
11) The binocular camera 50 is switched through keys of the ov5640 to switch the camera to acquire image data.
12) The face detection and mask wearing detection function mode and the social distance monitoring and alarming function mode can be switched at will through the function switching key.
The results of the detection of the wearing of the face and the mask by applying the above scheme are shown in tables 1 to 3.
TABLE 1
Figure BDA0003475724220000141
Table 1 shows the on-chip resource usage of SoC when the face detection SoC, the mask wearing detection SoC, and the function switching key switch implemented by the present design can implement the face detection, mask wearing detection function mode, and the social distance monitoring alarm function mode. It can be seen from the table that the SoC realized by the design can realize the function diversification of the SoC under the condition of adding a small amount of resources such as LUT, LUTRAM, FF, BRAM, DSP and the like, thereby fully demonstrating that the SoC realized by the design has higher on-chip resource utilization efficiency.
TABLE 2
Figure BDA0003475724220000142
Table 2 shows a comparison table of the SoC power consumption and the operating clock frequency, which shows the comparison conditions of the SoC power consumption and the operating clock frequency when the face detection SoC, the mask wearing detection function SoC, and the face detection and mask wearing detection function mode and the social distance monitoring and alarming function mode can be realized through the function switching key switch. As can be seen from the table, the SoC realized by the design has a slight increase in power consumption, but has a higher maximum clock frequency that can be operated, which can reach 144.57 MHz. However, the M3 processor can achieve the best matching of power consumption and performance at about 50MHz, so that the system clock is selected to be 50MHz, high-performance face detection and mask wearing detection functions can be realized at low power consumption, and a social distance monitoring and alarming function can be realized.
TABLE 3
SoC operating state SoC detection average frame rate
Empty detection 54FPS
Frameless processing 32FPS
Picture frame processing 31FPS
Table 3 is an average frame rate monitoring and comparing table of SoC, which shows how SoC can detect average frame rate in different working states when the functional mode of face detection, mask wearing detection and social distance monitoring and warning can be realized by switching function switching keys. As can be seen from the table, the SoC realized by the design can realize the human face detection and mask wearing detection functions with higher real-time performance, and can reach more than 30FPS on average. Although frame processing of the image by the arm Cortex-M3 kernel 1 slightly lowers the SoC detection frame rate, this drawback can be avoided in the scenario where no video output is required but only UART communication is required.
Compared with the prior art, the invention provides the special SoC which can complete the tasks of face detection and mask wearing detection and realize the close-range monitoring and alarming function facing to social contact without the assistance of other cloud processors or high-performance equipment, namely the detection device facing to the face mask and the social contact distance. The special SoC can carry out face detection, mask wearing detection function mode and arbitrary switching of social distance monitoring alarm function mode through the function switching key so as to meet different application scenes. In addition, the special SoC realized by the design can perform real-time face detection and mask wearing detection with higher on-chip resource utilization rate, lower power consumption and higher frequency. Meanwhile, the special SoC realized by the design can realize wireless data transmission through two serial-to-Bluetooth communication modules which communicate in a master-slave communication mode.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents made by the contents of the specification and drawings or directly/indirectly applied to other related technical fields within the spirit of the present invention are included in the scope of the present invention.

Claims (10)

1. The utility model provides a detection device towards people's face gauze mask and social distance which characterized in that, detection device towards people's face gauze mask and social distance includes: the system comprises a processor module, an instruction and data storage module, a logic control module, a function switching key module, a camera module, an ultrasonic ranging module for executing a social distance monitoring and alarming function mode and a face and mask wearing detection module for executing a face detection and mask wearing detection function mode; the processor module is electrically connected with the instruction and data storage module through a first bus and is used for reading instructions and data in the instruction and data storage module through the first bus; the logic control module, the function switching key module and the ultrasonic ranging module are respectively and electrically connected with the first bus through a second bus; the face and mask wearing detection module and the camera module are respectively electrically connected with the first bus through a third bus, the logic control module acquires an instruction sent by the processor module and controls the face and mask wearing detection module and the camera module to work, and the function switching key module is used for switching a face detection function mode and a mask wearing detection function mode and a social distance monitoring and alarming function mode.
2. The device for detecting a face-to-mask and a social distance according to claim 1, wherein the face-to-mask wearing detection module comprises a face detection accelerator, a mask wearing detection accelerator, a first memory for storing decision tree parameters required by the face detection accelerator and a second memory for storing decision tree parameters required by the mask wearing detection accelerator, the face detection accelerator and the mask wearing detection accelerator are electrically connected to a third bus respectively, and the face detection accelerator is electrically connected to the first memory; the mask wearing detection accelerator is electrically connected with the second memory.
3. The device for detecting the face-facing mask and the social distance according to claim 2, further comprising an alarm module electrically connected to the second bus, wherein the alarm module gives an alarm according to the face detection accelerator and/or the mask wearing detection accelerator in the face detection and mask wearing detection function mode; and carrying out alarm prompt according to the detection result of the face detection accelerator and the ultrasonic ranging module or the detection result of the mask wearing detection accelerator and the ultrasonic ranging module in the social distance monitoring alarm function mode.
4. The device for detecting the face-oriented mask and the social distance as claimed in claim 3, wherein the alarm module further comprises a prompting LED lamp module and an active buzzer, and the prompting LED lamp module performs on-off prompting according to the detection results of the face detection accelerator and the mask wearing detection accelerator in the face detection and mask wearing detection function mode; under the social distance monitoring and alarming function mode, the LED lamp module and the active buzzer for prompting carry out alarming prompt according to the detection result that the face detection accelerator and the ultrasonic ranging module or the mask is worn to detect the accelerator and the ultrasonic ranging module.
5. The face-oriented mask and social distance detection device according to claim 4, further comprising a first counting LED lamp module, a second counting LED lamp module and a timer, wherein the first counting LED lamp module, the second counting LED lamp module and the timer are electrically connected with the second bus respectively, and the first counting LED lamp module is used for counting the number of faces wearing the mask in real time; second count LED lamp module is used for counting the people's face number of not wearing the gauze mask in real time, the time-recorder is used for carrying out face detection to the face detection accelerator in proper order to and wear the time that detects that the detection accelerator carries out the gauze mask and wears the detection to the gauze mask.
6. The device for detecting a face-oriented mask and a social distance according to claim 5, wherein when the mask wearing detection accelerator detects that the number of faces without wearing the mask is greater than 0 or the number of faces detected by the face detection accelerator is greater than 0 and the social distance detected by the ultrasonic ranging module is less than a set safety distance, the LED lamp module for prompting is turned on and the active buzzer sends an alarm prompt; wear at the gauze mask and detect that the face quantity that the accelerator detected not wearing the gauze mask is greater than 0 or the face quantity that the face detection accelerator detected is greater than 0, and when the social distance that ultrasonic ranging module measured was greater than or equal to the safe distance of settlement, the suggestion is with LED lamp module group not bright light, and active buzzer does not report to the police.
7. The face-facing mask and social distance detection device of claim 1, further comprising a serial communication module electrically connected to the second bus, wherein the serial communication module is configured to connect to an external bluetooth module.
8. The face-facing mask and social distance detection device according to claim 2, further comprising a DDR3 memory for storing video images, a DDR3 read-write control module and an HDMI output interface, wherein the DDR3 memory and the DDR3 read-write control module are electrically connected to the third bus respectively, the DDR3 read-write control module is electrically connected to the camera module and is configured to write the video images acquired by the camera module into the DDR3 memory, and the DDR3 read-write control module is electrically connected to the HDMI output interface and is configured to output the video images stored in the DDR3 memory through the HDMI output interface.
9. The device for detecting a face-facing mask and a social distance according to any one of claims 1 to 8, wherein the first bus is an AHB bus, the second bus is an APB bus, and the third bus is an AXI bus.
10. The face-facing mask and social distance detecting device of claim 9, further comprising an APB bridge and an AXI bridge, wherein the first bus is electrically connected to the second bus via the APB bridge, and the first bus is electrically connected to the third bus via the AXI bridge.
CN202210054188.2A 2022-01-18 2022-01-18 Face mask and social distance-oriented detection device Pending CN114202793A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210054188.2A CN114202793A (en) 2022-01-18 2022-01-18 Face mask and social distance-oriented detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210054188.2A CN114202793A (en) 2022-01-18 2022-01-18 Face mask and social distance-oriented detection device

Publications (1)

Publication Number Publication Date
CN114202793A true CN114202793A (en) 2022-03-18

Family

ID=80658586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210054188.2A Pending CN114202793A (en) 2022-01-18 2022-01-18 Face mask and social distance-oriented detection device

Country Status (1)

Country Link
CN (1) CN114202793A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766812A (en) * 2017-10-12 2018-03-06 东南大学—无锡集成电路技术研究所 A kind of real-time face detection identifying system based on MiZ702N
CA3082221A1 (en) * 2020-04-15 2020-08-31 Promark Electronics Inc. Social distancing personal warning device
CN112040222A (en) * 2020-08-07 2020-12-04 深圳大学 Visual saliency prediction method and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766812A (en) * 2017-10-12 2018-03-06 东南大学—无锡集成电路技术研究所 A kind of real-time face detection identifying system based on MiZ702N
CA3082221A1 (en) * 2020-04-15 2020-08-31 Promark Electronics Inc. Social distancing personal warning device
CN112040222A (en) * 2020-08-07 2020-12-04 深圳大学 Visual saliency prediction method and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
焦继业 等: "一种用于人脸检测SoC中的加速协处理器设计" *

Similar Documents

Publication Publication Date Title
CN102566739B (en) Multicore processor system and dynamic power management method and control device thereof
US8527785B2 (en) Transitioning a computing platform to a low power system state
CN104169832B (en) Providing energy efficient turbo operation of a processor
EP1215577A2 (en) Fault management and recovery based on task-ID
CN104541228A (en) Providing support for device states
JPH1185335A (en) Computer system
US11392698B2 (en) Active side-channel attack prevention
US7886177B2 (en) Method and apparatus of collecting timer ticks
WO2022052492A1 (en) Gas meter with program embedded in nb-iot communication module, and data processing method
US20140156871A1 (en) Polling of i/o devices on host initiated communication transports
DE112017003080T5 (en) PROCESSOR WITH SIMULTANEOUS CORE AND FABRIC OUTPUT FROM A CONDITION WITH LOW ENERGY
WO2014142847A1 (en) Multi-core binary translation task processing
US10620687B2 (en) Hybrid power management approach
Zhang et al. WAEAS: An optimization scheme of EAS scheduler for wearable applications
CN114202793A (en) Face mask and social distance-oriented detection device
CN210072612U (en) Internet of things chip system
CN111309137B (en) Chip control method and device, chip and terminal equipment
CN112039763A (en) NB-IoT gateway
He et al. Design of outdoor air quality monitoring system based on ZigBee wireless sensor network
CN110109381A (en) Heat sensor dynamic is closed
CN104076892A (en) Power supply management method and power supply management system
CN206907172U (en) A kind of video acquisition warning device
WO2022048452A1 (en) System on chip and intelligent wearable device
CN106814840A (en) Low power state for processor keeps pattern
CN105867269A (en) Computer work environment management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination