Lightweight matching method and system for prisoners and carried articles
By adopting a lightweight method for matching prison personnel with their belongings in the prison security inspection system, and using dual cameras and a lightweight model to perform multimodal data fusion in a CPU environment, precise binding of items, weight, and personnel is achieved. This solves the problems of low efficiency and data silos in traditional security inspection systems, and provides an efficient and economical security management solution.
Patent Information
- Application Number
- CN202511327221.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-01-09
AI Technical Summary
Existing prison security inspection systems rely on traditional methods, which are inefficient, expensive, and unable to link items to personnel. They also suffer from data fragmentation and information silos, making it difficult to meet the needs of prison security management.
A lightweight method for matching prison personnel with their belongings is adopted. Image data and weight sensor data are acquired through dual cameras. The YOLOv8-INT8 model optimized by OpenVINO and the ArcFace-FP16 model are combined to realize item category detection, facial feature extraction and liveness detection. Multi-core parallel inference is performed in a pure CPU environment. After data binding, it is written to a MySQL database to generate structured records and generate real-time alarms.
It enables millisecond-level binding of items, weight, and personnel on ordinary office computers, reducing hardware costs, improving security inspection efficiency and accuracy, reducing reliance on manual labor, and supporting efficient and accurate security management.
Smart Images

Figure CN121301948A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision and artificial intelligence, and particularly relates to a lightweight prison personnel and carried article matching method and system. BACKGROUND
[0002] With the continuous improvement of the standardization requirements of prison management, the strict control of the carried articles of prisoners has become an important link of prison safety management. In prisons, detention houses and other special places, carrying prohibited articles by personnel not only violates management regulations, but also may cause safety hazards and even group incidents. Therefore, establishing an efficient and accurate personnel and carried article matching mechanism has great significance for maintaining prison order and ensuring safety.
[0003] Current prison security checks mainly rely on traditional methods: first, relying entirely on manual visual inspection and manual registration, which is inefficient and prone to missed detection; second, using X-ray-based security equipment, which can detect some prohibited articles, but the equipment is expensive and complex to operate, and cannot bind articles to specific personnel, making it difficult to implement management responsibilities; third, some advanced places have introduced face recognition and article detection systems, but these systems generally have three major problems: first, mainstream deep learning solutions require GPU acceleration support, but prisons and other public institutions generally use old hardware devices, which cannot meet the computing power requirements; second, the camera, weighing sensor, and face machine are each independent, forming an information silo and unable to achieve the spatio-temporal correlation of articles, weight, and personnel; finally, the system is complex to operate and requires professional maintenance, but prison frontline staff generally lack AI technical background, which is costly and prone to errors.
[0004] More seriously, existing technical solutions have data fragmentation problems: article images, weight data, and personnel identity are stored separately, lack effective correlation mechanisms, making it difficult to trace historical records and analyze abnormal behaviors such as frequent carrying of prohibited articles. In addition, traditional systems have poor real-time performance and cannot immediately detect weight abnormalities, so management decisions still rely mainly on experience, leaving a large security loophole. At the same time, X-ray equipment is not only expensive but also poses a radiation risk, which does not meet the long-term use requirements of prisons and other places.
[0005] Therefore, there is an urgent need for a lightweight security system that can run on ordinary office computers, does not require GPU support, is easy to operate, and can accurately bind articles, weight, and personnel. The system should be able to automatically identify personnel identity, accurately detect carried articles, real-time compare weight data, and immediately alert when abnormalities are found, while generating complete and traceable records. This solution will significantly reduce hardware costs, reduce reliance on manual operations, improve security efficiency and accuracy, and provide strong technical support for prison safety management. SUMMARY
[0006] To address the aforementioned issues, this invention proposes a lightweight method and system for matching prison personnel with their belongings, enabling real-time and accurate detection and identity binding of belongings carried by prison personnel.
[0007] According to a first aspect of the present invention, the present invention provides a lightweight method for matching prison personnel with their carried items, comprising the following steps: The system uses dual cameras to capture real-time images of people's faces and the items they are carrying, and simultaneously reads data from weight sensors. The YOLOv8-INT8 model optimized by OpenVINO is used to detect the category and quantity of items, the ArcFace-FP16 model is used to extract facial features, and the MediaPipe algorithm is used to complete liveness detection. By comparing facial features with a pre-recorded database and binding them to personnel IDs, and then associating them with item category and weight data, overweight or prohibited items will automatically trigger threshold alarms. The bound multidimensional data is written into the MySQL database to generate structured records containing personnel identity, item information, and weight parameters. Abnormal events are pushed to the management terminal in real time and the audible and visual alarm mechanism is activated.
[0008] Based on the above technical solution, the present invention can also be improved as follows.
[0009] Furthermore, the dual-channel camera includes one 1080P RGB camera and one 720P infrared liveness detection camera. The dual-channel camera achieves frame synchronization through an FPGA timing controller, and the timestamp alignment error is controlled within 10 milliseconds. The dual-channel camera employs adaptive exposure and automatic white balance algorithms to ensure consistent imaging within an illumination range of 300–1000 Lux. The weight sensor uses a 24-bit Δ-Σ type HX711 ADC with a sampling rate of 80Hz, and a temperature drift compensation mechanism ensures that the measurement error is less than ±1 gram across the entire temperature range.
[0010] Furthermore, the item categories include cigarettes, betel nuts, mobile phones, keys, and knives. The preset weight threshold ranges for each item category are as follows: cigarettes 20-50 grams, betel nuts 30-70 grams, mobile phones 100-250 grams, and keys 20-100 grams. When the weight of an item exceeds the corresponding threshold range, an overweight alarm is triggered.
[0011] Furthermore, the process of comparing facial features with a pre-recorded database, binding them to a person's ID, and associating them with item category and weight data, automatically triggering a threshold alarm for overweight or prohibited items, includes: When comparing facial features with the pre-recorded database, cosine similarity is used for calculation. The similarity threshold is set to 0.7. When the similarity is ≥0.7, the corresponding person ID is bound; otherwise, it is marked as "unknown person".
[0012] Furthermore, when comparing facial features with the pre-recorded database, a 30-second time window deduplication strategy is adopted to automatically filter records of the same person being detected repeatedly within 30 seconds.
[0013] Furthermore, the item matching method runs in a pure CPU environment, based on an Intel Core i5-10400 processor, and achieves multi-core parallel inference through OpenVINO's CPU_THROUGHPUT_STREAMS=4 configuration, with an end-to-end processing latency of less than 250 milliseconds and an item recognition mAP@0.5 ≥95%.
[0014] Furthermore, the binding of the personnel ID is associated with the item category and weight data, and the automatic triggering of threshold alarms for overweight or prohibited items includes: Data fusion and binding uses image frame timestamps as a benchmark to retrieve the most recent weight value within a ±10ms window. Through a timestamp synchronization mechanism, personnel ID, item category, quantity, weight, and image are bound into a complete record, achieving millisecond-level precise binding of item-weight-person.
[0015] Furthermore, the MySQL database adopts a "timestamp + location ID" composite index structure, which supports fast multi-dimensional queries by time, personnel identity, and item type, with a single record query response time of less than 50 milliseconds.
[0016] Furthermore, when the abnormal event is pushed to the management terminal, it includes personnel identity information, item category, weight data, on-site images and timestamps, and notifies the administrator in real time in the form of message cards via DingTalk or WeChat Webhook robot.
[0017] According to a second aspect of the present invention, the present invention also provides a lightweight prison personnel and carried items matching system, employing the matching method as described above, including, The image acquisition layer uses a 1080P RGB camera and a 720P infrared live camera to achieve frame synchronization via FPGA. The USB 3.0 interface transmits image data in real time, and the HX711 weighing sensor transmits weight data synchronously via the SPI interface with a time error of <1ms. The edge computing layer runs the YOLOv8-INT8 model, ArcFace-FP16 model, and MediaPipe algorithm optimized by OpenVINO to achieve object detection, face recognition and liveness detection, and complete image-weight-person binding. The data and service layer uses a MySQL database to store structured records, Redis caching to accelerate queries, and a RESTful API to provide standard interfaces, supporting real-time access from the web management terminal and WeChat mini-program. The sensing and alarm layer uses audible and visual alarms to respond to abnormal events in real time, and Webhook robots push messages to DingTalk or WeChat mini programs to achieve a closed-loop process of "millisecond-level detection - gram-level weighing - second-level reporting".
[0018] Compared with the prior art, the present invention has at least one of the following beneficial effects: This invention provides a lightweight method and system for matching prison personnel with their carried items. Through lightweight model deployment in a pure CPU environment and multimodal data fusion technology, it reduces hardware costs to 1 / 5 of traditional solutions while ensuring item-weight-person binding accuracy of 98.7%, end-to-end latency of <250ms, and recognition mAP@0.5 ≥95%. This invention reduces reliance on manual operation, lowers the risk of false alarms and omissions, and provides a cost-effective and efficient intelligent security inspection solution suitable for prisons, detention centers, and other locations requiring strict security checks with limited budgets.
[0019] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating the steps of matching prison personnel with their carried items in an embodiment of the present invention; Figure 2 This is a diagram illustrating the architecture of a prison personnel and their belongings matching system in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0022] It should be noted that in special supervisory facilities such as prisons and detention centers, facing increasingly stringent requirements for item control, traditional security inspection methods (including manual body searches, handheld metal detectors, and X-ray scanning) suffer from inefficiency, high labor costs, and severe information silos, especially when identifying non-metallic prohibited items such as cigarettes, betel nuts, knives, and mobile phones. These traditional methods often rely heavily on manual operation, which not only increases labor costs but also may lead to security risks due to human negligence. To address these issues, the inventors proposed a lightweight intelligent matching system based on computer vision and multimodal data fusion technology. This system utilizes the YOLOv8-INT8 model optimized by OpenVINO, the ArcFace-FP16 face recognition model, and the MediaPipe liveness detection algorithm to achieve real-time image analysis, identity recognition, and item binding in a pure CPU environment. The aim is to improve the speed and accuracy of detection, reduce reliance on manual inspection, and thus effectively meet the security inspection needs of supervisory facilities for high efficiency, low cost, and high accuracy.
[0023] Based on this, this invention proposes a novel technical solution: a prison personnel and their carried items matching system developed by combining lightweight deep learning algorithms with multimodal sensor fusion technology. This system can automatically identify inmates and detect their items in real time as they pass through security checkpoints, binding personnel identity, item category, and weight data at the millisecond level. This significantly improves detection speed and accuracy while drastically reducing hardware costs and environmental impact. Through intelligent image analysis technology, the system can effectively identify and classify contraband carried by inmates, ensuring strict enforcement of security measures and maintaining stable order within the prison. This solution can revolutionize security management in special locations such as prisons and detention centers.
[0024] Understandably, given the deficiencies in the background technology, this invention provides a lightweight method for matching prison personnel with their belongings, specifically as follows: Figure 1 As shown, it includes the following steps: Step S1: Acquire real-time facial images and images of carried items using dual cameras, and simultaneously read weight sensor data; The prison personnel and their carried items matching method proposed in this invention employs edge intelligence and multimodal data fusion technology. Before acquiring real-time facial images and carried item images via dual-channel cameras, the process includes: Data preparation: Collect and construct a high-definition image dataset containing typical prohibited items such as cigarettes, betel nuts, mobile phones, keys, and knives, and pre-encode facial images of inmates to establish a facial feature database.
[0025] Data preprocessing: Image data is preprocessed using OpenCV for size normalization, noise reduction, and contrast enhancement, while weight data is preprocessed using an HX711 ADC for filtering, temperature compensation, and calibration to ensure data consistency.
[0026] Furthermore, the dual-channel camera includes one 1080P RGB camera for capturing images of carried items, and one 720P infrared liveness detection camera for capturing facial images of people and performing liveness detection. One 1080P RGB camera and one 720P infrared liveness detection camera achieve frame synchronization through an FPGA timing controller, with timestamp alignment error controlled within 10 milliseconds; The dual-channel camera employs adaptive exposure and automatic white balance algorithms to ensure consistent imaging within an illumination range of 300–1000 Lux. The weight sensor data includes real-time acquisition of raw voltage signals, which are converted into digital weight values by the HX711 ADC and accompanied by timestamp information. The weight sensor uses a 24-bit Δ-Σ type HX711 ADC with a sampling rate of 80Hz, and a temperature drift compensation mechanism ensures that the measurement error is less than ±1 gram across the entire temperature range.
[0027] Step S2: Call the YOLOv8-INT8 model optimized by OpenVINO to detect the category and quantity of items, use the ArcFace-FP16 model to extract facial features, and use the MediaPipe algorithm to complete liveness detection; It should be noted that the YOLOv8n model (hereinafter referred to as the YOLOv8-INT8 model) quantized with the OpenVINO toolkit is used to detect item categories and quantities. This model reduces the precision of weights and activation values to 8-bit integers, while maintaining high detection accuracy (mAP@0.5 ≥ 93.1%), compressing the model size from 285MB to 103MB, and controlling the inference latency to within 52ms, making it suitable for real-time detection in a pure CPU environment. The ArcFace-FP16 model extracts 512-dimensional facial features, and the MediaPipe algorithm completes liveness detection. Additionally, the YOLOv8-INT8 model optimized by OpenVINO is used as a lightweight AI model. It uses the OpenVINO toolkit to perform INT8 quantization on the YOLOv8n model, compressing the model size and accelerating inference.
[0028] In this embodiment, the YOLOv8-INT8 model optimized by OpenVINO is used to detect the category and quantity of cigarettes / betel nuts. The item detection model is YOLOv8n quantized by INT8, and the size is compressed from 285MB to 103MB. The inference latency on the CPU is ≤52ms, and the mAP@0.5≥93.1%.
[0029] ArcFace is an improved deep learning face recognition technology that significantly enhances recognition accuracy and robustness by introducing angular margin optimization of the feature space. ArcFace enhances feature discriminativeness through the Additive Angular Margin Loss function, ensuring maximum angular similarity between samples within the same class and effectively combating changes in lighting, pose, and expression. Compared to the traditional Softmax loss function, its feature extraction is more discriminative, especially showing greater stability on large-scale datasets.
[0030] ArcFace is based on convolutional neural networks (such as ResNet) and extracts facial features through multiple convolutional and pooling operations, ultimately generating a 512-dimensional feature vector. After feature extraction, cosine similarity is used as a metric, which more accurately assesses facial similarity than traditional Euclidean distance. In this embodiment, the ArcFace model uses FP16 precision to extract a 512-dimensional facial feature vector.
[0031] MediaPipe is a cross-platform open-source framework developed by Google for building multimodal machine learning applications, particularly adept at real-time human keypoint detection and pose estimation. Compared to traditional algorithms (such as Haar cascades and LBPH), it is based on deep learning models and can simultaneously process multi-dimensional information such as face, hand, and body pose, providing an end-to-end solution. The MediaPipe algorithm is used for real-time liveness detection to prevent photo and video attacks.
[0032] Model deployment: On an Intel Core i5-10400 processor, multi-core parallel inference was achieved through OpenVINO's CPU_THROUGHPUT_STREAMS=4 configuration, with end-to-end processing latency <250ms and CPU utilization <80%.
[0033] Face recognition adopts a three-level cascaded architecture: MediaPipe Face Detection → YOLO-Face → ArcFace-FP16. The 512-dimensional feature vector is reduced to 256 dimensions by PCA, which improves the retrieval speed by 4 times. Liveness detection filters out non-liveness attacks such as photos and video playback using HSV color space histograms, with a false recognition rate of <0.1%.
[0034] Step S3: Compare facial features with the pre-recorded database, bind the personnel ID, and associate it with the item category and weight data. Overweight or prohibited items will automatically trigger a threshold alarm. In this embodiment, cosine similarity is used to calculate the facial features when comparing them with the pre-recorded database. The specific formula is as follows: Similarity =
[0035] in The 512-dimensional facial feature vector to be compared is... This is the feature vector of a specific person in the pre-recorded database. A similarity threshold of 0.7 is set; if the similarity is ≥ 0.7, the corresponding person's ID is bound; otherwise, it is marked as "unknown person". In this embodiment, a 30-second time window deduplication strategy is used to compare facial features with the pre-recorded database, and records of the same person being detected repeatedly within 30 seconds are automatically filtered.
[0036] The preset weight threshold ranges for each item category are as follows: cigarettes 20-50 grams, betel nuts 30-70 grams, mobile phones 100-250 grams, and keys 20-100 grams. An overweight alarm will be triggered when the weight of an item exceeds the corresponding threshold range.
[0037] The bound personnel ID is associated with the item category and weight data, and the automatic triggering of threshold alarms for overweight or prohibited items includes: Data fusion and binding: Based on the image frame timestamp, the most recent weight value is retrieved within a ±10ms window to achieve millisecond-level accurate binding of item-weight-person.
[0038] Step S4: Write the bound multidimensional data into the MySQL database to generate structured records containing personnel identity, item information, and weight parameters. Abnormal events are pushed to the management terminal in real time and the audible and visual alarm mechanism is activated.
[0039] In this embodiment, the step of writing the bound multidimensional data into a MySQL database to generate a structured record containing personnel identity, item information, and weight parameters, and immediately pushing abnormal events to the management terminal and activating the audible and visual alarm mechanism includes: Data storage and push: The bound multidimensional data is written to the MySQL database, using a "timestamp + location ID" composite index structure to support fast multidimensional queries; abnormal events are pushed to the management end in real time through a Webhook robot to activate the sound and light alarm.
[0040] Specifically, the above implementation method binds personnel ID, item category, quantity, weight and image into a complete record through a timestamp synchronization mechanism, with a binding error of <10ms; Structured data is stored using a combined index of "timestamp + location ID", and the response time for a single record query is less than 50 milliseconds. When abnormal events are pushed to the management end, they include personnel identity information, item category, weight data, on-site images and timestamps, and are notified to the administrator in real time in the form of message cards via DingTalk or WeChat Webhook robots.
[0041] In summary, the lightweight prison personnel and carried items matching method provided by this invention, through edge intelligence + multimodal fusion + asynchronous pipeline technology, achieves a closed-loop process of "millisecond-level detection - gram-level weighing - second-level reporting" on pure CPU hardware for the first time, solving the problem of traditional security inspection systems' dependence on GPU computing power. The system is based on an Intel Core i5-10400 processor and achieves multi-core parallel inference through OpenVINO's CPU_THROUGHPUT_STREAMS=4 configuration, with CPU utilization consistently below 80%, supporting continuous operation 24 / 7.
[0042] Compared to traditional prison security checks, this invention achieves an automated process integrating item identification, weight detection, and facial recognition, reducing manual reliance by 85% and increasing security check efficiency by more than 3 times. Through weight analysis, it automatically identifies anomalous items such as razor blades hidden inside cigarette boxes, increasing the detection rate by 23.6%, and achieving a 98.7% accuracy in spatiotemporal binding between faces and items.
[0043] This invention employs a millisecond-level timestamp synchronization mechanism, using the image frame timestamp as a benchmark to retrieve the most recent weight value within a ±10ms window. This achieves precise binding of item-weight-person, solving the problem of multiple devices operating independently and forming information silos in traditional systems. Simultaneously, the system supports quick historical record queries by "timestamp + location ID" index, greatly improving data traceability and meeting the stringent auditing requirements of prison management.
[0044] Based on the same inventive concept, embodiments of the present invention also provide a lightweight prison personnel and carried items matching system, employing the lightweight prison personnel and carried items matching method described above, the system comprising: The image acquisition module is used to capture images of the object to be inspected in real time via a USB 3.0 interface; The weight detection module is used to acquire the weight data of the item in real time via the SPI interface; The face recognition module is used to extract a 512-dimensional feature vector using the MediaPipe algorithm to complete identity matching; The peripheral coordination module is used to run a lightweight YOLOv8-INT8 model to achieve object detection and execute the weight-image fusion algorithm in a GPU-free environment. The data management module supports queries based on multiple criteria such as time, personnel, and item type, and automatically generates statistical reports and anomaly alarms.
[0045] It is understood that the lightweight prison personnel and carried items matching system provided by the present invention corresponds to the lightweight prison personnel and carried items matching method provided in the foregoing embodiments. The relevant technical features of the lightweight prison personnel and carried items matching system can be referred to the relevant technical features of the lightweight prison personnel and carried items matching method, and will not be repeated here.
[0046] like Figure 2 As shown, the prison personnel and their carried items matching system is deployed at prison security checkpoints to detect inmates carrying prohibited items in real time. The architecture consists of four main layers: image acquisition layer, edge computing layer, data and service layer, and sensing and alarm layer.
[0047] Image acquisition layer: The 1080P RGB camera and the 720P infrared live camera achieve frame synchronization through FPGA, and the USB 3.0 interface transmits image data in real time. The HX711 weighing sensor transmits weight data synchronously through the SPI interface with a time error of <1ms.
[0048] Edge computing layer: Runs the YOLOv8-INT8 model, ArcFace-FP16 model and MediaPipe algorithm optimized by OpenVINO to realize object detection, face recognition and liveness detection, and complete image-weight-person binding.
[0049] Data and Service Layer: MySQL database stores structured records, Redis cache accelerates queries, and RESTful API provides standard interfaces, supporting real-time access from the web management terminal and WeChat mini-program.
[0050] Sensing and Alarm Layer: The sound and light alarm responds to abnormal events in real time, and the Webhook robot pushes messages to DingTalk or WeChat Mini Program, realizing a closed loop of the entire process of "millisecond-level detection - gram-level weighing - second-level reporting".
[0051] This system is designed with efficiency, security, and low-cost operation in mind, making it suitable for special locations such as prisons and detention centers that require strict security checks and have limited budgets. By combining lightweight AI models, multimodal data fusion, and edge computing technology, this invention provides an automated and intelligent solution that significantly improves the efficiency and accuracy of security checks in detention facilities.
[0052] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0053] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A lightweight method for matching prison personnel with their belongings, characterized in that, include: The system uses dual cameras to capture real-time images of people's faces and the items they are carrying, and simultaneously reads data from weight sensors. The YOLOv8-INT8 model optimized by OpenVINO is used to detect the category and quantity of items, the ArcFace-FP16 model is used to extract facial features, and the MediaPipe algorithm is used to complete liveness detection. By comparing facial features with a pre-recorded database and binding them to personnel IDs, and then associating them with item category and weight data, overweight or prohibited items will automatically trigger threshold alarms. The bound multidimensional data is written into the MySQL database to generate structured records containing personnel identity, item information, and weight parameters. Abnormal events are pushed to the management terminal in real time and the audible and visual alarm mechanism is activated.
2. The lightweight prison personnel and their belongings matching method according to claim 1, characterized in that, Before acquiring real-time images of a person's face and the items they are carrying via dual cameras, the following steps are included: Data preparation: Collect and construct a high-definition image dataset containing typical contraband items such as cigarettes, betel nuts, mobile phones, keys, and knives, and pre-encode facial images of inmates to establish a facial feature database; Data preprocessing: Real-time acquired image data is preprocessed using OpenCV for size normalization, noise reduction, and contrast enhancement. Raw data acquired by the weight sensor is filtered, temperature compensated, and calibrated using the HX711 ADC.
3. The lightweight prison personnel and their belongings matching method according to claim 1, characterized in that, The dual-channel camera includes one 1080P RGB camera and one 720P infrared liveness detection camera. The dual-channel camera achieves frame synchronization through an FPGA timing controller, and the timestamp alignment error is controlled within 10 milliseconds.
4. The lightweight prison personnel and their belongings matching method according to claim 1, characterized in that, The item categories include cigarettes, betel nuts, mobile phones, keys, and knives. The preset weight threshold ranges for each item category are as follows: cigarettes 20-50 grams, betel nuts 30-70 grams, mobile phones 100-250 grams, and keys 20-100 grams. When the weight of an item exceeds the corresponding threshold range, an overweight alarm is triggered.
5. The lightweight prison personnel and their belongings matching method according to claim 1, characterized in that, The process involves comparing facial features with a pre-recorded database, binding them to a person's ID, and then associating them with item category and weight data. This automatically triggers a threshold alarm for overweight or prohibited items. When comparing facial features with the pre-recorded database, cosine similarity is used for calculation. A similarity threshold is set. When the similarity is greater than or equal to the threshold, the corresponding person ID is bound. Otherwise, it is marked as "unknown person".
6. The lightweight prison personnel and their belongings matching method according to claim 5, characterized in that, When comparing facial features with the pre-recorded database, a 30-second time window deduplication strategy is used to automatically filter records of the same person being detected repeatedly within 30 seconds, thus avoiding data redundancy.
7. The lightweight prison personnel and their belongings matching method according to claim 1, characterized in that, The bound personnel ID is associated with the item category and weight data, and the automatic triggering of threshold alarms for overweight or prohibited items includes: Data fusion and binding uses image frame timestamps as a benchmark to retrieve the most recent weight value within a ±10ms window. Through a timestamp synchronization mechanism, personnel ID, item category, quantity, weight, and image are bound into a complete record, achieving millisecond-level precise binding of item-weight-person.
8. The lightweight prison personnel and their belongings matching method according to claim 1, characterized in that, The MySQL database uses a composite index structure of "timestamp + location ID", which supports fast multi-dimensional queries by time, personnel identity, and item type, with a single record query response time of less than 50 milliseconds.
9. A lightweight method for matching prison personnel and their belongings according to claim 1, characterized in that, When an abnormal event is pushed to the management terminal, it includes personnel identification information, item category, weight data, on-site images and timestamps, and is notified to the administrator in real time in the form of message cards via DingTalk or WeChat Webhook robot.
10. A lightweight prison personnel and carried items matching system, employing the matching method as described in any one of claims 1 to 9, characterized in that, include: The image acquisition layer uses a 1080P RGB camera and a 720P infrared live camera to achieve frame synchronization via FPGA. The USB 3.0 interface transmits image data in real time, and the HX711 weighing sensor transmits weight data synchronously via the SPI interface with a time error of <1ms. The edge computing layer runs the YOLOv8-INT8 model, ArcFace-FP16 model, and MediaPipe algorithm optimized by OpenVINO to achieve object detection, face recognition and liveness detection, and complete image-weight-person binding. The data and service layer uses a MySQL database to store structured records, Redis caching to accelerate queries, and a RESTful API to provide standard interfaces, supporting real-time access from the web management terminal and WeChat mini-program. The sensing and alarm layer uses audible and visual alarms to respond to abnormal events in real time, and Webhook robots push messages to DingTalk or WeChat mini programs to achieve a closed-loop process of "millisecond-level detection - gram-level weighing - second-level reporting".