Epidemic risk monitoring method, device, equipment, storage medium and program product

Through video data analysis of high-risk personnel, mask wearing and gathering conditions, the epidemic risk level is automatically calculated, which solves the problem of low efficiency of manual inspections, achieves efficient and accurate epidemic prevention and control, and reduces labor costs and the risk of epidemic rebound.

CN112992372BActive Publication Date: 2024-09-24WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110257137.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-09
Publication Date
2024-09-24
Estimated Expiration
2041-03-09

Smart Images

  • Figure CN112992372B
    Figure CN112992372B
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment, storage medium and program product for monitoring epidemic risks, the method comprising: obtaining video data collected by shooting an area to be monitored; performing risk index analysis on images in the video data, wherein the risk index at least includes one or more of a high-risk personnel detection index, a mask wearing detection index and a public gathering degree index; and calculating the risk level of the area to be monitored based on the analysis results of each risk index. Since the scheme of the present invention analyzes each risk index based on video images, compared with the manual one-by-one screening of the crowd, the risk monitoring efficiency is higher and the results are more comprehensive and accurate, thereby promoting the implementation of epidemic prevention and control work and avoiding the rebound of the epidemic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image analysis technology, and in particular to an epidemic risk monitoring method, device, equipment, storage medium and program product. Background Art

[0002] An epidemic refers to an infectious disease that can infect a large population. For highly contagious epidemics, they can be transmitted through direct transmission, aerosol transmission, and contact transmission, and are highly contagious, seriously affecting people's lives, work, and social and economic development. Therefore, once a highly contagious epidemic breaks out, it is necessary to immediately take a series of epidemic prevention and control measures to do a good job of protection and isolation to avoid the serious impact caused by a large number of people being infected. At present, the epidemic prevention and control methods of various countries are still in the stage of manual investigation and manual maintenance, which is inefficient, especially in the rebound period after the peak of the epidemic. With the increase in the flow and gathering of people, it may not be able to effectively prevent the rebound of the epidemic. Summary of the invention

[0003] The main purpose of the present invention is to provide an epidemic risk monitoring method, device, equipment, storage medium and program product, aiming to solve the technical problem of low efficiency of the current epidemic prevention method relying on manual investigation and maintenance.

[0004] To achieve the above object, the present invention provides a method for monitoring epidemic risk, the method comprising the following steps:

[0005] Obtaining video data collected by shooting the area to be monitored;

[0006] Performing risk index analysis on the images in the video data, wherein the risk index includes at least one or more of a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index;

[0007] The risk level of the area to be monitored is calculated based on the analysis results of each of the risk indicators.

[0008] Optionally, when the risk indicator includes the high-risk personnel detection indicator, the step of performing risk indicator analysis on the image in the video data includes:

[0009] Extracting public features from the image in the video data to obtain first feature data corresponding to each public person in the image;

[0010] Matching the first characteristic data with the second characteristic data of high-risk personnel in a preset high-risk personnel database to obtain a matching result;

[0011] The number of persons who are high-risk persons in the image is counted according to the matching result, and the number of persons is used as the analysis result of the high-risk person detection index.

[0012] Optionally, after the step of calculating the risk level of the to-be-monitored area according to the analysis results of each of the risk indicators, the method further includes:

[0013] When it is detected that the risk level is greater than a first preset level, the first feature data of each member of the public in the image is added to the preset high-risk personnel database.

[0014] Optionally, when the risk indicator includes the mask wearing detection indicator, the step of performing risk indicator analysis on the image in the video data includes:

[0015] Performing face detection on the image in the video data to obtain various face regions;

[0016] Performing facial attribute recognition on the face area to obtain a recognition result indicating whether there is a mask in the face area;

[0017] Determine a target face region where a mask is present from each face region according to the recognition result, and perform key point detection on the target face region to obtain a detection result indicating whether the target face region is wearing a mask correctly;

[0018] The number of first persons who are not wearing masks and the number of second persons who are not wearing masks correctly in the image are counted according to the recognition result and the detection result, and the sum of the first number of persons and the second number of persons is used as the analysis result of the mask wearing detection index.

[0019] Optionally, when the risk index includes the public gathering degree index, the step of performing risk index analysis on the image in the video data includes:

[0020] Performing face detection on the image in the video data to obtain various face regions;

[0021] The number of face areas is counted to obtain the number of people in the image, and the population density is calculated using the number of people and the area of ​​the area to be monitored, and the population density is used as the analysis result of the public gathering degree index.

[0022] Optionally, after the step of performing face detection on the image in the video data to obtain each face region, the method further includes:

[0023] Calculating the distance between each pair of face regions;

[0024] When it is detected that the number of face region pairs whose mutual distances are less than a preset distance is greater than a preset number, an alarm message is output.

[0025] Optionally, the step of acquiring video data collected by shooting the area to be monitored includes:

[0026] Receiving video data sent in real time by a camera device, wherein the camera device captures the area to be monitored to collect the video data;

[0027] The step of performing risk index analysis on the image in the video data comprises:

[0028] Performing risk index analysis on each frame of the video data in real time;

[0029] After the step of calculating the risk level of the area to be monitored according to the analysis results of each of the risk indicators, the method further includes:

[0030] When it is detected that the risk level of the area to be monitored is greater than a second preset level, an alarm message is output.

[0031] To achieve the above object, the present invention also provides an epidemic risk monitoring device, the device comprising:

[0032] An acquisition module is used to acquire video data collected by shooting the area to be monitored;

[0033] An analysis module, configured to perform risk index analysis on the images in the video data, wherein the risk index includes at least one or more of a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index;

[0034] The calculation module is used to calculate the risk level of the area to be monitored according to the analysis results of each risk indicator.

[0035] To achieve the above-mentioned purpose, the present invention also provides an epidemic risk monitoring device, which includes: a memory, a processor, and an epidemic risk monitoring program stored in the memory and executable on the processor, and the epidemic risk monitoring program, when executed by the processor, implements the steps of the epidemic risk monitoring method as described above.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which an epidemic risk monitoring program is stored, and when the epidemic risk monitoring program is executed by a processor, the steps of the epidemic risk monitoring method as described above are implemented.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer program product, including a computer program, which implements the steps of the epidemic risk monitoring method as described above when executed by a processor.

[0038] In the present invention, by setting high-risk personnel detection indicators, mask wearing detection indicators and public gathering degree indicators that reflect epidemic risk factors, the video data of the monitored area is automatically analyzed to obtain the analysis results of each risk indicator, and the risk level of the monitored area is calculated based on the analysis results. Since the scheme of the present invention is based on the analysis of each risk indicator based on video images, compared with the manual one-by-one screening of the crowd, the risk monitoring efficiency is higher, the results are more comprehensive and accurate, and the epidemic prevention and control work is carried out more effectively to avoid the rebound of the epidemic. In addition, the epidemic prevention personnel can understand the risk level of the monitored area remotely without dispatching a large number of personnel to the field for monitoring, saving manpower costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;

[0040] Figure 2 This is a flow chart of the first embodiment of the epidemic risk monitoring method of the present invention;

[0041] Figure 3 Schematic diagram of functional modules of a preferred embodiment of the epidemic risk monitoring device of the present invention.

[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0044] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0045] It should be noted that the epidemic risk monitoring device in the embodiment of the present invention can be a smart phone, a personal computer, a server and other devices, and no specific limitation is made here.

[0046] like Figure 1As shown, the epidemic risk monitoring device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0047] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the epidemic risk monitoring device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0048] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an epidemic risk monitoring program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the epidemic risk monitoring program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the epidemic risk monitoring program stored in the memory 1005 and perform the following operations:

[0049] Obtaining video data collected by shooting the area to be monitored;

[0050] Performing risk index analysis on the images in the video data, wherein the risk index includes at least one or more of a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index;

[0051] The risk level of the area to be monitored is calculated based on the analysis results of each of the risk indicators.

[0052] Further, when the risk indicator includes the high-risk personnel detection indicator, the step of performing risk indicator analysis on the image in the video data includes:

[0053] Extracting public features from the image in the video data to obtain first feature data corresponding to each public person in the image;

[0054] Matching the first characteristic data with the second characteristic data of high-risk personnel in a preset high-risk personnel database to obtain a matching result;

[0055] The number of persons who are high-risk persons in the image is counted according to the matching result, and the number of persons is used as the analysis result of the high-risk person detection index.

[0056] Further, after the step of calculating the risk level of the area to be monitored according to the analysis results of each of the risk indicators, the processor 1001 can also be used to call the epidemic risk monitoring program stored in the memory 1005 and perform the following operations:

[0057] When it is detected that the risk level is greater than a first preset level, the first feature data of each member of the public in the image is added to the preset high-risk personnel database.

[0058] Further, when the risk indicator includes the mask wearing detection indicator, the step of performing risk indicator analysis on the image in the video data includes:

[0059] Performing face detection on the image in the video data to obtain various face regions;

[0060] Performing facial attribute recognition on the face area to obtain a recognition result indicating whether there is a mask in the face area;

[0061] Determine a target face region where a mask is present from each face region according to the recognition result, and perform key point detection on the target face region to obtain a detection result indicating whether the target face region is wearing a mask correctly;

[0062] The number of first persons who are not wearing masks and the number of second persons who are not wearing masks correctly in the image are counted according to the recognition result and the detection result, and the sum of the first number of persons and the second number of persons is used as the analysis result of the mask wearing detection index.

[0063] Further, when the risk index includes the public gathering degree index, the step of performing risk index analysis on the image in the video data includes:

[0064] Performing face detection on the image in the video data to obtain various face regions;

[0065] The number of face areas is counted to obtain the number of people in the image, and the population density is calculated using the number of people and the area of ​​the area to be monitored, and the population density is used as the analysis result of the public gathering degree index.

[0066] Further, after the step of performing face detection on the image in the video data to obtain each face area, the processor 1001 can also be used to call the epidemic risk monitoring program stored in the memory 1005 and perform the following operations:

[0067] Calculating the distance between each pair of face regions;

[0068] When it is detected that the number of face region pairs whose mutual distances are less than a preset distance is greater than a preset number, an alarm message is output.

[0069] Furthermore, the step of obtaining the video data collected by shooting the area to be monitored includes:

[0070] Receiving video data sent in real time by a camera device, wherein the camera device captures the area to be monitored to collect the video data;

[0071] The step of performing risk index analysis on the image in the video data comprises:

[0072] Performing risk index analysis on each frame of the video data in real time;

[0073] After the step of calculating the risk level of the area to be monitored according to the analysis results of each risk indicator, the processor 1001 can also be used to call the epidemic risk monitoring program stored in the memory 1005 and perform the following operations:

[0074] When it is detected that the risk level of the area to be monitored is greater than a second preset level, an alarm message is output.

[0075] Based on the above structure, various embodiments of the epidemic risk monitoring method are proposed.

[0076] Reference Figure 2 , Figure 2 This is a flow chart of the first embodiment of the epidemic risk monitoring method of the present invention.

[0077] The embodiments of the present invention provide embodiments of the epidemic risk monitoring method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here. The execution subjects of each embodiment of the epidemic risk monitoring method of the present invention may be devices such as smart phones, personal computers, and servers. For ease of description, the execution subjects are omitted in the following embodiments. In this embodiment, the epidemic risk monitoring method includes:

[0078] Step S10, obtaining video data collected by shooting the area to be monitored;

[0079] In this embodiment, areas where the public may gather, such as shopping malls, offline stores, schools, and hospitals, may be used as areas to be monitored. Cameras may be installed at appropriate locations in the areas to be monitored to capture images or videos within the areas to be monitored.

[0080] The video data of the area to be monitored is obtained in real time, or the video data of the area to be monitored is obtained when risk level analysis of the area to be monitored is required.

[0081] Step S20, performing risk index analysis on the images in the video data, wherein the risk index includes at least one or more of a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index;

[0082] Risk indicators for risk judgment can be pre-set, and the risk indicators can include at least one or more of the high-risk personnel detection indicators, mask wearing detection indicators, and public gathering degree indicators, and can also include other indicators, which are not limited here. Among them, the high-risk personnel detection indicator can be an indicator for judging whether there are high-risk personnel in the monitored area, and high-risk personnel can include confirmed personnel or personnel who have had close contact with confirmed personnel; a specific feasible way is to extract facial features from images in video data to determine whether there are facial features of high-risk personnel in the image, and then obtain the analysis result of the indicator. The mask wearing detection indicator can be an indicator for judging whether each person in the monitored area wears a mask; a specific feasible way is to obtain each face area in the image by performing face detection on the image in the video data, and then classify the face area or perform target detection with the mask as the target object to determine whether there is a mask in the face area, and then obtain the analysis result of the indicator. The public gathering degree index can be an indicator for judging the density of people in the monitored area. A specific feasible way is to determine the number of public personnel in the image by performing face detection on the image in the video data, and then determine the density of people in the monitored area, and obtain the analysis result of the indicator.

[0083] Step S30, calculating the risk level of the area to be monitored according to the analysis results of each of the risk indicators.

[0084] After obtaining the analysis results of each risk indicator, the risk level of the area to be monitored can be calculated according to the risk indicator. Specifically, the risk level assessment method can be set in advance. For example, when the risk indicator includes multiple of the above three indicators, a linear model for risk level assessment can be obtained in advance based on a large amount of epidemic data statistics, and the linear model includes the weights corresponding to each risk indicator. The analysis results of each risk indicator are substituted into the linear model to obtain the risk level; wherein, the analysis results of the high-risk personnel detection indicator can be represented by the number of high-risk personnel in the image, the mask wearing detection indicator can be represented by the number of people who do not wear masks in the image, and the public gathering degree indicator can be represented by the density of people in the image. For example, when the risk indicator includes one of the above three indicators, the mapping relationship between the analysis result and the risk level can be set in advance for the risk indicator; for example, when the risk indicator is a mask wearing detection indicator, the mapping relationship between the number of people who do not wear masks and the risk level can be set. When the number of people is more, the risk level is higher, and then the risk level of the area to be monitored can be determined according to the mapping relationship. In addition, there are other feasible assessment methods, which can be set according to specific needs, and they are not listed here one by one.

[0085] After obtaining the risk level, the analysis results and risk level of each indicator can be output, for example, sent to the terminal of the epidemic prevention personnel, so that the epidemic prevention personnel can timely understand the public situation and risk level of the area to be monitored, and then make corresponding protective measures without having to deploy a large number of protection personnel to conduct on-site monitoring in the area to be monitored.

[0086] In this embodiment, by setting high-risk personnel detection indicators, mask wearing detection indicators and public gathering degree indicators that reflect epidemic risk factors, the video data of the monitored area is automatically analyzed to obtain the analysis results of each risk indicator, and the risk level of the monitored area is calculated based on the analysis results. Since the scheme of this embodiment is based on the analysis of each risk indicator based on video images, compared with the manual one-by-one screening of the crowd, the risk monitoring efficiency is higher and the results are more comprehensive and accurate, thereby promoting the development of epidemic prevention and control work and avoiding the rebound of the epidemic. In addition, epidemic prevention personnel can understand the risk level of the monitored area remotely without dispatching a large number of personnel to the field for monitoring, saving manpower costs.

[0087] It should be noted that if the video data is offline video data, then one frame of image can be selected from the video data for risk index analysis, and the risk level of the area to be monitored can be obtained based on the analysis result of one frame of image; or multiple frames of image can be selected from the video data for risk index analysis, and the risk level corresponding to each frame of image can be calculated respectively, and the maximum value or the average value can be selected as the final risk level of the area to be monitored. If the video data is collected in real time, each frame of image in the video data can be analyzed in real time. That is, the video frames transmitted in real time by the camera device can be analyzed in real time, and each frame can be analyzed, or it can be analyzed every few frames.

[0088] Furthermore, in one embodiment, step S10 includes:

[0089] Step S101, receiving video data sent in real time by a camera device, wherein the camera device captures the area to be monitored to collect the video data;

[0090] The step S20 comprises:

[0091] Step S201, performing risk index analysis on each frame of the video data in real time;

[0092] The camera installed in the monitored area sends the video data of the monitored area to the analysis system in real time. The video data sent by the camera in real time is received. And the risk index analysis is performed on each frame of the video data in real time. That is, when a frame of image is received, the risk index analysis is performed on the frame of image, and then the risk level corresponding to the frame of image is obtained. Then, by performing real-time analysis on the real-time video data, the real-time risk level of the monitored area can be obtained, which is more conducive to risk warning in places with large traffic.

[0093] After step S30, the method further includes:

[0094] Step S40: when it is detected that the risk level of the area to be monitored is greater than a second preset level, outputting an alarm message.

[0095] After the risk level is obtained based on real-time video frame image analysis, it can be detected whether the risk level is greater than a preset level. If it is, an alarm message can be output. Specifically, the alarm message can be output to the broadcasting equipment in the monitored area so that the broadcasting equipment can broadcast an alarm voice or an alarm ring. The alarm voice can be a voice prompting people to keep their distance or wear masks. The second preset level can be pre-set. When this level is exceeded, it indicates that the risk in the monitored area is high and an early warning is required.

[0096] In this embodiment, real-time risk indicator analysis is performed on the real-time video data of the monitored area, and an alarm message is output when the risk level of the monitored area is greater than a preset level. This allows epidemic prevention personnel or the public to discover in time when the risk in the monitored area is high, thereby enabling them to take protective measures in a timely manner and effectively prevent the rebound of the epidemic.

[0097] Further, based on the above first embodiment, a second embodiment of the epidemic risk monitoring method of the present invention is proposed. In this embodiment, step S20 includes:

[0098] Step S211, extracting public features from the image in the video data to obtain first feature data corresponding to each public person in the image;

[0099] When the risk index includes a high-risk person detection index, public features can be extracted from the image in the video data to obtain first feature data corresponding to each public person in the image. The public features can include facial attribute features and external attribute features. The external attribute features can include whether to wear glasses, whether to wear a hat, and clothing style.

[0100] The extraction of facial attribute features can be achieved by performing face detection on an image to obtain various face regions in the image, and then extracting facial attribute features from each face region. Face detection can be implemented using an existing commonly used target object detection model or algorithm, that is, taking the face as the target object. The extraction of facial attribute features can be implemented using an existing image feature extraction model or algorithm. The specific implementation process will not be described in detail here.

[0101] The extraction of external attribute features can detect the human body region of the image and obtain the various human body regions in the image. It should be noted that the face region corresponds to the human body region one by one. The external attribute features are extracted for each human body region. Human body region detection can be implemented by using the existing commonly used target detection model or algorithm, that is, taking the human body as the target; it can be implemented by using the existing commonly used semantic segmentation model or algorithm, that is, taking glasses, hats and clothes as categories of semantic segmentation. The specific implementation process will not be described in detail here.

[0102] A facial region corresponds to a person, so the feature data of each person can be obtained through public feature extraction. The feature data includes the facial attribute features of the person, or further includes the external attribute features of the person.

[0103] Step S212, matching the first characteristic data with the second characteristic data of high-risk personnel in a preset high-risk personnel database to obtain a matching result;

[0104] A high-risk personnel database can be established in advance, in which the characteristic data of high-risk personnel are stored. The characteristic data can also include facial attribute characteristics and external attribute characteristics of high-risk personnel. The characteristic data in the high-risk personnel database can be derived from the confirmed personnel data released by the epidemic prevention department or the personnel data that have been in contact with confirmed cases; then, when the high-risk personnel in the high-risk personnel database are determined to have eliminated the risk, their corresponding characteristic data can be deleted from the high-risk personnel database.

[0105] The first feature data of each public person in the image is matched with each second feature data of each high-risk person in the high-risk person database to obtain a matching result. The matching result can be a result indicating whether the public person belongs to a high-risk person. If the feature data of the public person successfully matches the feature data of a high-risk person, it is determined that the public person belongs to a high-risk person. If the feature data of the public person fails to match the feature data of any high-risk person, it is determined that the public person does not belong to a high-risk person. Among them, the matching rules of the two feature data can be set as needed. When the epidemic is more serious and the epidemic risk screening is stricter, the matching degree can be set to a low value to determine that the two are successfully matched. On the contrary, when the epidemic risk screening is loose, the matching degree can be set to a higher value to determine that the two are successfully matched. Specifically, if the feature data is in vector form, the distance between the two vectors can be calculated, for example, the Euclidean distance. The larger the distance between the two, the lower the matching degree, and the smaller the distance, the higher the matching degree.

[0106] Step S213, counting the number of persons who are high-risk persons in the image according to the matching result, and using the number of persons as the analysis result of the high-risk person detection index.

[0107] After obtaining the matching results, the number of people in the image who are high-risk persons can be counted according to the matching results, and the number of people can be used as the analysis result of the indicator. The more people there are, the greater the risk level.

[0108] Furthermore, when a person who successfully matches a confirmed person is detected in the image, an alarm message can be directly output to the corresponding terminal of the epidemic prevention personnel, so that the epidemic prevention personnel can promptly re-examine the people in the monitoring area. If there are confirmed persons, they can be isolated in time to prevent the spread of the epidemic.

[0109] In this embodiment, by setting high-risk personnel detection indicators and analyzing images to detect whether there are high-risk personnel in the monitored area, high-risk personnel can be discovered in a timely and accurate manner, thereby facilitating epidemic prevention personnel to take timely response measures to avoid the spread of the epidemic.

[0110] Furthermore, after step S30, the method further includes:

[0111] Step S50, when it is detected that the risk level is greater than a first preset level, the first feature data of each member of the public in the image is added to the preset high-risk personnel database.

[0112] In this embodiment, after calculating the risk level of the area to be monitored, it can be detected whether the risk level is greater than the first preset level. When it is detected that the risk level is greater than the first preset level, the first feature data of each public person in the image is added to the high-risk personnel database. Among them, the first preset level can be set as needed, and the first preset level and the second preset level can be the same or different. When the risk level is greater than the first preset level, it means that the risk is very high, and the people appearing in the image have a great risk of infection, so these people are added as high-risk people to the high-risk personnel database, so that the high-risk personnel detection index can be accurately calculated based on the high-risk personnel database in the future.

[0113] Further, based on the above-mentioned first and / or second embodiments, a third embodiment of the epidemic risk monitoring method of the present invention is proposed. In this embodiment, step S20 includes:

[0114] Step S221, performing face detection on the image in the video data to obtain various face regions;

[0115] When the risk indicator includes the mask wearing detection indicator, face detection is performed on the image in the video data to obtain each face area. Specifically, the face detection method can be implemented using an existing commonly used target detection algorithm or model, that is, taking the face as the target, which will not be described in detail here.

[0116] Step S222, performing facial attribute recognition on the face region to obtain a recognition result indicating whether there is a mask in the face region;

[0117] After obtaining the face area, face attribute recognition is performed on each face area to obtain the recognition result corresponding to each face area, and the recognition result represents whether there is a mask in the corresponding face area. Among them, face attribute recognition can be implemented using a commonly used image classification model. Specifically, a binary image classification model is set, which is used to divide images into two categories: masks exist and masks do not exist; a large number of images with masks and images without masks can be collected in advance to train the image classification model, and the training method can adopt a supervised training method of a commonly used machine learning model; the trained model is used to classify the face area to obtain a classification result, which is the recognition result. Of course, face attribute recognition can also be implemented using other existing algorithms or models, which will not be described in detail here.

[0118] Step S223, determining a target face region where a mask is present from each face region according to the recognition result, and performing key point detection on the target face region to obtain a detection result indicating whether the target face region is wearing a mask correctly;

[0119] Based on the recognition results, it can be determined whether there is a mask in each face area, and the face area with a mask is used as the target face area. Key point detection is performed on each target face area to obtain a detection result that characterizes whether the target face area is wearing a mask correctly. Among them, key point detection can be implemented using existing commonly used image key point detection methods. Specifically, the nose and mouth of the face can be used as key points. If the nose and mouth are detected, it is determined that the mask is not worn correctly. If the nose and mouth are not detected, it is determined that the mask is worn correctly.

[0120] Step S224, counting the number of first persons who are not wearing masks and the number of second persons who are not wearing masks correctly in the image according to the recognition result and the detection result, and taking the sum of the first number of persons and the second number of persons as the analysis result of the mask wearing detection index.

[0121] One face area corresponds to one person. Based on the recognition results, it can be determined whether there is a mask in each face area. If there is no mask, it means that the person in the face area is not wearing a mask. Then, the number of people who are not wearing masks can be counted and recorded as the first number of people. Based on the detection results of key point detection, it can be determined whether each face area with a mask is wearing a mask correctly. Then, the number of people who are not wearing masks correctly can be counted and recorded as the second number of people. People who do not wear masks or wear masks incorrectly in public places have a certain risk of spreading germs and being infected. Therefore, the sum of the first number of people and the second number of people is used as the analysis result of the mask wearing detection index. The larger the value, the higher the risk.

[0122] In this embodiment, by setting the mask wearing detection index and analyzing the image to detect the number of people who are not wearing masks and those who are not wearing masks in the monitored area, the epidemic prevention awareness of people in the monitored area can be monitored. When a large number of people are not wearing masks and those who are not wearing masks, timely feedback can be given to the risk level, which can facilitate the epidemic prevention personnel to make timely response measures and avoid the spread of the epidemic.

[0123] Further, based on the above-mentioned first, second and / or third embodiments, a fourth embodiment of the epidemic risk monitoring method of the present invention is proposed. In this embodiment, step S20 includes:

[0124] Step S231, performing face detection on the image in the video data to obtain various face regions;

[0125] When the risk index includes the public gathering index, face detection is performed on the image in the video data to obtain each face area. Specifically, the face detection method can be implemented using an existing commonly used target detection algorithm or model, that is, taking the face as the target, which will not be described in detail here.

[0126] Step S232, counting the number of face areas to obtain the number of people in the image, and using the number of people and the area of ​​the monitored area to calculate the density of people, and using the density of people as the analysis result of the public gathering degree index.

[0127] One face area corresponds to one person, so the number of face areas can be counted, that is, the number of people in the image can be obtained, and the density of people can be obtained by dividing the number of people by the area of ​​the area to be monitored. The area of ​​the area to be monitored can be pre-set. For example, when the camera equipment is pre-installed, the area of ​​the actual area corresponding to the image taken by the camera equipment can be measured. The greater the density of people, the greater the possibility of pathogen transmission, and thus the higher the risk.

[0128] In this embodiment, by setting a public gathering degree index and analyzing images to detect the density of people in the monitored area, the epidemic prevention awareness of people in the monitored area can be monitored. When the density of people is large, timely feedback can be given to the risk level, which can facilitate epidemic prevention personnel to make timely response measures and avoid the spread of the epidemic.

[0129] Furthermore, in one embodiment, after step S231, the following steps are further included:

[0130] Step S60, calculating the distance between each pair of face regions;

[0131] Step S70: When it is detected that the number of face region pairs whose mutual distances are less than a preset distance is greater than a preset number, an alarm message is output.

[0132] After detecting the face regions in the image, the distance between each face region can be calculated. Specifically, the center point of the face region can be taken, the distance between the two points on the image can be calculated, and then the distance can be mapped to the actual distance. The correspondence between the length in the image and the length in the actual space is preset, for example, one centimeter on the image represents one meter in reality.

[0133] The two face regions are recorded as a face region pair. For each face region pair, it can be detected whether the distance between the two face regions in the face region pair is less than a preset distance. The preset distance is a pre-set risk distance. When the distance between the two people is less than the risk distance, it means that the possibility of spreading germs is very high. According to the detection results, the number of face region pairs whose distances are less than the preset distance can be counted, and whether the number is greater than the preset number can be detected. Among them, the preset number is set in advance according to the needs. When the number is exceeded, it means that many members of the public appearing in the image do not maintain a safe distance, and the risk is extremely high. When it is detected that the number is greater than the preset number, an alarm message can be output. Specifically, the alarm message can be output to the broadcasting equipment in the monitored area so that the broadcasting equipment can broadcast an alarm voice or an alarm ringtone. The alarm voice can be a reminder to keep a distance. When the number is less than the preset number, no processing is required.

[0134] In this embodiment, by calculating the distance of the face area in the image, and outputting an alarm message when the number of face area pairs whose distances are less than the preset distance is greater than the preset number, the public in the monitored area can be supervised in a timely and effective manner to ensure that the public maintains a safe distance and avoids the spread of the epidemic. Compared with the manual monitoring method, it is more efficient and has better effects.

[0135] It should be further explained that, in one embodiment, the risk indicators may simultaneously include high-risk personnel detection indicators, mask wearing detection indicators and public gathering degree indicators. Then, the operations required to analyze each indicator can be performed only once, such as face detection operations on images.

[0136] In addition, the present invention also provides an epidemic risk monitoring device, referring to Figure 3 , the device comprises:

[0137] An acquisition module 10 is used to acquire video data collected by shooting the area to be monitored;

[0138] An analysis module 20, configured to perform risk index analysis on the images in the video data, wherein the risk index includes at least one or more of a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index;

[0139] The calculation module 30 is used to calculate the risk level of the area to be monitored according to the analysis results of each risk indicator.

[0140] Further, when the risk indicator includes the high-risk personnel detection indicator, the analysis module 20 includes:

[0141] A feature extraction unit, configured to extract public features from the image in the video data to obtain first feature data corresponding to each public person in the image;

[0142] A matching unit, configured to match the first feature data with second feature data of high-risk personnel in a preset high-risk personnel database to obtain a matching result;

[0143] The first statistical unit counts the number of persons who are high-risk persons in the image according to the matching result, and uses the number of persons as an analysis result of the high-risk person detection index.

[0144] Furthermore, the device also includes:

[0145] The adding module is used to add the first characteristic data of each public person in the image to the preset high-risk person database when it is detected that the risk level is greater than a first preset level.

[0146] Further, when the risk indicator includes the mask wearing detection indicator, the analysis module 20 includes:

[0147] A first detection unit, configured to perform face detection on the image in the video data to obtain various face regions;

[0148] An identification unit, configured to perform facial attribute identification on the face region to obtain an identification result indicating whether a mask is present in the face region;

[0149] A second detection unit is used to determine a target face area where a mask is present from each face area according to the recognition result, and perform key point detection on the target face area to obtain a detection result indicating whether the target face area is correctly wearing a mask;

[0150] The second statistical unit is used to count the number of first persons who are not wearing masks and the number of second persons who are not wearing masks correctly in the image according to the recognition result and the detection result, and take the sum of the first number of persons and the second number of persons as the analysis result of the mask wearing detection index.

[0151] Further, when the risk indicator includes the public gathering degree indicator, the analysis module 20 includes:

[0152] A third detection unit, configured to perform face detection on the image in the video data to obtain various face regions;

[0153] The third statistical unit is used to count the number of face areas to obtain the number of people in the image, and calculate the population density using the number of people and the area of ​​the monitored area, and use the population density as the analysis result of the public gathering degree index.

[0154] Furthermore, the device also includes:

[0155] A calculation module, used for calculating the distance between each of the face regions;

[0156] The first output module is used to output an alarm message when it is detected that the number of face region pairs whose distances to each other are less than a preset distance is greater than a preset number.

[0157] Furthermore, the acquisition module 10 is also used to receive video data sent in real time by a camera device, wherein the camera device captures the area to be monitored to collect the video data;

[0158] The analysis module 20 is also used to perform risk index analysis on each frame of the video data in real time;

[0159] The device also includes:

[0160] The second output module is used to output alarm information when it is detected that the risk level of the monitored area is greater than a second preset level.

[0161] The expanded contents of the specific implementation methods of the epidemic risk monitoring device of the present invention are basically the same as those of the above-mentioned embodiments of the epidemic risk monitoring method, and will not be elaborated here.

[0162] In addition, an embodiment of the present invention also proposes a computer-readable storage medium, on which an epidemic risk monitoring program is stored. When the epidemic risk monitoring program is executed by a processor, the steps of the epidemic risk monitoring method described below are implemented.

[0163] The present invention also proposes a computer program product, including a computer program, which implements the steps of the epidemic risk monitoring method as described above when executed by a processor.

[0164] The various embodiments of the epidemic risk monitoring device, computer-readable storage medium, and computer program product of the present invention can all refer to the various embodiments of the epidemic risk monitoring method of the present invention, and will not be repeated here.

[0165] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0166] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0168] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for monitoring epidemic risk, characterized in that: The method comprises the following steps: Obtaining video data collected by shooting the area to be monitored; Performing risk index analysis on the images in the video data, wherein the risk index includes a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index; Calculating the risk level of the area to be monitored based on the analysis results of each of the risk indicators; Wherein, the step of performing risk indicator analysis on the image in the video data includes: Using the number of high-risk persons in the image as an analysis result of the high-risk person detection index; Using the number of people who are not wearing masks in the image as the analysis result of the mask wearing detection index; Using the density of people in the image as the analysis result of the public gathering degree index; Wherein, the step of calculating the risk level of the area to be monitored according to the analysis results of each of the risk indicators comprises: Substituting the analysis results of each of the risk indicators into a preset linear model for risk level assessment to obtain a risk level, wherein the linear model includes a weight corresponding to each of the risk indicators; The step of performing risk index analysis on the images in the video data includes: Extracting public features from the image in the video data to obtain first feature data corresponding to each public person in the image; Matching the first characteristic data with the second characteristic data of high-risk personnel in a preset high-risk personnel database to obtain a matching result; The number of persons who are high-risk persons in the image is counted according to the matching result, and the number of persons is used as an analysis result of a high-risk person detection index.

2. The epidemic risk monitoring method according to claim 1, characterized in that: After the step of calculating the risk level of the area to be monitored according to the analysis results of each of the risk indicators, the method further includes: When it is detected that the risk level is greater than a first preset level, the first feature data of each member of the public in the image is added to the preset high-risk personnel database.

3. The epidemic risk monitoring method according to claim 1, characterized in that: When the risk indicator includes the mask wearing detection indicator, the step of performing risk indicator analysis on the image in the video data includes: Performing face detection on the image in the video data to obtain various face regions; Performing facial attribute recognition on the face area to obtain a recognition result indicating whether there is a mask in the face area; Determine a target face region where a mask is present from each face region according to the recognition result, and perform key point detection on the target face region to obtain a detection result indicating whether the target face region is wearing a mask correctly; The number of first persons who are not wearing masks and the number of second persons who are not wearing masks correctly in the image are counted according to the recognition result and the detection result, and the sum of the first number of persons and the second number of persons is used as the analysis result of the mask wearing detection index.

4. The epidemic risk monitoring method according to claim 1, characterized in that: When the risk index includes the public gathering degree index, the step of performing risk index analysis on the image in the video data includes: Performing face detection on the image in the video data to obtain various face regions; The number of face areas is counted to obtain the number of people in the image, and the population density is calculated using the number of people and the area of ​​the area to be monitored, and the population density is used as the analysis result of the public gathering degree index.

5. The epidemic risk monitoring method according to claim 4, characterized in that: After the step of performing face detection on the image in the video data to obtain each face area, the method further includes: Calculating the distance between each pair of face regions; When it is detected that the number of face region pairs whose mutual distances are less than a preset distance is greater than a preset number, an alarm message is output.

6. The epidemic risk monitoring method according to any one of claims 1 to 5, characterized in that: The step of obtaining the video data collected by shooting the area to be monitored includes: Receiving video data sent in real time by a camera device, wherein the camera device captures the area to be monitored to collect the video data; The step of performing risk index analysis on the image in the video data comprises: Performing risk index analysis on each frame of the video data in real time; After the step of calculating the risk level of the area to be monitored according to the analysis results of each of the risk indicators, the method further includes: When it is detected that the risk level of the area to be monitored is greater than a second preset level, an alarm message is output.

7. An epidemic risk monitoring device, characterized in that: The device comprises: An acquisition module is used to acquire video data collected by shooting the area to be monitored; An analysis module, configured to perform risk index analysis on the images in the video data, wherein the risk index includes a high-risk personnel detection index, a mask wearing detection index, and a public gathering degree index; A calculation module, used for calculating the risk level of the area to be monitored according to the analysis results of each risk indicator; Wherein, the device is also used for: Using the number of high-risk persons in the image as an analysis result of the high-risk person detection index; Using the number of people who are not wearing masks in the image as the analysis result of the mask wearing detection index; Using the density of people in the image as the analysis result of the public gathering degree index; Wherein, the device is also used for: Substituting the analysis results of each of the risk indicators into a preset linear model for risk level assessment to obtain a risk level, wherein the linear model includes a weight corresponding to each of the risk indicators; Wherein, the analysis module includes: A feature extraction unit, configured to extract public features from the image in the video data to obtain first feature data corresponding to each public person in the image; A matching unit, configured to match the first feature data with second feature data of high-risk personnel in a preset high-risk personnel database to obtain a matching result; The first statistical unit counts the number of persons who are high-risk persons in the image according to the matching result, and uses the number of persons as an analysis result of a high-risk person detection indicator.

8. An epidemic risk monitoring device, characterized in that: The epidemic risk monitoring device includes: a memory, a processor, and an epidemic risk monitoring program stored in the memory and executable on the processor. When the epidemic risk monitoring program is executed by the processor, the steps of the epidemic risk monitoring method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an epidemic risk monitoring program, and when the epidemic risk monitoring program is executed by the processor, the steps of the epidemic risk monitoring method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the epidemic risk monitoring method as described in any one of claims 1 to 6 are implemented.