A personnel off-duty detection method based on Hungarian algorithm and P2PNet

By combining the Hungarian algorithm and P2PNet for personnel absence detection, the problems of large errors and low accuracy in personnel absence detection are solved, achieving efficient and reliable real-time detection that is applicable to various scenarios and reduces labor costs.

CN117058623BActive Publication Date: 2026-03-03GUONENG JIANGXI NEW ENERGY IND CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311154738.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-08
Publication Date
2026-03-03
Estimated Expiration
2043-09-08

AI Technical Summary

Technical Problem

Existing technologies suffer from large errors and low accuracy when detecting whether on-duty personnel have left their posts, especially in densely populated areas, and cannot meet the requirements for high robustness and reliability in real-time detection.

Method used

A method for detecting personnel leaving their posts based on the Hungarian algorithm and P2PNet is adopted. The P2PNet is used to detect the center point of the head and combined with the Hungarian matching algorithm to determine whether the personnel have left their posts. The model is deployed on the Cambricon MLU370-S4 smart accelerator card to improve the detection speed.

Benefits of technology

It achieves highly robust and reliable real-time personnel departure detection, reduces labor costs, ensures production safety, and is applicable to various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058623B_ABST
    Figure CN117058623B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of post safety management, and specifically relates to a personnel off-duty detection method based on a Hungarian algorithm and a P2PNet, which comprises the following steps: step 1, acquiring image information, installing a camera, adjusting the irradiation direction of the camera so that it includes all posts in the monitored area, and collecting image information of on-site personnel under different conditions; step 2, data labeling and model training, labeling the original data set, and training a head center point detection model based on the P2PNet; the present application uses artificial intelligence technology to detect personnel off-duty, combines the crowd counting P2PNet algorithm and the Hungarian matching algorithm, and is deployed on the Cambrian MLU370-S4 intelligent acceleration card, thereby realizing real-time automatic detection of personnel off-duty. The method has high robustness and reliability for various scenes, and the intelligent acceleration card ensures the timeliness of the detection, reduces a large amount of labor cost, and ensures the safety of production operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of workplace safety management technology, specifically a method for detecting personnel leaving their posts based on the Hungarian algorithm and P2PNet. Background Technology

[0002] The absence of on-duty personnel poses a safety hazard and can easily lead to various work safety accidents, a problem of great concern to all production, operation, and management units. Currently, most units have installed numerous cameras and established corresponding video surveillance locations and on-duty personnel to manage daily operations safely. However, in reality, on-duty personnel frequently leave their posts, making it impossible to respond quickly to incidents in the monitored areas, which can easily lead to serious safety problems and huge property losses. For such scenarios, real-time monitoring of on-duty personnel's presence is necessary to prevent significant losses caused by unauthorized absence. Inspecting monitored areas through patrols is not only costly in terms of manpower and resources but also has a certain lag, resulting in low efficiency and slow response, failing to meet the needs of modern production and management. Currently, several computer vision-based methods for detecting personnel absence have emerged.

[0003] For example, Chinese invention patent publication number "CN113052049A" discloses a method and device for detecting absence from duty based on artificial intelligence tooling recognition. First, a YOLOv5s model is used to detect the object to be detected and the presence marker. Then, the correlation degree between the object to be detected and the presence marker is calculated, and the object's presence status is determined based on the correlation degree. The absence status of the object is determined according to the judgment result. When the target object cannot be detected, an absence timer begins, and an alarm is triggered if the set time is exceeded. When a worker is detected, it is determined that the worker is on duty.

[0004] However, the above methods still have the following drawbacks in practical use:

[0005] The YOLOv5s object detection model was used to detect people and tools, and the correlation between people and tools was calculated. Although this further confirmed the workers, when determining whether the workers were on duty, directly judging whether the target workstation detected the workers was difficult to determine whether they were on duty when the detection box was at the boundary, which would cause errors.

[0006] When people are densely packed, the detection bounding boxes of the target may partially overlap, affecting the accuracy of the judgment.

[0007] Therefore, there is a need for a robust and reliable method for detecting personnel leaving their posts while ensuring the timeliness of the detection. Summary of the Invention

[0008] The purpose of this invention is to provide a method for detecting personnel absence from their posts based on the Hungarian algorithm and P2PNet, so as to solve the problems mentioned in the background art.

[0009] The technical solution of this invention is: a method for detecting personnel absence from their posts based on the Hungarian algorithm and P2PNet, comprising the following steps:

[0010] Step 1: Acquire image information. Install the camera and adjust its illumination direction to include all positions in the area to be monitored, and collect image information of on-site personnel under different conditions.

[0011] Step 2: Data labeling and model training. Label the original dataset and train a head center point detection model based on P2PNet.

[0012] Step 3: Acquire the camera video stream, decode it to obtain each frame of the video image, use the P2PNet model to detect the center point of the human head in the image, and obtain the coordinate information and number information of the center point of all human heads in the current frame.

[0013] Step 4: Determine if the number of detected head center points matches the number of positions. If it is less than the number of positions, determine if the person has left their post. If it is not less than the number of positions, further determine whether the person has left their post based on the Hungarian matching algorithm.

[0014] Step 5: If personnel leave their posts, start the timer for leaving the current location. When the timer exceeds the preset time, an alarm will be activated. If the personnel return to their posts within the specified time, the timer will be reset to zero, and no alarm will be activated.

[0015] Preferably, step 2 includes:

[0016] The coordinates of the center point of a person's head when they are on duty are obtained from the original dataset and used as the reference point for comparison.

[0017] Preferably, step 4, based on the Hungarian matching algorithm, further determines whether a person has left their post, including:

[0018] The Hungarian algorithm is used to match the coordinates of the reference point with the predicted coordinates of all head center points in the current frame to determine whether a person has left their post.

[0019] Preferred options also include:

[0020] Step 6: Deploy the P2PNet detection model and the Hungarian algorithm onto the Cambricon MLU370-S4 smart accelerator card to improve the model's inference speed and ensure real-time detection.

[0021] Preferably, step 6 includes:

[0022] Step 601: Model conversion. The P2PNet-trained model is converted to ONNX format, and then to Cambricon format. Based on the detection requirements, the input image size, the accuracy of the converted model, and whether to select dynamic batch are determined. The converted model stores the structural information and weight information of P2PNet.

[0023] Step 602, Model initialization process, including loading the Cambricon format model, creating the engine, context, in / out tensors, and memory allocation steps;

[0024] Step 603: Image preprocessing. CCV is a Cambrian image processing library, similar to OpenCV. However, CCV can process images on the intelligent accelerator card MLU370-S4, including color space conversion, mean subtraction and variance division, and size change, which can improve processing speed and reduce inference time.

[0025] Step 604: Model inference, obtaining the detection results of P2PNet;

[0026] Step 605: Result processing. The results are matched using the Hungarian algorithm, and the absence time is used to determine whether an absence alarm is required.

[0027] Preferably, step 4 further includes obtaining the head coordinate information of personnel when they are on duty in the original dataset using statistical methods, using it as a reference point to be compared, and using the Hungarian matching algorithm to calculate the minimum value of the loss matrix composed of the reference point coordinate set A and the predicted point coordinate set B, thereby obtaining the optimal result matching in this scenario.

[0028] Preferably, step 5 includes determining whether any personnel have left their posts based on the matching results of step 4. If all personnel are on duty, no operation is performed; if any personnel have left their posts, the timing module is activated.

[0029] This invention provides an improved method for detecting absenteeism based on the Hungarian algorithm and P2PNet, which has the following improvements and advantages compared with existing technologies:

[0030] Firstly, this invention utilizes artificial intelligence technology for personnel absence detection, integrating the P2PNet crowd counting algorithm and the Hungarian matching algorithm, and deploying it on the Cambricon MLU370-S4 intelligent accelerator card to achieve real-time automatic detection of personnel absence. This method exhibits high robustness and reliability across various scenarios, while the intelligent accelerator card ensures timely detection, reducing significant labor costs while guaranteeing safe production operations.

[0031] Secondly, by integrating personnel density detection algorithms and Hungarian matching algorithms, this invention can improve the robustness and detection accuracy of the overall absence detection method, making it applicable to different scenarios. Attached Figure Description

[0032] The present invention will be further explained below with reference to the accompanying drawings and embodiments:

[0033] Figure 1 This is a flowchart of the personnel absence detection method based on the Hungarian algorithm and P2PNet of the present invention;

[0034] Figure 2 This is a flowchart of the deployment of the algorithm of this invention on MLU370-S4. Detailed Implementation

[0035] The present invention will now be described in detail, and the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] This invention provides an improved method for detecting absenteeism based on the Hungarian algorithm and P2PNet. The technical solution of this invention is as follows:

[0037] like Figures 1-2 As shown, a method for detecting personnel absence from their posts based on the Hungarian algorithm and P2PNet includes the following steps:

[0038] Step 1: Acquire image information. Install the camera and adjust its illumination direction to include all posts in the area to be monitored. Collect image information of on-site personnel under different conditions, including situations such as all personnel on duty, some on duty, and none on duty.

[0039] Step 2: Data labeling and model training. Label the original dataset and obtain the coordinates of the head center point of the person when they are on duty. Use this coordinates as the benchmark for comparison. Train a head center point detection model based on P2PNet. The P2PNet model is a completely point-based framework that directly uses the head center point as the training point and outputs the predicted head center point coordinates. It can simultaneously perform localization and counting tasks.

[0040] Step 3: Acquire the camera video stream, decode it to obtain each frame of the video image, use the P2PNet model to detect the center point of the human head in the image, and obtain the coordinate information and number information of the center point of all human heads in the current frame.

[0041] Step 4: Determine whether the number of detected head center points is consistent with the number of posts. If it is less than the number of posts, determine that the person has left the post. If it is not less than the number of posts, further determine whether the person has left the post based on the Hungarian matching algorithm. That is, use the Hungarian algorithm to match the coordinate values ​​of the reference point with the coordinate values ​​of all head center points predicted in the current frame to determine whether the person has left the post.

[0042] In the original dataset, the head coordinates of personnel when they are on duty are obtained through statistical methods and used as the benchmark points for comparison. The Hungarian matching algorithm is used to calculate the minimum value of the loss matrix composed of the benchmark point coordinate set A and the predicted point coordinate set B, and the optimal result matching in this scenario is obtained.

[0043] Step 5: If personnel leave their posts, start the departure timer for the current location. That is, determine whether personnel have left their posts based on the matching results of Step 4. If all personnel are on duty, no operation is performed; if personnel have left their posts, start the timer module.

[0044] If the timer exceeds the preset time, an alarm will be activated; if the user returns to their post within the specified time, the timer will be reset and the alarm will not be activated.

[0045] Step 6: Deploy the P2PNet detection model and the Hungarian algorithm onto the Cambricon MLU370-S4 smart accelerator card to improve the model's inference speed and ensure real-time detection.

[0046] Based on the above method, artificial intelligence technology is used for personnel absence detection. The method integrates the P2PNet crowd counting algorithm and the Hungarian matching algorithm, and is deployed on the Cambricon MLU370-S4 intelligent accelerator card to achieve real-time automatic detection of personnel absence. This method exhibits high robustness and reliability across various scenarios, while the intelligent accelerator card ensures timely detection, reducing significant labor costs while guaranteeing safe production operations.

[0047] Preferably, step 6 includes:

[0048] Step 601: Model conversion. The P2PNet-trained model is converted to ONNX format, and then to Cambricon format. Based on the detection requirements, the input image size, the accuracy of the converted model, and whether to select dynamic batch are determined. The converted model stores the structural information and weight information of P2PNet.

[0049] Step 602, Model initialization process, including loading the Cambricon format model, creating the engine, context, in / out tensors, and memory allocation steps;

[0050] Step 603: Image preprocessing. CCV is a Cambrian image processing library, similar to OpenCV. However, CCV can process images on the intelligent accelerator card MLU370-S4, including color space conversion, mean subtraction and variance division, and size change, which can improve processing speed and reduce inference time.

[0051] Step 604: Model inference, obtaining the detection results of P2PNet;

[0052] Step 605: Result processing. The results are matched using the Hungarian algorithm, and the absence time is used to determine whether an absence alarm is required.

[0053] By integrating personnel density detection algorithms and Hungarian matching algorithms, the robustness and accuracy of the overall absence detection method can be improved, making it suitable for different scenarios.

[0054] The foregoing description enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A personnel off-duty detection method based on the Hungarian algorithm and P2PNet, characterized in that: Comprise the following steps: Step 1, obtain image information, install camera, adjust the camera irradiation direction, so that it includes all the posts of the monitoring area, collect the image information of the on-site personnel under different conditions; Step 2, data labeling and model training, label the original data set, including obtaining the head center point coordinate information of the personnel on the post in the original data set as the reference point to be compared, and training the head center point detection model based on P2PNet; Step 3, obtain the camera video stream, decode to get each frame of the video, use the P2PNet model to detect the head center point of the image, and the result is the coordinate information and number information of all head center points in the current frame; Step 4, judge whether the number of detected head center points is consistent with the number of posts, if less than the number of posts, determine that the personnel is off duty; if not less than the number of posts, further determine whether the personnel is off duty based on the Hungarian matching algorithm, including using the Hungarian algorithm to realize the matching of the coordinate values of the reference point and the coordinate values of all head center points predicted in the current frame, so as to determine whether the personnel is off duty; Step 5, if the personnel is off duty, start the off-duty timing of the current position, and start the alarm prompt when the timing time exceeds the preset specified time; if the personnel returns to the post within the specified time, the timing is cleared and the alarm prompt is not started.

2. The personnel off-duty detection method based on Hungarian algorithm and P2PNet according to claim 1, characterized in that: Further comprising: Step 6, deploy the P2PNet detection model and the Hungarian algorithm to the Cambrian MLU370-S4 intelligent acceleration card to improve the inference speed of the model and ensure the real-time of detection.

3. The personnel off-duty detection method based on Hungarian algorithm and P2PNet according to claim 2, characterized in that: Said step 6 comprises: Step 601, model conversion, convert the P2PNet trained model into onnx format model, and then into cambricon format model, according to the detection requirements, determine the input picture size, the converted model precision, whether to select dynamic batch, the converted model stores the structure information and weight information of P2PNet at the same time; Step 602, model initialization process, including cambricon format model loading, creating engine, context, in / out tensor, memory allocation steps; Step 603, picture preprocessing, cncv is a Cambrian image processing library, similar to opencv, but cncv can process pictures on the intelligent acceleration card MLU370-S4, including color space conversion, mean subtraction and variance division, size change, which can improve the processing speed and reduce the inference time; Step 604, model inference, get the detection result of P2PNet; Step 605, result processing, use the Hungarian algorithm to match the result, and judge whether the off-duty alarm is needed according to the off-duty time.

4. The personnel off-duty detection method based on Hungarian algorithm and P2PNet according to claim 3, characterized in that: Said step 4 further comprises obtaining the head coordinate information of the personnel on duty in the original data set as the reference point to be compared by statistical method, using the Hungarian matching algorithm to calculate the minimum value of the loss matrix composed of the reference point coordinate set A and the predicted point coordinate set B, and obtaining the optimal result matching under the scene.

5. The personnel off-duty detection method based on Hungarian algorithm and P2PNet according to claim 4, characterized in that: The step 5 includes determining whether there is a staff off-duty according to the matching result of the step 4, if all the staff are on-duty, no operation is performed; if there is a staff off-duty, a timing module is started.

Citation Information

Patent Citations

  • Departure detection method and device based on artificial intelligence tool identification

    CN113052049A

  • Method and device for detecting illegal personnel departure based on image recognition

    CN110580455A

  • Personnel and post matching method, device and equipment and readable storage medium

    CN114862340A