Access control method and device based on video recognition
By using video recognition technology in the access control system to identify and control the access control device, it solves the problem of pinching caused by the inability of the existing system to recognize reentry behavior in time, and improves the security and intelligence level of the access control system.
Patent Information
- Application Number
- CN202411099724.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Due to limited data processing speed and recognition accuracy, the existing access control system cannot recognize reentry behavior in time, causing the door to trap the user during the closing process.
Adopting an access control method based on video recognition, by obtaining the door area division results and real-time door environment images, using the trained target detection model to identify the location information of the target object, and outputting control information based on the matching results, accurately controlling the operating status of the access control device. Avoid malfunctions and delays.
It significantly reduces the risk of pinch accidents, improves the security and intelligence level of the access control system, ensures that the access control device is opened or closed at the right time and in the right way, and improves user experience and system efficiency.
Smart Images

Figure CN118823912A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a door access control method and device based on video recognition. Background Art
[0002] Access control system is an important part of modern security technology. Its goal is to improve the efficiency and security of access control management by integrating advanced sensor technology and intelligent algorithms.
[0003] The response speed of the access control system directly affects its real-time performance and reliability. Existing access control systems integrate a variety of sensing technologies, such as millimeter-wave radar, infrared laser, and lidar, for real-time target detection and response. Although these sensors provide high-precision environmental perception capabilities, their data processing speed and recognition accuracy may be limited. For example, millimeter-wave radar and lidar usually require complex signal processing and data analysis, resulting in slow recognition speed; while infrared lasers have limited detection capabilities for small targets with small imaging areas and low reflectivity, and are easily interfered by background noise and clutter, resulting in low recognition accuracy.
[0004] In the above scheme, when the user turns back when passing through the access control (for example, the user returns after entering the door because he forgets something), the existing access control system may not be able to identify the turning back behavior in time due to limited data processing speed and recognition accuracy, causing the door to clamp the user during the closing process. Summary of the invention
[0005] In view of this, the present invention provides a door access control method and device based on video recognition to solve the problem that the existing door access control system may not be able to identify the return behavior in time due to limited data processing speed and recognition accuracy, causing the door to clamp the user during the closing process.
[0006] In a first aspect, the present invention provides a door access control method based on video recognition, the method being applied to a controller of a door access control system, the method comprising:
[0007] Obtaining door area division results and real-time door environment images; the door area division results include easy-to-prevent-pinch danger zones and safety buffer zones;
[0008] Inputting the real-time door environment image into a trained target detection model to identify a target object corresponding to the real-time door environment image and position information of the target object;
[0009] According to the position information of the target object, matching the real-time door environment image with the door area division result;
[0010] Control information is output according to the matching result to control the operating state of the access control device in the access control system.
[0011] The above scheme can effectively prevent the access control device from opening incorrectly when people or objects are in the dangerous area by accurately dividing the door area into the easy-to-prevent pinching danger zone and the safety buffer zone, and detecting the target objects in the door environment image in real time, thereby significantly reducing the risk of pinching accidents and improving the overall safety of the access control system; the trained target detection model is used to process the real-time image to realize the automatic recognition and positioning of the target object, significantly enhancing the intelligence level of the access control system, so that it can respond to the needs of different scenarios more flexibly and accurately; it also ensures that the access control device is opened or closed at the right time and in the right way through rapid response and precise control, avoiding user inconvenience caused by misjudgment or delay. At the same time, the intelligent area division and detection mechanism improves the overall user experience. In addition, the above scheme reduces the need for manual intervention and improves the operating efficiency of the access control system through automated and intelligent processing procedures, and the precise target detection and area matching also reduce the system downtime caused by misoperation or failure, further improving the overall performance of the access control system.
[0012] In an optional implementation, matching the real-time door environment image with the door area division result according to the position information of the target object includes:
[0013] According to the position information of the target object, position matching processing is performed on the target object in the real-time door environment image to obtain whether the target object is located in the easy-to-prevent-pinch danger zone or the safety buffer zone.
[0014] Through precise position matching, the above solution can instantly determine whether the target object (such as pedestrians, pets, etc.) is in a danger zone or a safety buffer zone that is prone to pinching, ensuring that the access control device will not malfunction in potentially dangerous situations, thereby effectively preventing the occurrence of safety accidents such as pinching injuries, and greatly improving the security of the access control system.
[0015] In an optional implementation, outputting control information according to the matching result to control the operating state of the access control device in the access control system includes:
[0016] If the matching result indicates that the target object is located in the easy-to-prevent-pinch danger zone, a first level signal is sent to the access control device to control the access control device in the access control system to be in a door opener state;
[0017] If the matching result indicates that the target object is located in the safety buffer zone, a second level signal is sent to the access control device to control the access control device in the access control system to a safety protection state; the safety protection state includes an instruction to pause the door closing action and an instruction to issue an alarm.
[0018] The above scheme can output corresponding control information according to the matching results and adjust the operating status of the access control device in real time, ensuring that the access control device can make correct decisions in the shortest time and improving the overall security protection effect.
[0019] In an optional implementation, the target detection model is trained by the following steps:
[0020] Get historical door environment images;
[0021] Annotating the historical door environment image to determine a target object in the historical door environment image and location information of the target object;
[0022] Constructing a training data set based on the historical door environment image and the annotation information corresponding to the historical door environment image;
[0023] The target detection model to be trained is trained using the training data set, and the trained target detection model is obtained.
[0024] The above scheme constructs a training dataset by annotating historical door environment images, which helps the target detection model learn accurate feature representation, thereby improving the recognition accuracy and robustness of the model in practical applications.
[0025] In an optional implementation, the structure of the target detection model includes an input end, a backbone network, a neck structure, and a head structure;
[0026] The input end is used to pre-process the training data set and the real-time door environment image input into the target detection model;
[0027] The backbone network is used to perform feature extraction processing on the training data set and the real-time door environment image input to the target detection model;
[0028] The neck structure is used to perform feature fusion processing on the features extracted by the backbone network;
[0029] The head structure is used to output the target object identified by the target detection model and the position information of the target object.
[0030] In an optional implementation, training the target detection model to be trained by using the training data set and obtaining the trained target detection model includes:
[0031] The images in the training data set are sequentially subjected to adaptive anchor frame calculation processing, adaptive image scaling processing, mosaic data enhancement processing, and normalization processing;
[0032] Performing feature extraction processing on the normalized training data set and obtaining the extracted features;
[0033] Perform multi-scale feature fusion processing on the extracted features and output feature maps of different scales;
[0034] Based on the feature maps of different scales, the identified target object and the position information of the target object are output, and a trained target detection model is obtained.
[0035] The above scheme uses adaptive anchor box calculation processing to enable the model to dynamically adjust the size and proportion of the anchor box according to the actual size and shape of the target object, thereby more accurately predicting the bounding box of the target object and enhancing the model's detection ability for objects of different sizes and shapes; adaptive image scaling and normalization processing ensure that the images input to the model have consistent size and distribution, which helps the model to better learn features; at the same time, mosaic data enhancement processing increases the diversity and complexity of training data by mixing multiple images, which helps to improve the generalization and robustness of the model.
[0036] In an optional implementation, after outputting control information according to the matching result to control the operating state of the access control device in the access control system, the method further includes:
[0037] The motion trajectory of the target object is acquired from a plurality of continuous real-time door environment images, and the operating state of the access control device is dynamically adjusted according to the motion trajectory.
[0038] The above solution can more accurately predict the future position of the target object by tracking the motion trajectory of the target object in real time, so as to make corresponding safety responses in advance and improve the safety of the system.
[0039] In a second aspect, the present invention provides a door access control system based on video recognition, the system comprising: a camera, a door access device and a controller; the camera is arranged on a door frame and is used to collect a real-time door environment image; the controller is used to:
[0040] Obtaining door area division results and real-time door environment images; the door area division results include easy-to-prevent-pinch danger zones and safety buffer zones;
[0041] Inputting the real-time door environment image into a trained target detection model to identify a target object corresponding to the real-time door environment image and position information of the target object;
[0042] According to the position information of the target object, matching the real-time door environment image with the door area division result;
[0043] Control information is output according to the matching result to control the operating state of the access control device in the access control system.
[0044] In a third aspect, the present invention provides an access control device based on video recognition, the device is applied to a controller of an access control system, and the device comprises:
[0045] An acquisition module is used to obtain the door area division result and the real-time door environment image; the door area division result includes the easy-to-prevent-pinch danger zone and the safety buffer zone;
[0046] A target recognition module, used for inputting the real-time door environment image into the trained target detection model to identify the target object corresponding to the real-time door environment image and the position information of the target object;
[0047] A matching module, used for matching the real-time door environment image with the door area division result according to the position information of the target object;
[0048] The access control module is used to output control information according to the matching result to control the operating state of the access control device in the access control system.
[0049] In a fourth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute a video recognition-based access control method according to the first aspect or any corresponding embodiment thereof.
[0050] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute a video recognition-based access control method according to the first aspect or any corresponding embodiment thereof.
[0051] In a sixth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute a video recognition-based access control method according to the first aspect or any corresponding embodiment thereof.
[0052] The technical solution provided by the present invention may include the following beneficial effects:
[0053] The present invention can effectively prevent the access control device from opening incorrectly when a person or object is in a dangerous area by accurately dividing the easy-to-prevent pinching danger zone and the safety buffer zone of the door area, and detecting the target object in the door environment image in real time, thereby significantly reducing the risk of pinching accidents and improving the overall safety of the access control system; the trained target detection model is used to process the real-time image to realize the automatic recognition and positioning of the target object, significantly enhancing the intelligence level of the access control system, so that it can respond to the needs of different scenarios more flexibly and accurately; it also ensures that the access control device is opened or closed in an appropriate manner at the right time through rapid response and precise control, avoiding user inconvenience caused by misjudgment or delay, and at the same time, the intelligent area division and detection mechanism improves the overall user experience. In addition, the present invention reduces the need for manual intervention and improves the operating efficiency of the access control system through automated and intelligent processing procedures, and the precise target detection and area matching also reduce the system downtime caused by misoperation or failure, further improving the overall efficiency of the access control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 is a structural schematic diagram of a door access control system based on video recognition according to an embodiment of the present invention;
[0056] Figure 2 is a flow chart of a door access control method based on video recognition according to an embodiment of the present invention;
[0057] Figure 3 is a flow chart of another access control method based on video recognition according to an embodiment of the present invention;
[0058] Figure 4 is a flow chart of another access control method based on video recognition according to an embodiment of the present invention;
[0059] Figure 5 is a structural block diagram of a door access control device based on video recognition according to an embodiment of the present invention;
[0060] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0062] Figure 1 is a schematic diagram of a door access control system based on video recognition according to an embodiment of the present invention, such as Figure 1 As shown, the system includes a camera 110, a door access control device 120 and a controller 130;
[0063] The camera 110 may be arranged on the door frame to collect a real-time door environment image; the real-time door environment image is used to indicate the surrounding environment of the target door, such as whether there are target objects such as people and pets;
[0064] The access control device 120 is used to control the door opening state and the door closing state;
[0065] The controller 130 may be a monitoring device based on edge computing, such as a tablet and a personal computer;
[0066] The controller 130 is used to:
[0067] Obtain door area division results and real-time door environment images; the door area division results include easy-to-prevent-pinch danger zones and safety buffer zones;
[0068] Inputting the real-time door environment image into the trained target detection model to identify the target object corresponding to the real-time door environment image and the position information of the target object;
[0069] According to the position information of the target object, the real-time door environment image is matched with the door area division result;
[0070] Control information is output according to the matching result to control the operating state of the access control device 120 in the access control system.
[0071] Furthermore, this embodiment combines image recognition, feature extraction, scene matching, and control response, such as Figure 1As shown, first, the area around the target door is divided into an easy-to-prevent-pinch danger zone and a safety buffer zone (including a safety buffer zone in front of the door and a safety buffer zone behind the door), and the video stream of a specific area (such as the door area) is captured by the camera 110 to obtain a real-time door environment image and a historical door environment image. The operator selects the spatial range, target object, and the position of the target object in the historical door environment image through the controller 130 (such as a tablet), and marks it, such as inputting the type of the target object, the area where it is located, and other information. After the marking is completed, this embodiment uploads the marking information together with the corresponding historical door environment image to the image processing module in the controller 130. After the image processing module receives the uploaded historical door environment image and the marking information, it uses an image processing algorithm (such as a YOLOv5 target detection model) to extract features in the historical door environment image. The extracted features may include information such as shape, texture, and color, thereby completing the training of the YOLOv5 target detection model, and the extracted features are stored in the database together with the marking information for subsequent matching. Afterwards, when the camera 110 captures a new video stream, the system processes the video frames in real time to obtain a real-time door environment image, and uses the trained YOLOv5 target detection model to identify the target object in the real-time door environment image and extract features. The extracted features are compared with the features stored in the database to find the best match.
[0072] If a dangerous area prone to pinching is identified in the real-time door environment image and a target object matching the object stored in the database exists in the safety buffer, the corresponding control logic is triggered to send instructions to the access control device 120. The instructions may include controlling the opening speed and time of the door opener, or the anti-pinch function of the access control device 120.
[0073] Furthermore, the controller 130 in this embodiment adopts a monitoring device with edge computing technology, which delegates data processing to the monitoring device, realizes real-time data processing and analysis, improves response speed and system efficiency, has low system power consumption, is suitable for long-term continuous work, has a simple structure, and has low installation and maintenance costs.
[0074] In summary, the present invention can effectively prevent the access control device from opening incorrectly when a person or object is in a dangerous area by accurately dividing the door area into an easy-to-prevent pinching danger zone and a safety buffer zone, and detecting the target object in the door environment image in real time, thereby significantly reducing the risk of pinching accidents and improving the overall safety of the access control system; the trained target detection model is used to process the real-time image to achieve automatic recognition and positioning of the target object, significantly enhancing the intelligence level of the access control system, so that it can respond to the needs of different scenarios more flexibly and accurately; it also ensures that the access control device is opened or closed at the right time and in the right way through rapid response and precise control, avoiding user inconvenience caused by misjudgment or delay, and at the same time, the intelligent area division and detection mechanism improves the overall user experience. In addition, the present invention reduces the need for manual intervention and improves the operating efficiency of the access control system through automated and intelligent processing procedures, and accurate target detection and area matching also reduce system downtime caused by misoperation or failure, further improving the overall effectiveness of the access control system.
[0075] According to an embodiment of the present invention, an embodiment of a door access control method based on video recognition is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0076] In this embodiment, a video recognition-based access control method is provided, which can be used Figure 1 In the controller of the access control system, Figure 2 is a flow chart of a door access control method based on video recognition according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0077] Step S201, obtaining a door area division result and a real-time door environment image; the door area division result includes an easy-to-prevent-pinch danger zone and a safety buffer zone.
[0078] Furthermore, in the present embodiment, the door area division result is predefined and is used to distinguish areas of different security levels of the door. The door area division result in the present embodiment includes an easy-to-prevent danger zone (i.e., the area where a person or object is most likely to be pinched when the door is about to close or has been closed, which is the area closest to the door frame) and a safety buffer zone (a relatively safe area, including a safety buffer zone in front of the door and a safety buffer zone behind the door). The door area division result can be accurately divided through physical markings (such as lines on the ground), software configuration, or in combination with sensors. The real-time door environment image is an image captured in real time by a camera installed on the door frame, so that the subsequent target detection model can accurately identify objects in the image.
[0079] Step S202: input the real-time door environment image into a trained target detection model to identify a target object corresponding to the real-time door environment image and position information of the target object.
[0080] Furthermore, the target detection model in this embodiment can be a trained YOLOv5 target detection model or other deep learning models. This embodiment processes the input image through the target detection model to identify the target objects (such as people, animals, objects, etc.) in the image and the location information of these objects (such as whether they are located in the door area division result). Before the real-time door environment image is input into the target detection model, the target detection model has been trained using a large amount of labeled image data to learn how to identify different target objects and the location information of the target objects.
[0081] Step S203: matching the real-time door environment image with the door area division result according to the position information of the target object.
[0082] Furthermore, this embodiment compares the position information (such as the bounding box) of the target object identified by the target detection model with the door area division result to determine which area each target object is currently in (the easy-to-avoid-pinch danger zone or the safety buffer zone). Based on the position information, the system can determine whether the target object is in the danger zone to decide on subsequent control actions.
[0083] Step S204: output control information according to the matching result to control the operating state of the access control device in the access control system.
[0084] Furthermore, this embodiment generates corresponding control information based on the matching result between the target object and the door area division result, and the control information is sent to the access control device to adjust its operating status, for example, to adjust the opening and closing speed of the door, delay the closing time, or completely prevent the door from closing.
[0085] In summary, the present invention can effectively prevent the access control device from opening incorrectly when a person or object is in a dangerous area by accurately dividing the door area into an easy-to-prevent pinching danger zone and a safety buffer zone, and detecting the target object in the door environment image in real time, thereby significantly reducing the risk of pinching accidents and improving the overall safety of the access control system; the trained target detection model is used to process the real-time image to achieve automatic recognition and positioning of the target object, significantly enhancing the intelligence level of the access control system, so that it can respond to the needs of different scenarios more flexibly and accurately; it also ensures that the access control device is opened or closed at the right time and in the right way through rapid response and precise control, avoiding user inconvenience caused by misjudgment or delay, and at the same time, the intelligent area division and detection mechanism improves the overall user experience. In addition, the present invention reduces the need for manual intervention and improves the operating efficiency of the access control system through automated and intelligent processing procedures, and accurate target detection and area matching also reduce system downtime caused by misoperation or failure, further improving the overall effectiveness of the access control system.
[0086] In this embodiment, another access control method based on video recognition is provided, which can be used Figure 1 In the controller of the access control system, Figure 3 is a flow chart of another access control method based on video recognition according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0087] Step S301, obtaining a door area division result; the door area division result includes an easy-to-prevent-pinch danger zone and a safety buffer zone.
[0088] Furthermore, Figure 4 FIG. 1 is a flow chart of another access control method based on video recognition according to an embodiment of the present invention. In this embodiment, it is first determined which parts of the area around the door are easy-to-prevent-pinch danger zones (i.e. Figure 4 Dangerous areas in the system refer to areas that are prone to causing harm to people or objects), and which are safe buffer zones (i.e. Figure 4 The safe zone in the figure refers to a relatively safe area that will not cause immediate harm. The easy-to-prevent-pinch danger zone in this embodiment may be a door frame, and the safe buffer zone may be one meter before and after the door. The operator may select and mark the easy-to-prevent-pinch danger zone and the safe buffer zone through the tablet.
[0089] Step S302 : acquiring a historical door environment image, and marking the historical door environment image to determine a target object in the historical door environment image and location information of the target object.
[0090] Furthermore, the present embodiment collects environmental images of past gate areas, i.e., historical gate environmental images, and annotates target objects (such as people, pets, goods, etc.) in these images, marks their location information, captures historical images using cameras and other devices, and accurately annotates target objects and location information in these images manually or automatically (such as using image annotation tools).
[0091] Step S303: construct a training data set based on the historical door environment image and the annotation information corresponding to the historical door environment image.
[0092] Furthermore, this embodiment organizes the annotated historical door environment images into a data set that can be used to train the target detection model, that is, organizes the annotated images and their corresponding annotation information into a certain format to form a training data set, which will be used to train the model to identify target objects and their locations in different environments.
[0093] Step S304: train the target detection model to be trained using the training data set, and obtain the trained target detection model.
[0094] In an optional implementation, the structure of the target detection model includes an input end, a backbone network, a neck structure, and a head structure;
[0095] The input end is used to pre-process the training data set and the real-time door environment image input into the target detection model;
[0096] The backbone network is used to perform feature extraction processing on the training data set and the real-time door environment image input into the target detection model;
[0097] The neck structure is used to perform feature fusion processing on the features extracted by the backbone network;
[0098] The head structure is used to output the target object identified by the target detection model and the location information of the target object.
[0099] In an optional implementation, step S304 includes:
[0100] The images in the training data set are sequentially processed by adaptive anchor frame calculation, adaptive image scaling, mosaic data enhancement and normalization;
[0101] Performing feature extraction on the normalized training data set and obtaining the extracted features;
[0102] Perform multi-scale feature fusion processing on the extracted features and output feature maps of different scales;
[0103] Based on the feature maps of different scales, the identified target object and the location information of the target object are output, and a trained target detection model is obtained.
[0104] Furthermore, this embodiment trains a target detection model that can accurately identify the target object and its position through a training data set. First, a series of preprocessing is performed on the images in the training data set, such as adaptive anchor box calculation, image scaling, data enhancement and normalization, to improve the generalization ability and detection accuracy of the model. Then, the backbone network is used to extract features from the image, feature fusion is performed through the neck structure, and detection results are output through the head structure. Finally, through multiple iterative training, the model parameters are continuously adjusted until the model achieves satisfactory performance on the validation set.
[0105] Furthermore, the adaptive anchor box calculation process is to better match the shape and size of the target object in the image. The anchor box is a predefined set of rectangular boxes of different sizes and proportions, which are used as the initial estimate of the target object's bounding box during the training process. The steps of the adaptive anchor box calculation process include:
[0106] Analyze the shape and size distribution of the target objects in the training dataset; based on the analysis results, dynamically adjust the size and scale of the anchor box according to the actual bounding box of the target object, so that the anchor box is closer to the bounding box of the actual target object (during the training process, the model will use adaptive anchor boxes to predict the bounding box of the target object).
[0107] Since the images in the training data set may have different sizes and aspect ratios, in order to uniformly input them into the model, these images need to be scaled, so this embodiment adopts adaptive image scaling. The steps of adaptive image scaling include:
[0108] According to the input requirements of the model, set the target size (such as 640x640, 800x800, etc.); use a scaling algorithm (such as bilinear interpolation, nearest neighbor interpolation, etc.) to scale the historical door environment image to the target size; when scaling, fill the extra space by adding padding (which can be black or gray) on the edge of the image to maintain the aspect ratio of the image.
[0109] Mosaic data augmentation processing creates a new training image by combining four training images, thereby increasing the generalization ability and robustness of the model. The steps of Mosaic data augmentation processing include:
[0110] Four training images (historical door environment images) are randomly selected from the training dataset and stitched together to form a new stitched image containing more information and background; the stitched image is annotated to ensure the accuracy of the bounding box of the target object in the new image.
[0111] Normalization is the process of scaling the pixel values of image data to a specific range (such as 0 to 1 or -1 to 1) so that the model can learn and converge more easily. The steps of normalization include: transforming each pixel value of the image so that it falls within the specified range; normalization helps to eliminate differences in brightness, contrast, etc. between different images, so that the model can focus more on the content and structure of the image.
[0112] In addition, this embodiment uses a backbone network (such as ResNet, VGG, etc.) to extract features from the normalized image to capture key information in the image. This includes: inputting the normalized image into the backbone network so that the backbone network sequentially passes through a series of convolutional layers, pooling layers, and other structures to gradually extract features from low to high layers in the image; and finally outputting a series of feature maps, which contain abstract representations of the image at different scales.
[0113] In this embodiment, the multi-scale feature fusion processing of the extracted features is to improve the model's detection ability for target objects of different sizes. It is necessary to fuse feature maps of different scales. The steps include: fusing feature maps of different scales output by the backbone network through a neck structure (such as FPN, PANet, etc.). The fusion method may include upsampling, downsampling, feature splicing, etc. The fused feature map contains both high-resolution detail information and low-resolution semantic information, which helps the model to detect target objects more accurately.
[0114] In this embodiment, the model finally outputs the category and bounding box position of the target object based on the fused feature map. It includes: the head structure (such as the detection head) receives the fused feature map as input; predicts the position on each feature map, and outputs whether there is a target object at the position, the category of the target object, and the position and size of the bounding box; removes redundant bounding boxes through post-processing techniques such as non-maximum suppression (NMS) to obtain the final detection result, which includes the target object and the location information of the target object. In this embodiment, the model parameters are continuously adjusted in repeated iterative training to minimize the loss function. During the training process, the performance of the model is evaluated through the validation set, and the training strategy is adjusted as needed. When the performance of the model on the validation set reaches the predetermined standard, the training is stopped and the model is saved, and finally a model that can accurately detect the target object is obtained.
[0115] That is to say, in the training process, this embodiment first collects the historical door environment image through the camera, and annotates the historical door environment image. After annotation, the target object contained in this picture and its corresponding position in the picture will be obtained, and then the picture file and the annotation file corresponding to the picture are put into the Yolov5 target detection model. The Yolov5 target detection model mainly includes four modules: Input input end, Backbone backbone network, Neck neck structure and Head head structure (Prediction). They are responsible for input picture preprocessing, feature extraction, feature fusion, and output detection information respectively.
[0116] Regarding the Input input end: The Input input end mainly preprocesses the input image. The preprocessing mainly involves scaling the input image to the input size of the network and performing normalization and other operations. In addition, this embodiment also proposes an adaptive anchor frame calculation and adaptive image scaling method, which uses mosaic data enhancement processing to randomly read four images from the training data set, and perform flipping (flipping the original image left and right), scaling (scaling the size of the original image), color gamut change (changing the brightness, saturation, and hue of the original image) and other operations on the four images. Then, the four images are combined into one image, and some useless frames are screened out. Since the traditional scaling method is to scale the image according to the original ratio and fill it with black to the target size, but in actual use, the aspect ratio of many pictures is different. Therefore, after scaling and filling, the size of the black edges at both ends may not be the same. If there is too much filling, there will be a lot of information redundancy, which will affect the reasoning speed of the entire algorithm. This embodiment adopts Letterbox image processing technology, that is, adding gray, white or other color borders to the upper and lower or left and right sides of the original historical door environment image, so that the aspect ratio of the picture can adapt to a specific ratio and can adaptively add the least black edges to the scaled picture. In this way, the amount of calculation during reasoning is reduced and the target detection speed will also be improved. For example, an image is 800*600 in size, and the original scaled size is 416x416. Both are divided by the original image size, and two scaling factors of 0.52 and 0.69 can be obtained. The smaller factor 0.52 is selected. To calculate the scaled size, the length and width of the original image are multiplied by the minimum scaling factor 0.52, the width becomes 416, and the height becomes 312. Calculate the black edge filling value, and add 416-312=104 to get the original height that needs to be filled. Use the remainder method of np.mod in numpy to get 8 pixels, and then divide it by 2 to get the value that needs to be filled at both ends of the image height.
[0117] For the Backbone network: Backbone (BottleNeckCSP structure) is built in series with Focus structure, three groups of CBL+CSP1_x and CBL+SPP. Among them, CBL: consists of convolution Conv+ batch normalization BN+ activation function Leaky Relu. Focus: Slice the image and then Concat. CSP1_x: consists of CBL module, Res uint module and convolution layer Concat, where x means there are x CSP1 modules. CSP2_x: No longer uses Res unit residual component, it is composed of convolution layer CBL module Concat. SPP: Uses 1×1, 5×5, 9×9, 13×13 maximum pooling method for multi-scale fusion. Res unit: residual component, after the input passes through two CBLs, it is added with the original input. It is a conventional residual unit, so that the network can extract deeper features while avoiding gradient disappearance or explosion. Upsampling: Use element duplication and expansion to expand the size of the feature map, such as linear interpolation. Concat: Tensor concatenation will expand the dimensions of the two tensors to achieve multi-scale feature fusion. For example, the concatenation of two tensors 26×26×256 and 26×26×512 will result in 26×26×768. Add: Tensor addition, tensors are added directly without expanding the dimensions, for example, 104×104×128 and 104×104×128 are added, and the result is still 104×104×128. Y1, Y2, Y3: Represents the output of three scales of Yolov5.
[0118] It can be seen that the structure of the Yolov5 target detection model in this embodiment deletes two convolutional layers, changes the activation function, and performs model quantization operations, which greatly improves the recognition frame rate of the rknn chip during operation.
[0119] Step S305, obtaining a real-time door environment image.
[0120] Furthermore, this embodiment uses a camera to capture the current environment image of the door area in real time to perform target detection.
[0121] Step S306: input the real-time door environment image into the trained target detection model to identify the target object corresponding to the real-time door environment image and the position information of the target object.
[0122] Furthermore, this embodiment utilizes a trained target detection model to identify target objects and their positions in real-time door environment images, that is, the real-time image is input into the target detection model, and the model outputs the identified target objects and their position information.
[0123] Step S307 , performing position matching processing on the target object in the real-time door environment image according to the position information of the target object, so as to obtain whether the target object is located in the easy-to-prevent-pinch danger zone or the safety buffer zone.
[0124] Furthermore, this embodiment performs position matching based on the position information of the target object and the door area division result to determine whether the identified target object is located in the easy-to-prevent-pinch danger zone or the safety buffer zone.
[0125] Step S308: output control information according to the matching result to control the operating state of the access control device in the access control system.
[0126] In an optional implementation, step S308 includes:
[0127] If the matching result indicates that the target object is located in the easy-to-prevent-pinch danger zone, a first level signal is sent to the access control device to control the access control device in the access control system to be in an open door opener state;
[0128] If the matching result indicates that the target object is located in the safety buffer zone, a second level signal is sent to the access control device to control the access control device in the access control system to a safety protection state; the safety protection state includes an instruction to pause the door closing action and an instruction to issue an alarm.
[0129] Furthermore, this embodiment controls the operating state of the access control device according to the position of the target object to ensure the safety of people or objects. If the target object is located in a dangerous area that is easy to prevent pinching, a first level signal is sent to the access control device to turn on the door opener to avoid pinching. If the target object is located in a safe buffer zone, a second level signal is sent to the access control device to put it in a safe protection state, which may include pausing the door closing action and sounding an alarm. The first level signal is different from the second level signal, such as the first level signal is high and the second level signal is low; or the first level signal is low and the second level signal is high.
[0130] Step S309, acquiring the motion trajectory of the target object from a plurality of continuous real-time door environment images, and dynamically adjusting the operating state of the access control device according to the motion trajectory.
[0131] Furthermore, this embodiment tracks the motion trajectory of the target object from multiple continuous real-time door environment images, predicts its possible future movement path, and adjusts the operating status of the access control device in a timely manner based on the prediction results to ensure the safe passage of people or objects.
[0132] In summary, the present invention can effectively prevent the access control device from opening incorrectly when a person or object is in a dangerous area by accurately dividing the door area into an easy-to-prevent pinching danger zone and a safety buffer zone, and detecting the target object in the door environment image in real time, thereby significantly reducing the risk of pinching accidents and improving the overall safety of the access control system; the trained target detection model is used to process the real-time image to achieve automatic recognition and positioning of the target object, significantly enhancing the intelligence level of the access control system, so that it can respond to the needs of different scenarios more flexibly and accurately; it also ensures that the access control device is opened or closed at the right time and in the right way through rapid response and precise control, avoiding user inconvenience caused by misjudgment or delay, and at the same time, the intelligent area division and detection mechanism improves the overall user experience. In addition, the present invention reduces the need for manual intervention and improves the operating efficiency of the access control system through automated and intelligent processing procedures, and accurate target detection and area matching also reduce system downtime caused by misoperation or failure, further improving the overall effectiveness of the access control system.
[0133] In this embodiment, a video recognition-based access control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0134] This embodiment provides a door access control device based on video recognition, which is applied to Figure 1 The controller of the access control system shown is as follows Figure 5 As shown, including:
[0135] The acquisition module 501 is used to obtain the door area division result and the real-time door environment image; the door area division result includes the easy-to-prevent-pinch danger zone and the safety buffer zone;
[0136] The target recognition module 502 is used to input the real-time door environment image into the trained target detection model to identify the target object corresponding to the real-time door environment image and the position information of the target object;
[0137] A matching module 503 is used to match the real-time door environment image with the door area division result according to the location information of the target object;
[0138] The access control module 504 is used to output control information according to the matching result to control the operating state of the access control device in the access control system.
[0139] In some optional implementations, the matching module 503 is further configured to:
[0140] According to the position information of the target object, a position matching process is performed on the target object in the real-time door environment image to obtain whether the target object is located in the easy-to-prevent-pinch danger zone or the safety buffer zone.
[0141] In some optional implementations, the access control module 504 is further used to:
[0142] If the matching result indicates that the target object is located in the easy-to-prevent-pinch danger zone, a first level signal is sent to the access control device to control the access control device in the access control system to be in an open door opener state;
[0143] If the matching result indicates that the target object is located in the safety buffer zone, a second level signal is sent to the access control device to control the access control device in the access control system to a safety protection state; the safety protection state includes an instruction to pause the door closing action and an instruction to issue an alarm.
[0144] In some optional embodiments, the device is further used for:
[0145] The object detection model is trained by following the steps below:
[0146] Get historical door environment images;
[0147] Annotating the historical door environment image to determine a target object in the historical door environment image and location information of the target object;
[0148] Constructing a training data set based on the historical door environment image and the annotation information corresponding to the historical door environment image;
[0149] The target detection model to be trained is trained using the training data set, and the trained target detection model is obtained.
[0150] In some optional implementations, the structure of the target detection model includes an input end, a backbone network, a neck structure, and a head structure;
[0151] The input end is used to pre-process the training data set and the real-time door environment image input into the target detection model;
[0152] The backbone network is used to perform feature extraction processing on the training data set and the real-time door environment image input into the target detection model;
[0153] The neck structure is used to perform feature fusion processing on the features extracted by the backbone network;
[0154] The head structure is used to output the target object identified by the target detection model and the location information of the target object.
[0155] In some optional embodiments, the device is further used for:
[0156] The images in the training data set are sequentially processed by adaptive anchor frame calculation, adaptive image scaling, mosaic data enhancement and normalization;
[0157] Performing feature extraction on the normalized training data set and obtaining the extracted features;
[0158] Perform multi-scale feature fusion processing on the extracted features and output feature maps of different scales;
[0159] Based on the feature maps of different scales, the identified target object and the location information of the target object are output, and a trained target detection model is obtained.
[0160] In some optional embodiments, the device is further used for:
[0161] The motion trajectory of the target object is obtained from a plurality of continuous real-time door environment images, and the operating state of the access control device is dynamically adjusted according to the motion trajectory.
[0162] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0163] In this embodiment, a video recognition-based access control device is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0164] In summary, the present invention can effectively prevent the access control device from opening incorrectly when a person or object is in a dangerous area by accurately dividing the door area into an easy-to-prevent pinching danger zone and a safety buffer zone, and detecting the target object in the door environment image in real time, thereby significantly reducing the risk of pinching accidents and improving the overall safety of the access control system; the trained target detection model is used to process the real-time image to achieve automatic recognition and positioning of the target object, significantly enhancing the intelligence level of the access control system, so that it can respond to the needs of different scenarios more flexibly and accurately; it also ensures that the access control device is opened or closed at the right time and in the right way through rapid response and precise control, avoiding user inconvenience caused by misjudgment or delay, and at the same time, the intelligent area division and detection mechanism improves the overall user experience. In addition, the present invention reduces the need for manual intervention and improves the operating efficiency of the access control system through automated and intelligent processing procedures, and accurate target detection and area matching also reduce system downtime caused by misoperation or failure, further improving the overall effectiveness of the access control system.
[0165] The embodiment of the present invention also provides a computer device, see Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 610, memory 620, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 610 is taken as an example.
[0166] The processor 610 may be a central processing unit, a network processor or a combination thereof. The processor 610 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0167] The memory 620 stores instructions executable by at least one processor 610, so that the at least one processor 610 executes the method shown in the above embodiment.
[0168] The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 620 may optionally include a memory remotely arranged relative to the processor 610, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0169] The memory 620 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 620 may also include a combination of the above types of memory.
[0170] The computer device also includes a communication interface 630, which is used for the computer device to communicate with other devices or a communication network.
[0171] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0172] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0173] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the defined scope.
Claims
1. A door access control method based on video recognition, characterized in that: The method is applied to a controller of an access control system, and the method comprises: Obtaining door area division results and real-time door environment images; the door area division results include easy-to-prevent-pinch danger zones and safety buffer zones; Inputting the real-time door environment image into a trained target detection model to identify a target object corresponding to the real-time door environment image and position information of the target object; According to the position information of the target object, matching the real-time door environment image with the door area division result; Control information is output according to the matching result to control the operating state of the access control device in the access control system.
2. The method according to claim 1, characterized in that The matching of the real-time door environment image with the door area division result according to the position information of the target object includes: According to the position information of the target object, position matching processing is performed on the target object in the real-time door environment image to obtain whether the target object is located in the easy-to-prevent-pinch danger zone or the safety buffer zone.
3. The method according to claim 2, characterized in that Outputting control information according to the matching result to control the operating state of the access control device in the access control system includes: If the matching result indicates that the target object is located in the easy-to-prevent-pinch danger zone, a first level signal is sent to the access control device to control the access control device in the access control system to be in a door opener state; If the matching result indicates that the target object is located in the safety buffer zone, a second level signal is sent to the access control device to control the access control device in the access control system to a safety protection state; the safety protection state includes an instruction to pause the door closing action and an instruction to issue an alarm.
4. The method according to claim 1, characterized in that The target detection model is trained by the following steps: Get historical door environment images; Annotating the historical door environment image to determine a target object in the historical door environment image and location information of the target object; Constructing a training data set based on the historical door environment image and the annotation information corresponding to the historical door environment image; The target detection model to be trained is trained using the training data set, and the trained target detection model is obtained.
5. The method according to claim 4, characterized in that The structure of the target detection model includes an input end, a backbone network, a neck structure and a head structure; The input end is used to pre-process the training data set and the real-time door environment image input into the target detection model; The backbone network is used to perform feature extraction processing on the training data set and the real-time door environment image input to the target detection model; The neck structure is used to perform feature fusion processing on the features extracted by the backbone network; The head structure is used to output the target object identified by the target detection model and the position information of the target object.
6. The method according to claim 5, characterized in that The step of training the target detection model to be trained by using the training data set and obtaining the trained target detection model includes: The images in the training data set are sequentially subjected to adaptive anchor frame calculation processing, adaptive image scaling processing, mosaic data enhancement processing, and normalization processing; Performing feature extraction processing on the normalized training data set and obtaining the extracted features; Perform multi-scale feature fusion processing on the extracted features and output feature maps of different scales; Based on the feature maps of different scales, the identified target object and the position information of the target object are output, and a trained target detection model is obtained.
7. The method according to any one of claims 1 to 6, characterized in that: After outputting control information according to the matching result to control the operating state of the access control device in the access control system, the method further includes: The motion trajectory of the target object is acquired from a plurality of continuous real-time door environment images, and the operating state of the access control device is dynamically adjusted according to the motion trajectory.
8. An access control system based on video recognition, characterized in that: The system includes: a camera, a door control device and a controller; the camera is arranged on the door frame and is used to collect real-time door environment images; the controller is used to: Obtaining door area division results and real-time door environment images; the door area division results include easy-to-prevent-pinch danger zones and safety buffer zones; Inputting the real-time door environment image into a trained target detection model to identify a target object corresponding to the real-time door environment image and position information of the target object; According to the position information of the target object, matching the real-time door environment image with the door area division result; Control information is output according to the matching result to control the operating state of the access control device in the access control system.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes a video recognition-based access control method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute a video recognition-based access control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Video light curtain system for single-side-door elevator
CN102530691A
Intelligent door control system on basis of machine learning and control method implemented by intelligent door control system
CN107909687A
Access control system and control method
CN110807343A
Elevator doorway pedestrian detection method and system, computer storage medium and elevator
CN112861593A
Door opening early warning method, device and equipment and storage medium
CN114360056A
