Employee image detection method, device, computer equipment and storage medium

By detecting pedestrians, heads and faces on employee images, combined with image coordinate screening and neural network detection, the problem of target detection algorithm failure in the existing technology is solved, and the accuracy and efficiency of employee image detection are improved.

CN112861576BActive Publication Date: 2024-09-27SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911181582.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-27
Publication Date
2024-09-27
Estimated Expiration
2039-11-27

AI Technical Summary

Technical Problem

The existing target detection algorithm fails due to the failure of the non-maximum suppression method in employee image detection, resulting in reduced detection accuracy, and manual inspection is time-consuming, labor-intensive and ineffective.

Method used

By performing pedestrian detection, head detection and face detection on images of employees to be detected, a single frontal pedestrian area is obtained by combining image coordinate screening, and a preset neural network is used to detect work badges and work uniforms to ensure that the target object is unique and clear.

Benefits of technology

It improves the accuracy of employee image detection, reduces the time and cost of manual inspection, and enhances the detection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112861576B
    Figure CN112861576B
Patent Text Reader

Abstract

The present application relates to an employee image detection method, device, computer equipment and storage medium. The method comprises: performing pedestrian detection, head detection and face detection on the employee image to be detected, respectively, to obtain the pedestrian area, head area and face key points; based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the face key points, the pedestrian area is screened to obtain a single front pedestrian area; using a preset neural network to perform work badge detection and work uniform detection on the single front pedestrian area to obtain the detection result. The use of this method can improve the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an employee image detection method, device, computer equipment and storage medium. Background Art

[0002] With the standardization of corporate management, in order to enhance the corporate image and meet administrative management needs, some companies require employees to wear uniforms and ID cards. In order to prevent employees from violating regulations by not wearing ID cards or uniforms, administrative personnel will also regularly check the image of employees. However, manual inspections are not only time-consuming and labor-intensive, but also ineffective. With the development of computer vision, most companies have begun to use target detection algorithms to detect violations of employees' uniforms and ID cards.

[0003] However, existing target detection algorithms usually select effective targets for identification through non-maximum suppression, while employees usually work in the same office area, which is likely to cause the non-maximum suppression method to fail, thereby reducing the accuracy of detection. Summary of the invention

[0004] Based on this, it is necessary to provide an employee image detection method, device, computer equipment and storage medium that can improve the accuracy in order to solve the above technical problems.

[0005] A method for detecting an employee's image, the method comprising:

[0006] Perform pedestrian detection, head detection and face detection on the employee images to be detected, and obtain pedestrian area, head area and face key points;

[0007] Based on the image coordinates of the pedestrian area, the image coordinates of the head area, and the image coordinates of the key points of the face, the pedestrian area is screened to obtain a single frontal pedestrian area;

[0008] The preset neural network is used to perform work badge detection and work uniform detection on the single front pedestrian area to obtain an image detection result.

[0009] In one embodiment, the filtering of the pedestrian region based on the image coordinates of the pedestrian region, the image coordinates of the head region, and the image coordinates of the key points of the face to obtain a single frontal pedestrian region includes:

[0010] Compare the image coordinates of the pedestrian area with the image coordinates of the head area to determine a single pedestrian area including the single head area;

[0011] The single pedestrian region is screened according to the image coordinates of the facial key points to obtain a single frontal pedestrian region including the frontal face.

[0012] In one embodiment, after comparing the image coordinates of the pedestrian region with the image coordinates of the head region to determine a single pedestrian region including the single head region, the method further includes:

[0013] Determine the longitudinal distance of the first pedestrian according to the image coordinates of the single pedestrian area, and determine the longitudinal distance of the head according to the image coordinates of the head area corresponding to the single pedestrian area;

[0014] A single pedestrian region that meets image detection requirements is determined according to a longitudinal ratio of the first pedestrian longitudinal distance to the longitudinal distance of the head.

[0015] In one embodiment, the filtering of the single pedestrian region according to the image coordinates of the facial key points to obtain a single frontal pedestrian region including a frontal face includes:

[0016] Determine the frontal face key points of the face according to the positional relationship of the image coordinates of each key point in the face key points;

[0017] The image coordinates of the single pedestrian area are compared with the image coordinates of the frontal face key points to determine a single frontal pedestrian area including the frontal face.

[0018] In one embodiment, after the pedestrian region is screened based on the image coordinates of the pedestrian region, the image coordinates of the head region, and the image coordinates of the key points of the face to obtain a single frontal pedestrian region, the method further includes:

[0019] Determine the longitudinal distance of the second pedestrian according to the image coordinates of the single front pedestrian area, and determine the longitudinal distance of the face according to the facial key points corresponding to the single front pedestrian area;

[0020] A single pedestrian face region satisfying image detection requirements is determined according to a longitudinal ratio of the second pedestrian longitudinal distance to the face longitudinal distance.

[0021] In one embodiment, after the single front pedestrian area is subjected to work badge detection and work uniform detection using a preset neural network to obtain an image detection result, the method further includes:

[0022] Determine a single frontal pedestrian region whose image does not meet the requirements according to the image detection result;

[0023] Perform face recognition on the single front pedestrian area whose image does not meet the requirements to obtain employee information of the violating employees.

[0024] In one embodiment, the step of performing pedestrian detection, head detection and face detection on the employee image to be detected respectively, and obtaining pedestrian regions, head regions and face key points, further comprises:

[0025] Receive the video stream sent by the monitoring device;

[0026] The video stream is decoded and repeated frames are removed to obtain an image of the employee to be detected.

[0027] A device for detecting employee image, comprising:

[0028] The target detection module is used to perform pedestrian detection, head detection and face detection on the employee images to be detected, and obtain the pedestrian area, head area and face key points;

[0029] A screening module, used for screening the pedestrian region based on the image coordinates of the pedestrian region, the image coordinates of the head region and the image coordinates of the key points of the face, to obtain a single frontal pedestrian region;

[0030] The image detection module is used to use a preset neural network to perform work badge detection and work uniform detection on the single front pedestrian area to obtain a detection result.

[0031] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of any one of the above-mentioned employee image detection methods when executing the computer program.

[0032] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of any one of the above-mentioned employee image detection methods are implemented.

[0033] The employee image detection method, device, computer equipment and storage medium described above, before image detection, combines face detection and head detection, and simultaneously performs pedestrian detection, head detection and face detection on the employee image to be detected, respectively, to obtain pedestrian area, head area and face key points. Then, based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the face key points, the pedestrian area is screened to obtain a single frontal pedestrian area for image detection, ensuring that the target object entering the image detection is unique and clear, thereby improving the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A diagram showing an application environment of an employee image detection method in one embodiment;

[0035] Figure 2 is a flow chart of an employee image detection method in one embodiment;

[0036] Figure 3 A schematic diagram of a flow chart of the step of selecting a single pedestrian region that meets the image detection requirement from a single pedestrian region in one embodiment;

[0037] Figure 4 is a flow chart of an employee image detection method in another embodiment;

[0038] Figure 5 is a structural block diagram of an employee image detection device in one embodiment;

[0039] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0041] The employee image detection method provided in this application can be applied to Figure 1 In the application environment shown. The application environment involves a monitoring device 102, a terminal 104 and a server 106. Among them, the monitoring device 102, the terminal 104 and the server 106 communicate with each other through a network. The monitoring device 102 is used to collect a video stream to be detected and send it to the terminal 104 or the server 106. It can be that after the terminal 104 or the server 106 receives the video stream sent by the monitoring device 102, the terminal 104 or the server 106 decodes the video stream to obtain the image of the employee to be detected, and implements the above-mentioned employee image detection method based on the employee to be detected. It can also be that after the terminal 104 receives the video stream sent by the monitoring device 102, the terminal 104 sends the received video stream to the server 106, and the server 106 implements the above-mentioned employee image detection method.

[0042] The employee image detection method is specifically described by taking server 106 as an example. Specifically, server 106 performs pedestrian detection, head detection and face detection on the employee image to be detected, and obtains pedestrian area, head area and face key points; server 106 screens the pedestrian area based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the face key points to obtain a single front pedestrian area; server 106 uses a preset neural network to perform work badge detection and work uniform detection on the single front pedestrian area to obtain an image detection result. Among them, the terminal can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server can be implemented as an independent server or a server cluster composed of multiple servers. Monitoring device 102 can be but not limited to a camera, a camera and a device with an image acquisition function.

[0043] In one embodiment, Figure 2 As shown, a method for detecting employee images is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0044] Step S202 , performing pedestrian detection, head detection and face detection on the employee image to be detected, and obtaining pedestrian regions, head regions and face key points.

[0045] The employee image to be detected is the image that needs to be detected for the employee image at present. It can be an image uploaded by a user of the area where the employee is located, or it can be an image obtained by decoding a video stream sent by a monitoring device set in the area where the employee is located. The video stream can be decoded by calling any data stream analysis toolkit to obtain the corresponding image, for example, calling the decoding tool DeepStream to decode the image.

[0046] Pedestrian detection is a technology that uses computer vision technology to determine whether there are pedestrians in an image or video sequence and give precise positioning. In this embodiment, pedestrian detection is used to determine whether there are employees in the employee image to be detected and give the precise positioning of the employees. Head detection is the use of computer vision technology to detect the number of heads in an image, which is often used for head counting. Face detection refers to the technology of using a certain strategy to search a given image to determine whether there is a face in it. The face key point is the result obtained by face detection, which is the location of the key area obtained by face detection. Therefore, the face detection of this embodiment can also be called face key point detection, and the obtained face key points include five points: eyes, nose and corners of mouth. The pedestrian area is the image area that includes employees in the image, and the head area is the image area that includes heads in the image.

[0047] Specifically, after the server obtains the employee image to be detected, the first neural network for pedestrian detection, the second neural network for head detection, and the third neural network for face detection, which are pre-trained, are called respectively. Then, the server inputs the employee image to be detected into the first neural network, and the first neural network performs pedestrian detection on the employee image to be detected, and obtains the image area including pedestrians in the image to be detected. At the same time, the employee image to be detected is input into the second neural network and the third neural network respectively, and the second neural network performs head detection on the employee image to be detected, and obtains the image area including the head in the image to be detected. The third neural network performs face detection on the employee image to be detected, and obtains the key points of the face included in the image to be detected. Among them, the first neural network, the second neural network, and the third neural network are all algorithmic mathematical models that imitate the behavioral characteristics of animal neural networks and perform distributed parallel information processing. The first neural network can be a model of any existing target detection algorithm, including but not limited to non-maximum suppression algorithm, SSD (Single Shot MultiBox Detector, single box detection network), etc. The second neural network can be a FCHD (A fast and accurate head detector, fast and accurate head detection) model. The third neural network can be a Mtcnn (Multi-task convolutional neuralnetwork, multi-task convolutional detection network) model.

[0048] Step S204, based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the key points of the face, the pedestrian area is screened to obtain a single frontal pedestrian area.

[0049] Among them, image coordinates refer to the coordinates on the image to be detected. Since the neural network will output the coordinate position of the detected area on the image at the same time when outputting the detection results. Therefore, in this embodiment, the pedestrian area, head area and face key points obtained by the first neural network, the second neural network and the third neural network respectively have corresponding image coordinates. For example, after the FCHD network detects the employee image to be detected, the output detection result includes the coordinate position of the head area {(X0, Y0), (X1, Y1)}, (X0, Y0) is the upper left coordinate of the head area, and (X1, Y1) is the lower right coordinate of the head area. The area frame including the head area can be obtained at the same time through the upper left coordinate and the lower right coordinate.

[0050] In one embodiment, based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the facial key points, the pedestrian area is screened to obtain a single frontal pedestrian area, which specifically includes: comparing the image coordinates of the pedestrian area with the image coordinates of the head area to determine a single pedestrian area including a single head area; screening the single pedestrian area according to the image coordinates of the facial key points to obtain a single frontal pedestrian area including a frontal face.

[0051] Specifically, when obtaining a single frontal pedestrian area, the image coordinates of the head area are compared with the image coordinates of the pedestrian area to determine whether the head area is included in the pedestrian area. When it is determined based on the image coordinates that the head area is included in the pedestrian area, it means that the pedestrian area does include a head, and the pedestrian area is retained. For example, the image coordinates of the head area are {(2, 0), (0, 2)} and {(2, 6), (6, 2)}, and the image coordinates of the pedestrian area are {(4, 0), (0, 4)}. The server can determine by comparison that the head area with image coordinates {(2, 0), (0, 2)} is included in the pedestrian area with image coordinates {(4, 0), (0, 4)}. After obtaining the pedestrian area including the head, the pedestrian area including two or more head areas is removed, and the area finally retained is a single pedestrian area that only includes a single employee.

[0052] Then, a single pedestrian region including a face and facing the front is screened according to the image coordinates of the facial key points to obtain a single front pedestrian region. In one embodiment, screening a single pedestrian region according to the image coordinates of the facial key points to obtain a single front pedestrian region including a front face specifically includes: determining the front face key points of the face facing the front according to the positional relationship of the image coordinates of each key point in the facial key points; and comparing the image coordinates of the single pedestrian region with the image coordinates of the front face key points to determine a single front pedestrian region including a front face.

[0053] Specifically, the server first determines whether the nose is located between the eyes and the corners of the mouth according to the image coordinates of the eyes, the image coordinates of the nose and the image coordinates of the corners of the mouth in the face key points. When the server compares the five key points and determines that the image coordinates of the nose are simultaneously between the image coordinates of the right eye and the image coordinates of the left eye, between the image coordinates of the left corner of the mouth and the image coordinates of the right corner of the mouth, and between the image coordinates of the eyes and the image coordinates of the corners of the mouth, it means that the nose is located between the eyes and the corners of the mouth, and the face corresponding to the five key points is determined to be frontal. All face key points with frontal faces are retained to obtain frontal face key points. Then, the server again compares the image coordinates of the obtained frontal face key points with the image coordinates of the single pedestrian area. When the image coordinates of any single pedestrian area include a frontal face key point within the range included, it means that there is a face in the single pedestrian area and the face is frontal, and the single pedestrian area is retained to obtain a single frontal pedestrian area. In this embodiment, the pedestrian area is screened by the results of head detection and face detection to obtain a single frontal pedestrian area, ensuring that the image area of ​​the subsequent image detection has and only has one employee, thereby improving the accuracy of detection.

[0054] Step S206, using a preset neural network to perform work badge detection and work uniform detection on a single front pedestrian area to obtain an image detection result.

[0055] Among them, the neural networks used for work badge detection and work uniform detection are the fourth neural network and the fifth neural network, and the fourth neural network and the fifth neural network are also pre-trained neural networks. In this embodiment, the fourth neural network for work badge detection can be a YOLO (You Only Look Once: Unified, Real-Time Object Detection, a single neural network target detection system) network, including but not limited to YOLOv1, YOLOv3, etc. The fifth neural network for work uniform detection can be a mobileNets network, which is a lightweight deep neural network.

[0056] Specifically, when the server obtains a single frontal pedestrian area through screening, the single frontal pedestrian area can be intercepted from the employee image to be detected by calling the image tool of OpenCV. Then, the fourth neural network and the fifth neural network are called to output the intercepted single frontal pedestrian area to the fourth neural network and the fifth neural network respectively for work badge detection and work uniform detection, and the work badge detection results and the work uniform detection results are obtained. The work badge detection results and the work uniform detection results are collectively referred to as image detection results. Through the work badge detection results and the work uniform detection results, it can be determined whether the employees in the single frontal pedestrian area meet the regulations on carrying work badges and wearing work uniforms.

[0057] The employee image detection method combines face detection and head detection before image detection, and simultaneously performs pedestrian detection, head detection and face detection on the employee image to be detected, respectively, to obtain pedestrian areas, head areas and face key points. Then, based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the face key points, the pedestrian area is screened to obtain a single frontal pedestrian area for image detection, ensuring that the target object entering the image detection is unique and clear, thereby improving the accuracy of detection.

[0058] In one embodiment, Figure 3 As shown, after comparing the image coordinates of the pedestrian region with the image coordinates of the head region to determine a single pedestrian region including a single head region, it also includes selecting a single pedestrian region that meets the image detection requirements from the single pedestrian region, specifically including the following steps:

[0059] S302, determining a first pedestrian longitudinal distance according to image coordinates of a single pedestrian region, and determining a head longitudinal distance according to image coordinates of a head region corresponding to the single pedestrian region.

[0060] The first pedestrian longitudinal distance is the longitudinal distance of a single pedestrian region, and the head longitudinal distance is the longitudinal distance of a head region included in the single pedestrian region. In this embodiment, the longitudinal distance can be understood as the length of the image region, such as the length of a single pedestrian region and the length of a head region.

[0061] Specifically, when the single pedestrian area and the head area included therein are detected by the server using a neural network, the corresponding image coordinates are output. According to the image coordinates of the single pedestrian area and the image coordinates of the head area included therein, the longitudinal distance of the first pedestrian and the longitudinal distance of the head can be obtained. When the corresponding image coordinates only have the upper left coordinate and the lower right coordinate, the area frame including the area is obtained according to the upper left coordinate and the lower right coordinate, and the length of the area frame is the longitudinal distance. For example, the corresponding single pedestrian area frame is obtained according to the upper left coordinate and the lower right coordinate of the single pedestrian area, and the length of the frame is obtained as the longitudinal distance of the first pedestrian. When the corresponding image coordinates include four coordinates (upper left, upper right, lower left and lower right), two coordinates with the same X coordinate are obtained, such as the upper left and lower left, upper right and lower right. The absolute value of the difference between the Y coordinates of these two coordinates is the obtained longitudinal distance.

[0062] S304: Determine a single pedestrian region that meets image detection requirements according to a longitudinal ratio of the first pedestrian longitudinal distance to the longitudinal distance of the head.

[0063] Among them, the longitudinal ratio is the ratio between two longitudinal distances. Specifically, after obtaining the longitudinal distance of the first pedestrian and the longitudinal distance of the head, the ratio of the two longitudinal distances is obtained to obtain the longitudinal ratio. The obtained longitudinal ratio is compared with the threshold longitudinal ratio. When the longitudinal ratio is greater than the threshold longitudinal ratio, it is determined that the single pedestrian area meets the image detection requirements. The threshold longitudinal ratio is a pre-set longitudinal ratio, for example, the threshold longitudinal ratio is set to 0.5. When the longitudinal ratio is greater than or equal to 0.5, it is determined that it meets the image detection requirements. Then, the single pedestrian area that meets the image detection requirements can be further screened by the key points of the face to obtain a single frontal pedestrian area. In this embodiment, since the image detection is performed on the employee's work badge and work clothes, the employees in the obtained area should include enough body pictures. Therefore, the area with enough body parts is selected by the longitudinal ratio to prevent the image detection from failing due to only a small part of the body picture appearing in the area, thereby improving the success rate of the detection.

[0064] In one embodiment, Figure 4 As shown, another employee image detection method is provided. In step S204, based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the facial key points, the pedestrian area is screened to obtain a single front pedestrian area, and the method further includes step S205, selecting a single front pedestrian area that meets the image detection requirements from the single front pedestrian area, specifically including: determining the second pedestrian longitudinal distance according to the image coordinates of the single front pedestrian area, and determining the face longitudinal distance according to the facial key points corresponding to the single front pedestrian area; determining the single face pedestrian area that meets the image detection requirements according to the longitudinal ratio of the second pedestrian longitudinal distance to the face longitudinal distance.

[0065] The second pedestrian longitudinal distance is the longitudinal distance of a single frontal pedestrian area, and the face longitudinal distance is the longitudinal distance of the faces included in the single pedestrian area.

[0066] Specifically, the longitudinal distance of the second pedestrian can be obtained according to the image coordinates of the single frontal pedestrian area. When the neural network performs face detection to obtain the key points of the face, it also outputs the face contour. Therefore, the longitudinal distance of the face corresponding to the key points of the face is the length of the corresponding face contour. The method of obtaining the longitudinal distance of the second pedestrian and the longitudinal distance of the face according to the image coordinates is the same as the method of obtaining the longitudinal distance of the first pedestrian and the longitudinal distance of the head, which will not be repeated here.

[0067] After obtaining the longitudinal distance of the second pedestrian and the longitudinal distance of the head, the ratio of the two longitudinal distances is also obtained to obtain the longitudinal ratio. The obtained longitudinal ratio is compared with the threshold longitudinal ratio. When the longitudinal ratio is greater than the threshold longitudinal ratio, it is determined that the single front pedestrian area meets the image detection requirements. In this embodiment, since the image detection is performed on the employee's work badge and work clothes, the employees in the obtained area should include enough body images. Therefore, the longitudinal ratio is used to select an area with enough body parts to prevent the image detection from failing due to only a small part of the body image appearing in the area, thereby improving the success rate of the detection.

[0068] In one embodiment, after obtaining the image detection result, the method further includes: determining a single frontal pedestrian area whose image does not meet the requirements according to the image detection result; performing face recognition on the single frontal pedestrian area whose image does not meet the requirements to obtain employee information of the violating employee.

[0069] Specifically, when the work badge detection result in the image detection result is that the work badge is not worn, or the work uniform detection result is that the work uniform is not worn, or both the work badge and the work uniform are not worn, then the single front pedestrian area corresponding to the image detection result is obtained. For example, when the work badge detection result is that the work badge is not worn, the single front pedestrian area corresponding to the detection result of not wearing the work badge is obtained. Then the obtained single front pedestrian area is input into the face recognition model for face recognition to obtain the employee information of the violating employee. Employee information includes but is not limited to name, gender, part, position, etc. Finally, obtain the contact information of the relevant staff, such as the email address of the administrative staff. According to the contact information, the single front pedestrian area and the corresponding employee information are packaged and sent to the corresponding staff. In this embodiment, after the illegal employee is detected, the employee's information is obtained through face recognition and recorded and reported, and evidence is retained for subsequent management.

[0070] In one embodiment, obtaining the image of the employee to be detected includes: receiving a video stream sent by a monitoring device; decoding the video stream and removing duplicate frames to obtain the image of the employee to be detected.

[0071] Specifically, when receiving the video sent by the monitoring device, after decoding the received video stream using a decoding tool to obtain the image corresponding to the video stream, the repeated frames are determined by calculating the similarity between two adjacent images. Then the determined repeated frames are removed, and the retained images are the images of the employees to be detected. In this embodiment, repeated processing by the server is reduced by removing the repeated frames, thereby saving resources and speeding up the detection speed.

[0072] It should be understood that although Figure 2-4The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0073] In one embodiment, Figure 5 As shown, a device for detecting employee image is provided, including: a target detection module 502, a screening module 504 and an image detection module 506, wherein:

[0074] The target detection module 502 is used to perform pedestrian detection, head detection and face detection on the employee image to be detected, and obtain pedestrian areas, head areas and face key points.

[0075] The screening module 504 is used to screen the pedestrian region based on the image coordinates of the pedestrian region, the image coordinates of the head region and the image coordinates of the key points of the face to obtain a single frontal pedestrian region.

[0076] The image detection module 506 is used to use a preset neural network to perform work badge detection and work uniform detection on a single front pedestrian area to obtain a detection result.

[0077] In one embodiment, the target detection module 502 is also used to compare the image coordinates of the pedestrian area with the image coordinates of the head area to determine a single pedestrian area including a single head area; and to filter the single pedestrian area according to the image coordinates of the facial key points to obtain a single frontal pedestrian area including a frontal face.

[0078] In one embodiment, the target detection module 502 is also used to determine the frontal face key points indicating that the face is frontal based on the positional relationship of the image coordinates of each key point in the face key points; compare the image coordinates of the single pedestrian area with the image coordinates of the frontal face key points to determine a single frontal pedestrian area including the frontal face.

[0079] In one embodiment, the target detection module 502 is also used to determine the longitudinal distance of the first pedestrian based on the image coordinates of the single pedestrian area, and to determine the longitudinal distance of the head based on the image coordinates of the head area corresponding to the single pedestrian area; and to determine the single pedestrian area that meets the image detection requirements based on the longitudinal ratio of the first pedestrian longitudinal distance and the longitudinal distance of the head.

[0080] In one embodiment, the target detection module 502 is also used to determine the longitudinal distance of the second pedestrian based on the image coordinates of the single frontal pedestrian area, and to determine the longitudinal distance of the face based on the facial key points corresponding to the single frontal pedestrian area; based on the longitudinal ratio of the second pedestrian longitudinal distance and the longitudinal distance of the face, determine the single frontal pedestrian area that meets the image detection requirements.

[0081] In one embodiment, the employee image detection device also includes a face recognition module, which is used to determine a single front pedestrian area whose image does not meet the requirements based on the image detection results; perform face recognition on the single front pedestrian area whose image does not meet the requirements to obtain employee information of the violating employee.

[0082] In one embodiment, the employee image detection device further includes an acquisition module, which is used to receive a video stream sent by a monitoring device; decode the video stream and remove duplicate frames to obtain an image of the employee to be detected.

[0083] The specific definition of the employee image detection device can be found in the definition of the employee image detection method above, which will not be repeated here. Each module in the above employee image detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0084] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store model data such as neural networks. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting an employee image is implemented.

[0085] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0086] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0087] Perform pedestrian detection, head detection and face detection on the employee images to be detected, and obtain pedestrian area, head area and face key points;

[0088] Based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the key points of the face, the pedestrian area is screened to obtain a single frontal pedestrian area;

[0089] The preset neural network is used to perform work badge detection and work uniform detection on a single front pedestrian area to obtain the detection results.

[0090] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0091] The image coordinates of the pedestrian area are compared with the image coordinates of the head area to determine a single pedestrian area including a single head area; the single pedestrian area is screened according to the image coordinates of the facial key points to obtain a single frontal pedestrian area including the frontal face.

[0092] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0093] According to the positional relationship of the image coordinates of each key point in the face key points, the frontal face key points indicating that the face is frontal are determined; the image coordinates of the single pedestrian area are compared with the image coordinates of the frontal face key points to determine a single frontal pedestrian area including the frontal face.

[0094] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0095] The longitudinal distance of the first pedestrian is determined according to the image coordinates of the single pedestrian area, and the longitudinal distance of the head is determined according to the image coordinates of the head area corresponding to the single pedestrian area; the single pedestrian area that meets the image detection requirements is determined according to the longitudinal ratio of the first pedestrian longitudinal distance and the head longitudinal distance.

[0096] The longitudinal distance of the second pedestrian is determined according to the image coordinates of the single frontal pedestrian area, and the longitudinal distance of the face is determined according to the facial key points corresponding to the single frontal pedestrian area; based on the longitudinal ratio of the second pedestrian longitudinal distance and the longitudinal distance of the face, the single frontal pedestrian area that meets the image detection requirements is determined.

[0097] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0098] A single frontal pedestrian area whose image does not meet the requirements is determined based on the image detection result; face recognition is performed on the single frontal pedestrian area whose image does not meet the requirements to obtain employee information of the violating employees.

[0099] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0100] Receive the video stream sent by the monitoring device; decode the video stream and remove duplicate frames to obtain the image of the employee to be detected.

[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0102] Perform pedestrian detection, head detection and face detection on the employee images to be detected, and obtain pedestrian area, head area and face key points;

[0103] Based on the image coordinates of the pedestrian area, the image coordinates of the head area and the image coordinates of the key points of the face, the pedestrian area is screened to obtain a single frontal pedestrian area;

[0104] The preset neural network is used to perform work badge detection and work uniform detection on a single front pedestrian area to obtain the detection results.

[0105] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0106] The image coordinates of the pedestrian area are compared with the image coordinates of the head area to determine a single pedestrian area including a single head area; the single pedestrian area is screened according to the image coordinates of the facial key points to obtain a single frontal pedestrian area including the frontal face.

[0107] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0108] According to the positional relationship of the image coordinates of each key point in the face key points, the frontal face key points indicating that the face is frontal are determined; the image coordinates of the single pedestrian area are compared with the image coordinates of the frontal face key points to determine a single frontal pedestrian area including the frontal face.

[0109] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0110] The longitudinal distance of the first pedestrian is determined according to the image coordinates of the single pedestrian area, and the longitudinal distance of the head is determined according to the image coordinates of the head area corresponding to the single pedestrian area; the single pedestrian area that meets the image detection requirements is determined according to the longitudinal ratio of the first pedestrian longitudinal distance and the head longitudinal distance.

[0111] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0112] The longitudinal distance of the second pedestrian is determined according to the image coordinates of the single frontal pedestrian area, and the longitudinal distance of the face is determined according to the facial key points corresponding to the single frontal pedestrian area; based on the longitudinal ratio of the second pedestrian longitudinal distance and the longitudinal distance of the face, the single frontal pedestrian area that meets the image detection requirements is determined.

[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0114] A single frontal pedestrian area whose image does not meet the requirements is determined based on the image detection result; face recognition is performed on the single frontal pedestrian area whose image does not meet the requirements to obtain employee information of the violating employees.

[0115] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0116] Receive the video stream sent by the monitoring device; decode the video stream and remove duplicate frames to obtain the image of the employee to be detected.

[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for detecting employee image, the method include: Perform pedestrian detection, head detection and face detection on the employee images to be detected, and obtain pedestrian area, head area and face key points; Compare the image coordinates of the pedestrian area with the image coordinates of the head area to determine a single pedestrian area including the single head area; Determine a first pedestrian longitudinal distance according to the image coordinates of the single pedestrian area, and determine a head longitudinal distance according to the image coordinates of a head area corresponding to the single pedestrian area, wherein the first pedestrian longitudinal distance is the longitudinal distance of the single pedestrian area, and the head longitudinal distance is the longitudinal distance of the head area included in the single pedestrian area; Determining a single pedestrian region that meets image detection requirements according to a longitudinal ratio of the first pedestrian longitudinal distance to the head longitudinal distance; Determine the frontal face key points of the face according to the positional relationship of the image coordinates of each key point in the face key points; Comparing the image coordinates of the single pedestrian region with the image coordinates of the frontal face key points, and determining that the single pedestrian region is a single frontal pedestrian region including a frontal face when the frontal face key points are included in the range included in the image coordinates of the single pedestrian region; Determine a second pedestrian longitudinal distance according to the image coordinates of the single front pedestrian area, and determine a face longitudinal distance according to the face key points corresponding to the single front pedestrian area, wherein the second pedestrian longitudinal distance is the longitudinal distance of the single front pedestrian area, and the face longitudinal distance is the longitudinal distance of the faces included in the single pedestrian area; Determining a single frontal pedestrian region that meets image detection requirements according to a longitudinal ratio of the second pedestrian longitudinal distance to the face longitudinal distance; The preset neural network is used to perform work badge detection and work uniform detection on the single front pedestrian area to obtain an image detection result.

2. The method according to claim 1, It is characterized in that The employee image to be detected includes an image taken and uploaded of the area where the employee is located.

3. The method according to claim 1, It is characterized in that The key points of the face include eyes, nose and corners of the mouth.

4. The method according to claim 1, It is characterized in that After using a preset neural network to perform work badge detection and work uniform detection on the single front pedestrian area to obtain an image detection result, the method further includes: Determine a single frontal pedestrian region whose image does not meet the requirements according to the image detection result; Perform face recognition on the single front pedestrian area whose image does not meet the requirements to obtain employee information of the violating employees.

5. The method according to claim 1, It is characterized in that Before performing pedestrian detection, head detection and face detection on the employee image to be detected and obtaining pedestrian regions, head regions and face key points, the method further includes: Receive the video stream sent by the monitoring device; The video stream is decoded and repeated frames are removed to obtain an image of the employee to be detected.

6. An employee image detection device, It is characterized in that The device comprises: The target detection module is used to perform pedestrian detection, head detection and face detection on the employee images to be detected, and obtain the pedestrian area, head area and face key points; A screening module is used to compare the image coordinates of the pedestrian area with the image coordinates of the head area to determine a single pedestrian area including the single head area; determine a first pedestrian longitudinal distance according to the image coordinates of the single pedestrian area, and determine a head longitudinal distance according to the image coordinates of the head area corresponding to the single pedestrian area, wherein the first pedestrian longitudinal distance is the longitudinal distance of the single pedestrian area, and the head longitudinal distance is the longitudinal distance of the head area included in the single pedestrian area; determine a single pedestrian area that meets the image detection requirements according to the longitudinal ratio of the first pedestrian longitudinal distance and the head longitudinal distance; determine a frontal face key point when the face is frontal according to the positional relationship of the image coordinates of each key point in the face key point; Compare the image coordinates of the single pedestrian region with the image coordinates of the frontal face key points, and when the frontal face key points are included in the range included in the image coordinates of the single pedestrian region, determine that the single pedestrian region is a single frontal pedestrian region including a frontal face; determine a second pedestrian longitudinal distance according to the image coordinates of the single frontal pedestrian region, and determine a face longitudinal distance according to the face key points corresponding to the single frontal pedestrian region, the second pedestrian longitudinal distance being the longitudinal distance of the single frontal pedestrian region, and the face longitudinal distance being the longitudinal distance of the faces included in the single pedestrian region; determine a single frontal pedestrian region that meets the image detection requirements according to the longitudinal ratio of the second pedestrian longitudinal distance to the face longitudinal distance; The image detection module is used to use a preset neural network to perform work badge detection and work uniform detection on the single front pedestrian area to obtain a detection result.

7. The device according to claim 6, It is characterized in that The employee image to be detected includes an image taken and uploaded of the area where the employee is located.

8. The device according to claim 6, It is characterized in that The key points of the face include eyes, nose and corners of the mouth.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.