Target detection method and device, electronic equipment, storage medium and program product

The video stream data is obtained through the camera and image processing and template matching are performed. The number of personnel in and out of the judgment line is detected, and the problem of low-cost statistics on the number of personnel without modifying the door lock of the computer room is solved, achieving efficient and safe operation and maintenance management.

CN119832283APending Publication Date: 2025-04-15CHINA TELECOM GLOBAL LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411904937.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Without renovating the computer room door lock, how to achieve the statistics of the number of personnel at a low cost, especially while ensuring safety and operation and maintenance efficiency, dealing with the privacy issues of outsiders and customers.

Method used

By using the camera configured in the computer room to obtain video stream data, image extraction, cropping and template matching, and using preset area templates and entry and exit judgment lines, the number of target personnel entering the target detection area is detected in real time.

Benefits of technology

It has achieved low cost and low intrusive statistics on the number of computer room personnel without renovating the computer room door lock, which improves operation and maintenance efficiency and safety management level, and reduces construction and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832283A_ABST
    Figure CN119832283A_ABST
Patent Text Reader

Abstract

The invention provides a target detection method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of machine room operation. The method comprises the following steps: acquiring video stream data in a detection time period in real time; performing image extraction on the video stream data to obtain a plurality of first detection images; cutting the plurality of first detection images according to the computer room information to obtain a plurality of second detection images; performing template matching on a preset area template and the plurality of second detection images to obtain a plurality of third detection images; and obtaining the number of target persons entering the target detection area according to the plurality of third detection images. According to the method and the device, the video stream data can be acquired by using the camera configured in the machine room, and the number of the target persons entering the target detection area is detected according to the plurality of third detection images, so that the number of persons can be counted at low cost on the premise of not transforming the door lock of the machine room.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] As an important place for storing key servers and network equipment, the computer room has extremely high requirements for security and operation and maintenance efficiency. In this context, the statistics of the number of people entering and leaving are particularly critical, which not only concerns physical security, but also involves environmental control and resource management. Accurate statistics of people entering and leaving can effectively maintain the security of the computer room, prevent unauthorized access, and ensure the normal operation of equipment and resources.

[0003] In the related technologies, although it is feasible to solve the above problems by modifying the door locks of the computer room, building an intelligent access control system, or using AI (artificial intelligence) cameras, it also faces some challenges. For example, there are differences in the operation process between swiping an IC card (integrated circuit card) and swiping a face recognition to enter the computer room. Although equipping each employee with an access card can achieve control, for some special management needs, outsiders may not be equipped with access cards; at the same time, considering customer privacy issues, there are obstacles to collecting customer facial information. In addition, the transformation process of smart access control is time-consuming and laborious. The same type of AI algorithm analysis and detection method has high requirements on the hardware resolution and placement of the camera terminal, and also has more stringent requirements on the computing power of the service node, which directly leads to higher construction and maintenance costs.

[0004] How to realize personnel counting at low cost without modifying the door locks of the computer room is an urgent problem to be solved.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The present disclosure provides a target detection method, device, electronic device, storage medium and program product, which can realize the counting of the number of people under the premise of modifying the door lock of the computer room at least to a certain extent, and the implementation cost is low.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to one aspect of the present disclosure, there is provided a target detection method, comprising: acquiring video stream data within a detection time period in real time; performing image extraction on the video stream data to obtain a plurality of first detection images; performing cropping processing on the plurality of first detection images according to computer room information to obtain a plurality of second detection images, wherein the second detection images include a target detection area corresponding to the computer room information; performing template matching on a preset area template and the plurality of second detection images to obtain a plurality of third detection images, wherein the area template includes a plurality of entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area; and obtaining the number of target personnel entering the target detection area according to the plurality of third detection images.

[0009] In one embodiment of the present disclosure, the number of people entering the target detection area is obtained based on the multiple third detection images, including: inputting the multiple third detection images into a target detection model, extracting a bounding box of the target person, and performing feature extraction of the target person in the area of ​​the bounding box to obtain person features; based on a tracking model and the person features, tracking the target person to determine the number of people entering the target detection area.

[0010] In one embodiment of the present disclosure, the import and export of the target detection area include an import and an exit; wherein, based on the tracking model and the personnel characteristics, the target personnel are tracked to determine the number of personnel entering the target detection area, including: based on the tracking model and the personnel characteristics, the target personnel are tracked to obtain the movement direction of the target personnel; if the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines located at the import in sequence, it is entering the target detection area, and the number of personnel in the target detection area is increased by 1; if the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines located at the exit in sequence, it is leaving the target detection area, and the number of personnel in the target detection area is reduced by 1.

[0011] In one embodiment of the present disclosure, the entrance and exit of the target detection area are the same entrance; wherein, based on the tracking model and the personnel characteristics, the target personnel are tracked to determine the number of personnel entering the target detection area, including: based on the tracking model and the personnel characteristics, the target personnel are tracked to obtain the movement direction of the target personnel; if the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines in sequence, it is entering the target detection area, and the number of personnel in the target detection area is increased by 1; if the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines in sequence, it is leaving the target detection area, and the number of personnel in the target detection area is reduced by 1.

[0012] In one embodiment of the present disclosure, the area template includes two entry and exit judgment lines, which are an entry and exit judgment detection line and an entry and exit judgment auxiliary line respectively. If the target person enters the target detection area through the entry and exit judgment detection line and the entry and exit judgment auxiliary line in sequence, it is judged that the target person has entered the target detection area; if the target person leaves the target detection area through the entry and exit judgment auxiliary line and the entry and exit judgment detection line in sequence, it is judged that the target person has left the target detection area.

[0013] In one embodiment of the present disclosure, the first detection image, the second detection image, and the third detection image are all images carrying a timestamp.

[0014] According to another aspect of the present disclosure, a target detection device is provided, including: an acquisition module, used to acquire video stream data within a detection time period in real time; an extraction module, used to perform image extraction on the video stream data to obtain multiple first detection images; a processing module, used to crop the multiple first detection images according to computer room information to obtain multiple second detection images, wherein the second detection images include a target detection area corresponding to the computer room information; a matching module, used to perform template matching between a preset area template and the multiple second detection images to obtain multiple third detection images, wherein the area template includes multiple entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area; the processing module is also used to obtain the number of target personnel entering the target detection area according to the multiple third detection images.

[0015] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the above-mentioned target detection methods by executing the executable instructions.

[0016] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned target detection methods is implemented.

[0017] According to another aspect of the present disclosure, a computer program product is provided, wherein the computer program product comprises a computer program or computer instructions, wherein the computer program or the computer instructions are loaded and executed by a processor so that a computer implements any of the above-mentioned target detection methods.

[0018] In the embodiments of the present disclosure, video stream data within the detection time period is acquired in real time; image extraction is performed on the video stream data to obtain multiple first detection images; the multiple first detection images are cropped according to the computer room information to obtain multiple second detection images, and the second detection images include the target detection area corresponding to the computer room information; template matching is performed on the preset area template and the multiple second detection images to obtain multiple third detection images, and the area template includes multiple entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area; according to the multiple third detection images, the number of target personnel entering the target detection area is obtained. The present disclosure can use the camera configured in the computer room to acquire video stream data, perform image extraction, cropping and template matching on the video stream data, so as to obtain a third detection image with multiple entry and exit judgment lines configured at the entrance and exit, and detect the number of target personnel entering the target detection area according to the multiple third detection images, so as to realize the statistics of the number of personnel at a low cost without modifying the door lock of the computer room.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0021] Figure 1 A schematic diagram showing an architecture of a target detection system in an embodiment of the present disclosure is shown.

[0022] Figure 2 A flow chart of a target detection method in an embodiment of the present disclosure is shown.

[0023] Figure 3 The first detection image in the embodiment of the present disclosure is shown.

[0024] Figure 4 A second detection image in an embodiment of the present disclosure is shown.

[0025] Figure 5 A schematic diagram of template matching in an embodiment of the present disclosure is shown.

[0026] Figure 6 A schematic diagram of an SSD model in an embodiment of the present disclosure is shown.

[0027] Figure 7 A schematic diagram showing the movement direction of a target person in an embodiment of the present disclosure is shown.

[0028] Figure 8 A second detection image in another embodiment of the present disclosure is shown.

[0029] Fig. 9 A schematic diagram of a target detection device in an embodiment of the present disclosure is shown.

[0030] Fig.10 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown.

[0031] Fig.11 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0033] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0035] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0037] As a place to store key servers and network equipment, the computer room has extremely high requirements for security and operation and maintenance efficiency. In this context, counting the number of people entering and leaving is particularly important, as it not only involves physical security, but also environmental control and resource management. Accurately counting the number of people entering and leaving helps maintain the security of the computer room and prevent unauthorized access. In addition, by monitoring the flow of people, possible security incidents or maintenance needs can be discovered and responded to in a timely manner, thereby improving the overall operational efficiency of the computer room.

[0038] The inventors found that the verification of the number of people entering and leaving the computer room is carried out by manual on-site guards, which is relatively labor-intensive. In the related technology, the problem is solved by transforming the computer room door lock into a smart access control or by using an AI camera. There are two types of smart access control: one is to enter the computer room by swiping an IC card and swiping a face. During the operation, each person is equipped with an access card. Due to some management specialities, all outsiders are not equipped with access cards, and due to customer privacy issues, customer facial information cannot be collected. At the same time, the transformation of smart access control is time-consuming and labor-intensive. The same type of analysis and detection method combined with AI algorithms has high requirements for the hardware resolution and layout location of the camera terminal, and at the same time has high requirements for the computing power of the service node, resulting in high construction and maintenance costs.

[0039] Based on this, the present disclosure provides a target detection method, which belongs to the field of operator computer room operation and maintenance or the field of operator computer room security duty, and is applied to business scenarios related to computer room entry and exit, such as third-party personnel entry and exit applications, visitor entry applications, supplier entry and exit applications, BCP (Business Continuity Plan, Business Continuity Plan) personnel entry and exit, and inspection personnel entry and exit. The present disclosure can use the camera configured in the computer room to obtain video stream data, perform image extraction, cropping processing and template matching on the video stream data, so as to obtain a third detection image with multiple entry and exit judgment lines configured at the entrance and exit, and detect the number of target personnel entering the target detection area based on multiple third detection images, so as to achieve low-cost personnel statistics without modifying the computer room door lock.

[0040] It should be pointed out that, in the absence of conflict, the embodiments of the present disclosure and the technical features therein may be combined with each other.

[0041] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0042] Figure 1 A schematic diagram showing the structure of a target detection system in an embodiment of the present disclosure is shown, and the system can apply the target detection method or target detection device in each embodiment of the present disclosure.

[0043] like Figure 1 As shown, the system architecture may include a terminal 101 and a server 102 .

[0044] The terminal 101 and the server 102 are connected to each other through a network, which may be a wired network or a wireless network.

[0045] Optionally, the wireless network or wired network described above uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0046] Terminal 101 may be any electronic device capable of recording video, including but not limited to a digital camera, a surveillance camera, a desktop computer, a wearable device, an augmented reality device, a virtual reality device, etc. Exemplarily, terminal 101 is a camera arranged at the entrance of a computer room according to the computer room construction specification.

[0047] Optionally, the client of the application installed in different terminals 101 is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.

[0048] The server 102 may be a server that provides various services, such as a background management server that provides support for the device operated by the user using the terminal 101. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal. Exemplarily, the server 102 is a server of the operator's online service platform.

[0049] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0050] Those skilled in the art will know that Figure 1 The number of terminals and servers in the example is only illustrative, and any number of terminals and servers may be provided according to actual needs. This embodiment of the present disclosure does not limit this.

[0051] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.

[0052] First, an embodiment of the present disclosure provides a target detection method, which can be executed by any electronic device with computing and processing capabilities.

[0053] Figure 2 A flow chart of a target detection method in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the target detection method provided in the embodiment of the present disclosure includes the following S201 to S205.

[0054] S201, acquiring video stream data within a detection time period in real time.

[0055] In the embodiment of the present disclosure, the video stream data can be collected by the camera arranged at the entrance of the computer room according to the computer room construction specification, without the need to renovate the computer room, thereby reducing the detection cost. It should be noted that the video stream data in the embodiment of the present disclosure can also be collected by other electronic devices with camera functions.

[0056] In the disclosed embodiment, the detection time period includes the start time and end time of the task. For example, a staff member applies to work in the computer room numbered 0005 from 8:00 am on December 11, 2024 to 5:00 pm on December 11, 2024, where 8:00 am on December 11, 2024 is the start time and 5:00 pm on December 11, 2024 is the end time.

[0057] In one embodiment, when there is no target detection task, the camera in the computer room does not start the detection task. When the start time and the end time are input into the platform (such as a server) connected to the camera, the borrowing task of the camera (i.e., the target detection task) is started. Exemplarily, at the start time, the camera automatically starts the target detection task, and at the end time, the camera automatically closes the target detection task. The disclosed embodiment can automatically start or end the borrowing task according to the start time and the end time, thereby realizing automatic detection of the target.

[0058] S202, extracting images from the video stream data to obtain a plurality of first detection images.

[0059] In the disclosed embodiment, the collected video stream data can be timestamped so that each first detection image is associated with a corresponding time point. The multiple first detection images extracted from the image can also be arranged in the order of extraction. It should be noted that the above two methods can ensure the continuity of the target action and prepare for the detection of the target. For example, the first detection image can be as follows: Figure 3 shown.

[0060] S203, cropping the plurality of first detection images according to the computer room information to obtain a plurality of second detection images, wherein the second detection images include a target detection area corresponding to the computer room information.

[0061] In the embodiment of the present disclosure, the computer room information may be information identifying a certain computer room, or may be information representing a certain area of ​​a certain computer room. Figure 3 As shown, 301 is used to indicate the computer room, 302 is used to indicate the network equipment in the computer room 301, and 303 is used to indicate the entrance and exit of the computer room 301. The computer room information can be 0005 or (0005, A), where 0005 is used to indicate the fifth computer room, and A is used to indicate the area in the dotted box in the fifth computer room. In other words, the area in the dotted box is the target detection area corresponding to the computer room information.

[0062] Exemplarily, the first detection image is cropped according to the computer room information (0005, A), and the obtained second detection image is as follows Figure 4 It should be noted that if the computer room information represents the entire computer room, the first detection image can be cropped according to the region of interest. The first detection image may not be cropped, or only the edge of the first detection image may be cropped. The disclosed embodiment is set according to the actual application scenario and specific application experience.

[0063] S204, performing template matching on a preset area template and a plurality of second detection images to obtain a plurality of third detection images, wherein the area template includes a plurality of entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area.

[0064] In the embodiment of the present disclosure, a ROI region (region of interest) can be set on the first detection image, the ROI region is used as a region template, and multiple entry and exit judgment lines are set on the region template. Regarding the number of entry and exit judgment lines, the embodiment of the present disclosure does not specifically limit this. For example, the number of entry and exit judgment lines is set to 2.

[0065] In the embodiment of the present disclosure, the present disclosure does not limit how to draw the entry and exit judgment line on the region template. For example, a drawing tool is used to draw the entry and exit judgment line on the region template.

[0066] For example, Figure 5 As shown, 501 is used to indicate the second detection image, 502 is used to indicate the region template, 503 is used to indicate the third detection image after template matching, and 504 is used to indicate the entry and exit judgment line. The region template 502 is matched with the second detection image 501 to obtain the third detection image 503. Figure 5 In the example, the import and export are the same port (import and export), and the entry and exit judgment line 504 is located at the import and export of the target detection area, which is used to judge whether the target has entered the target detection area. When the target person enters the area between the two network devices 302 through all the entry and exit judgment lines 504, it means that the target person has entered the target detection area. On the contrary, when the target person does not pass through the entry and exit judgment line 504 or does not pass through all the entry and exit judgment lines 504, it means that the target person has not entered the target detection area. When the target person in the area between the two network devices 302 passes through all the entry and exit judgment lines 504 in sequence and leaves the area, it means that the target person has left the target detection area.

[0067] S205: Obtain the number of target persons entering the target detection area according to the plurality of third detection images.

[0068] In the embodiment of the present disclosure, by acquiring a plurality of third detection images in real time, the total number of people in the target detection area can be known, thereby determining whether there is any violation of the operation.

[0069] Exemplarily, the total number of people requested by the operators is obtained, and when it is detected that the total number of people in the target detection area is greater than the total number of people requested by the operators, an early warning is issued to notify the remote management personnel.

[0070] It should be noted that the computer room that provides the interface to ensure the task of personnel verification can receive information such as computer room information, start time, and end time. At the same time, the algorithm model outputs the data on the number of people entering and leaving the computer room during task docking.

[0071] The disclosed embodiment verifies the number of target personnel through cameras and entry and exit judgment lines. It can be quickly applied to the entry and exit ranges of all fixed spaces, and remote management can be achieved without the need for personnel to enter and exit. There are no special requirements for the resolution of the camera, and the existing old cameras can be fully utilized for intelligent applications, saving costs.

[0072] It should be noted that the disclosure can be directly applied to business scenarios related to the entry and exit of the computer room, such as the entry and exit application of third-party personnel, the entry and exit application of visitors, the entry and exit application of suppliers, the entry and exit of BCP personnel, and the entry and exit of inspection personnel. It can realize unmanned access to the computer room and reduce the manpower input of remote supervision. It supports the assessment of third-party personnel or supplier personnel for whether they should enter or not, whether they should leave or not, and whether the work order application is executed.

[0073] The disclosed embodiment can utilize the camera configured in the computer room to obtain video stream data, perform image extraction, cropping processing and template matching on the video stream data, thereby obtaining a third detection image with multiple entry and exit judgment lines configured for the entrance and exit, and detect the number of target personnel entering the target detection area based on the multiple third detection images, thereby realizing the statistics of the number of personnel at a low cost without modifying the door lock of the computer room.

[0074] The following describes how to determine the number of target persons entering the target detection area based on multiple third detection images through several exemplary embodiments.

[0075] In an exemplary embodiment, obtaining the number of people entering the target detection area according to a plurality of third detection images may include the following steps A1 and A2.

[0076] Step A1: input multiple third detection images into the target detection model, extract the bounding box of the target person, and extract the features of the target person in the area of ​​the bounding box to obtain the person features.

[0077] In the embodiment of the present disclosure, the target detection model is used to extract the model of the target person in the third detection image. For example, the target detection model can be a YOLOv5 (You Only Look Once version 5) detection model, or a SSD (Single Shot MultiBox Detector) model based on deep learning. For example, Figure 6As shown, the SSD model includes a backbone network (Backbone) and multiple multi-scale feature blocks, wherein the backbone network can be a pre-trained convolutional neural network, such as VGG16 or MobileNet. The backbone network is used to extract features of the image. These features will be used for subsequent target detection tasks. The multi-scale feature block extracts features at multiple levels from the backbone network, and then applies convolution layers to the feature map to predict bounding boxes and categories. The multi-scale design enables the SSD model to effectively detect different targets. In the disclosed embodiment, a lightweight network using depthwise separable convolutions instead of convolutions is used, and a residual block consisting of multiple convolutional feature streams is designed. Each residual block detects features of a certain scale to achieve full-scale feature extraction, thereby ensuring that the network can capture richer feature expressions and better utilize deep features without losing information.

[0078] In the disclosed embodiment, the personnel characteristics are characteristics related to the personnel, and may include a unique identifier indicating the personnel and / or the location coordinates of the personnel, the identifier is used to distinguish between the personnel, the location is the location of the computer room where the personnel is located, and the location coordinates change with the timestamp. According to the requirements of target detection, the personnel characteristics may also include the identity characteristics and / or action characteristics of the personnel.

[0079] It should be noted that the bounding box is the bounding box predicted by the SSD model. The category can be calculated by the classifier based on the extracted personnel features.

[0080] Step A2: Track the target person based on the tracking model and the person's characteristics, so as to determine the number of people entering the target detection area.

[0081] In the disclosed embodiment, the personnel feature is used to determine the tracking object, and the tracking model is used to track the determined object and determine whether the object enters the target detection area. If the object enters the target detection area, the number of personnel in the target detection area is increased by 1. On the contrary, if the object leaves the target detection area, the number of personnel in the target detection area is decreased by 1.

[0082] In the disclosed embodiment, the tracking model may be an OSNet (Omni-Scale Network) model that incorporates a DeepSOR (Deep Sort with Object Re-identification) tracking algorithm. When DeepSOR is combined with the OSNet model, the re-identification accuracy in target tracking can be improved, thereby achieving more efficient and accurate multi-target tracking.

[0083] In one embodiment, the first detection image, the second detection image, and the third detection image are all images carrying a timestamp. It should be noted that the detection image carries a timestamp, and images of continuous frames can be obtained. For example, a plurality of third detection images are combined with the timestamp to obtain third detection images of continuous frames.

[0084] In another embodiment, the OSNet model that incorporates the DeepSOR tracking algorithm is used to track the movement of people in multiple third detection images. The tracking of each detected person is maintained in continuous frames to ensure a coherent analysis of the person's behavior within a set time window (detection time period). By analyzing the relative position changes of people in continuous frame images, their movement direction (such as entering or leaving the computer room, or entering or leaving the target detection area) is determined, and the counter is updated or the relevant security protocol is triggered accordingly, thereby realizing dynamic monitoring and management of people entering and leaving the computer room.

[0085] In the disclosed embodiment, the DeepSOR tracking algorithm can be combined with the Kalman filter and the Hungarian algorithm to realize the prediction and association of video to image frames, and realize online and real-time tracking in combination with the target detection model. Each frame of the third detection image obtains the target detection result through the YOLOv5 model, and the target detection result contains the position coordinates, timestamp and category (such as identification) of the target detection box (boundary box). The target detection result is passed to the OSNet feature extraction network, and the detected target personnel are cropped from the third detection image, and the features of all detected target personnel are extracted. Through the Kalman filter, the motion state of the current frame is predicted according to the previous motion state. Then the confirmed state trajectory and the unconfirmed state trajectory are divided from the existing trajectory, and the appearance features extracted by OSNet are used to associate the confirmed trajectory with the current detection frame. The unmatched tracking frame and the unconfirmed tracking frame are matched with the unmatched detection frame based on the IOU (Intersection over Union) loss. For the matched tracking frame, the trajectory is updated. The combination of Kalman filtering and IOU matching has a small amount of calculation and is simple to implement, which is suitable for embedding into a real-time system. When the target is motion predicted and matched, computing resources will not be over-consumed.

[0086] The disclosed embodiment can maintain high accuracy, robustness and efficiency in a dynamic environment by integrating Kalman filter motion prediction, OSNet feature extraction and IOU position-based matching. The system can effectively handle short-term occlusion of targets, rapid motion and similarity between targets, avoiding target loss, mismatching and computational bottlenecks.

[0087] In the disclosed embodiment, the number of people in the target detection area is determined according to the characteristics of the people and the direction of movement, so that the number of people can be counted at a low cost without modifying the door lock of the computer room.

[0088] In another embodiment, the area template may include two entry and exit judgment lines, which are respectively an entry and exit judgment detection line and an entry and exit judgment auxiliary line. If the target person enters the target detection area through the entry and exit judgment detection line and the entry and exit judgment auxiliary line in sequence, it is judged that the target person has entered the target detection area; if the target person leaves the target detection area through the entry and exit judgment auxiliary line and the entry and exit judgment detection line in sequence, it is judged that the target person has left the target detection area.

[0089] For example, Figure 7 As shown, 701 is used to indicate the computer room, 702 is used to indicate the entrance and exit, 703 is used to indicate the entry and exit judgment detection line, and 704 is used to indicate the entry and exit judgment auxiliary line. According to the movement direction of the target personnel, if a target person moves toward the entrance direction (crossing the direction of the entry and exit judgment detection line 703 and the entry and exit judgment auxiliary line 704 in sequence), it means that he / she is entering the current computer room 701, and the number of people in the computer room 701 is increased by 1. Similarly, if he / she moves toward the exit direction (crossing the direction of the entry and exit judgment auxiliary line 704 and the entry and exit judgment detection line 703 in sequence), it means that he / she is leaving the current computer room 701, and the number of people in the computer room 701 is reduced by 1.

[0090] The disclosed embodiment designs two layers of boundaries for the fixed space of the computer room (i.e., the entry and exit judgment detection line and the entry and exit judgment auxiliary line), and uses a method for detecting the number of people entering and leaving the computer room based on a single camera combined with a deep learning algorithm. According to the computer room construction specifications, cameras, entry and exit judgment detection lines, entry and exit judgment auxiliary lines, target detection models, and tracking models are arranged at the entrance side of the computer room to judge the movement trajectory of personnel, thereby judging the events of personnel entering, exiting, and re-entering the computer room to form a metering array and then analyzing the number of people entering and leaving the computer room. The analysis of the difference between the number of personnel applying for operation and the actual number of personnel entering the room is realized, and the number of operating personnel is guaranteed not to exceed the specified number of personnel in the confined space. The number of illegal entry and exit events of the computer room is reduced, the efficiency of remote management of the computer room is improved, and the level of autonomous management of the computer room is improved.

[0091] In another exemplary embodiment, the entrance and exit of the target detection area include an entrance and an exit, that is, the target detection area has two entrances, one of which is used to enter the target detection area, and the other is used to leave the target detection area. Tracking the target person based on the tracking model and the person's characteristics, thereby determining the number of people entering the target detection area, may include the following steps B1 to B3.

[0092] Step B1, based on the tracking model and personnel characteristics, the target person is tracked to obtain the movement direction of the target person.

[0093] In the disclosed embodiment, the features of the persons on the plurality of third detection images are output to the tracking model, so as to track the target persons on the third detection images and obtain the movement direction of the target persons.

[0094] In one embodiment, in addition to obtaining the movement direction according to the change of the personnel characteristics, it is also possible to determine whether there is any illegal operation according to the personnel characteristics. For example, when a person enters a non-target detection area, it is determined that the person is operating illegally. For example, Figure 8 As shown, there are three dotted boxes, which represent area A, area B and area C respectively. The target detection area is area A, and areas B and C are non-target detection areas. If the target person was in area A at the last moment and did not leave the computer room, it means that the target person has entered the non-target area and has performed illegal operations. For another example, when a person operates a non-operating network device, it is judged that the person is operating illegally. For example, Figure 8 As shown, the target detection area is area A, network device A1 is the network device to be operated, and the personnel characteristics show that the target personnel has opened network device A2, which means that the target personnel has performed illegal operations. The disclosed embodiment can divide the working area of ​​the target personnel, thereby realizing the flow monitoring of the target personnel, and can timely discover and respond to possible security incidents or maintenance needs, thereby improving the overall operation efficiency of the computer room.

[0095] Step B2: If the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines at the entrance in sequence, it is considered as entering the target detection area, and the number of people in the target detection area is increased by 1.

[0096] Step B3: If the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines at the exit in sequence, it means leaving the target detection area, and the number of people in the target detection area is reduced by 1.

[0097] In the disclosed embodiment, both the import and the export are one-way imports, that is, the import can only be used for entry but not exit, and the export can only be used for exit but not entry.

[0098] In the disclosed embodiment, the third detection image carries a timestamp. That is, the third detection image is timestamped to form time series data, which is convenient for analyzing and tracking personnel target detection. In addition, the time series data is combined with the identification of the personnel for tracking, which can ensure that the same person will not be counted repeatedly due to multiple entries into the target detection area.

[0099] In the disclosed embodiment, the statistical work of personnel data can be completed by a counter.

[0100] The present disclosure can help accurately locate and judge whether a target person has entered a target detection area by setting a plurality of entry and exit judgment lines, thereby realizing the counting of the number of people at a low cost without modifying the door lock of the computer room.

[0101] In another exemplary embodiment, the entrance and exit of the target detection area are the same opening, that is, the target detection area has an opening, which is both an entrance and an exit. Tracking the target person based on the tracking model and the person's characteristics, thereby determining the number of people entering the target detection area, may include the following steps C1 to C3.

[0102] Step C1, based on the tracking model and personnel characteristics, the target person is tracked to obtain the movement direction of the target person.

[0103] Step C2: If the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines in sequence, it is considered as entering the target detection area, and the number of people in the target detection area is increased by 1.

[0104] Step C3: if the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines in sequence, it means leaving the target detection area, and the number of people in the target detection area is reduced by 1.

[0105] In the disclosed embodiment, the third detection image carries a timestamp. That is, the third detection image is timestamped to form time series data, which is convenient for analyzing and tracking personnel target detection. In addition, the time series data is combined with the identification of the personnel for tracking, which can ensure that the same person will not be counted repeatedly due to multiple entries into the target detection area.

[0106] In the disclosed embodiment, the statistical work of personnel data can be completed by a counter.

[0107] The present disclosure can help accurately locate and judge whether a target person has entered a target detection area by setting a plurality of entry and exit judgment lines, thereby realizing the counting of the number of people at a low cost without modifying the door lock of the computer room.

[0108] The present disclosure is described in detail below through a specific embodiment.

[0109] In one embodiment, in a scenario where a single camera is used in combination with deep learning to detect the number of people entering and exiting a fixed space in a computer room, a target detection method provided by the present disclosure may include steps D1 to D4.

[0110] Step D1, acquiring video stream data within a detection time period in real time, and performing image extraction on the video stream data to obtain a plurality of first detection images.

[0111] In the disclosed embodiment, the camera can adjust the camera position according to the area of ​​interest before performing video acquisition. For example, two entry and exit judgment lines are set on the area template, that is, two entry and exit judgment lines are drawn in the area of ​​interest, and the camera at the door of the computer room is adjusted according to the area of ​​interest to determine the appropriate position to ensure that the area at the door of the computer room can be clearly covered by the camera. Among them, the entry and exit judgment line represents the logical boundary for detecting the entry and exit of personnel, and the target detection model and the tracking model are used to identify and track the movement of personnel on the entry and exit judgment line.

[0112] Step D2, cropping the multiple first detection images according to the computer room information to obtain multiple second detection images, where the second detection images include the target detection area corresponding to the computer room information.

[0113] In the disclosed embodiment, the camera collects video stream data in the detection time period in real time, performs image extraction on the collected video stream data, and crops the first detection image to obtain the second detection image. The disclosed embodiment crops the first detection image, which is conducive to reducing the computing power of subsequent target detection and improving the speed of detecting targets.

[0114] Step D3, template matching is performed on a preset area template and multiple second detection images to obtain multiple third detection images, where the area template includes multiple entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area.

[0115] In the disclosed embodiment, template matching is performed on a preset area template and multiple second detection images, which is equivalent to drawing an entry and exit judgment line on the second detection image, thereby obtaining a third detection image. The disclosed embodiment also timestamps each third detection image to ensure that each frame is associated with a specific time point, and pre-processes the third detection image with the timestamp, including format conversion, resolution adjustment, frame rate control, etc., to meet the input requirements of the target detection model. The disclosed embodiment performs pre-processing on the image, which is beneficial to denoising and reducing interference, improving image contrast and clarity, and thus increasing the accuracy of the target detection results.

[0116] Step D4, input the plurality of third detection images into the target detection model, extract the bounding box of the target person, and extract the features of the target person in the area of ​​the bounding box to obtain the person features. Based on the tracking model and the person features, the target person is tracked to determine the number of people entering the target detection area.

[0117] In the disclosed embodiment, the specific models of the target detection model and the tracking model have been described in the above embodiment, and will not be repeated here. It should be noted that both models need to be trained before use.

[0118] The target detection model and the tracking model are trained separately, allowing each model to focus more on its specific task, avoiding mutual interference, and improving training efficiency and model accuracy. In addition, independent training also improves flexibility, computational efficiency, maintainability, and robustness.

[0119] If the target detection area is the entire computer room, in order to ensure the quality of the data, only the image data in the ROI area of ​​the computer room door can be collected. These images are annotated as data sets for training and testing. The data set only contains the annotated targets of the people at the door of the computer room. The training data for the tracking model is a picture of only one person cut out from the surveillance video (such as the area within the above-mentioned bounding box). Among them, the annotation of the data set is manually annotated with the help of the makesense tool (a kind of annotation tool). When training the model, the training data is enhanced by Mosaic (a computer vision task). Four pictures are selected and spliced ​​by random scaling, random cropping, and random arrangement. This enriches the data set and adds many small targets, which can improve the robustness of the network. It should be noted that the annotation of the data set is a feature type, which can be semi-automatically or automatically annotated by various means and finally manually confirmed. When the tracking model is used, no labeling is required.

[0120] In one embodiment, the target person is associated with a timestamp to form time series data of the person entering and leaving the target detection area. Through time series analysis, the total number of times the same target person enters the target detection area can be determined. In addition, it can also ensure that the same target person will not be counted repeatedly due to multiple passes.

[0121] Exemplarily, by assigning a unique timestamp to each detected target person and recording their entry and exit times. A reasonable time interval is set as the deduplication threshold and combined with the detection time period to identify and associate the passage records of the same person at different time points. When implementing time series analysis, the entry and exit times of each person are recorded. If the same person passes through multiple times in a short period of time, the system will determine whether these records belong to the same visit based on the timestamp. By setting a reasonable time interval, the person will only be re-counted when he passes again outside the time interval, thereby ensuring that the same person is only recorded once when passing through the monitoring area continuously, effectively avoiding the problem of miscounting caused by repeated passages in a short period of time.

[0122] In another embodiment, the counting logic and deduplication mechanism are combined to achieve accurate statistics of the number of people entering and leaving the door of the fixed space of the computer room. By setting two entry and exit detection lines of the ROI area in the video screen of the fixed space of the computer room, the superposition algorithm is analyzed. When a person enters the ROI area, tracking begins, and tracking stops when leaving. By analyzing the movement direction of the personnel, according to their movement direction, if a person moves toward the entrance and crosses two entry and exit judgment detection lines, it means that they are entering the current computer room, and the number of people in the computer room is increased by 1. If they move toward the exit and cross two entry and exit judgment detection lines at the same time, it means that they are leaving the current computer room, then the number of people in the computer room is reduced by 1, and the personnel entry and exit array is aggregated and calculated in the ROI area, and the total number of times the same target person enters the computer room is calculated. 1 person entering and 1 person leaving is 1 person entering and exiting the computer room.

[0123] In practical applications, the present disclosure needs to select a suitable method based on specific needs and scenario characteristics. Compared with deploying multiple cameras and complex monitoring systems, the method of combining a single camera with deep learning is more cost-effective. YOLOv5 is used as the target detector, combined with the improved DeepSORT, which is the DeepSOR detection algorithm that integrates OSNet, to track the people entering and leaving the fixed space of the computer room, and to detect the number of people entering and leaving the fixed space of the computer room. On the basis of achieving stable tracking of personnel, an ROI area is set in the video screen to track the direction of entry and exit of personnel and count the number of people. At the same time, two entry and exit judgment detection lines are set in the ROI area set in the video surveillance screen, which can effectively monitor and record the flow of personnel, while avoiding false triggering and repeated counting, and improving the efficiency and accuracy of computer room security management.

[0124] Based on the same inventive concept, the present disclosure also provides a target detection device in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0125] Fig. 9 A schematic diagram of a target detection device in an embodiment of the present disclosure is shown. Fig. 9As shown, the target detection device includes an acquisition module 901, an extraction module 902, a processing module 903 and a matching module 904. The acquisition module 901 can be used to acquire video stream data within the detection time period in real time; the extraction module 902 can be used to perform image extraction on the video stream data to obtain multiple first detection images; the processing module 903 can be used to perform cropping processing on the multiple first detection images according to the computer room information to obtain multiple second detection images, and the second detection images include the target detection area corresponding to the computer room information; the matching module 904 can be used to perform template matching on the preset area template and the multiple second detection images to obtain multiple third detection images, and the area template includes multiple entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area; the processing module 903 can also be used to obtain the number of target personnel entering the target detection area according to the multiple third detection images.

[0126] In one embodiment, the processing module 903 can also be used to input multiple third detection images into the target detection model, extract the bounding box of the target person, and perform feature extraction of the target person in the area of ​​the bounding box to obtain person features; based on the tracking model and the person features, the target person is tracked to determine the number of people entering the target detection area.

[0127] In one embodiment, the import and export of the target detection area include an import and an export; the processing module 903 can also be used to track the target person based on the tracking model and personnel characteristics to obtain the movement direction of the target person; if the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines located at the import in sequence, it is entering the target detection area, and the number of people in the target detection area is increased by 1; if the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines located at the export in sequence, it is leaving the target detection area, and the number of people in the target detection area is reduced by 1.

[0128] In one embodiment, the entrance and exit of the target detection area are the same entrance; the processing module 903 can also be used to track the target person based on the tracking model and personnel characteristics to obtain the movement direction of the target person; if the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines in sequence, it is entering the target detection area, and the number of people in the target detection area is increased by 1; if the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines in sequence, it is leaving the target detection area, and the number of people in the target detection area is reduced by 1.

[0129] In one embodiment, the area template includes two entry and exit judgment lines, which are an entry and exit judgment detection line and an entry and exit judgment auxiliary line. If the target person enters the target detection area through the entry and exit judgment detection line and the entry and exit judgment auxiliary line in sequence, it is judged that the target person has entered the target detection area; if the target person leaves the target detection area through the entry and exit judgment auxiliary line and the entry and exit judgment detection line in sequence, it is judged that the target person has left the target detection area.

[0130] In one embodiment, the first detection image, the second detection image, and the third detection image are all images carrying a timestamp.

[0131] The target detection device disclosed in the embodiment of the present disclosure can utilize the camera configured in the computer room to obtain video stream data, perform image extraction, cropping processing and template matching on the video stream data, thereby obtaining a third detection image with multiple entry and exit judgment lines configured at the entrance and exit, and detect the number of target personnel entering the target detection area based on the multiple third detection images, thereby realizing the statistics of the number of personnel at a low cost without modifying the door lock of the computer room.

[0132] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0133] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present disclosure is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0134] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, and a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010).

[0135] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps described in the above “exemplary method” section of this specification according to various exemplary embodiments of the present disclosure.

[0136] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .

[0137] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0138] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0139] The electronic device 1000 may also communicate with one or more external devices 1040 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0140] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0141] In the disclosed exemplary embodiments, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. Fig.11 A schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. Fig.11 As shown, the computer-readable storage medium 1100 stores a program product capable of implementing the above method of the present disclosure.

[0142] In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary implementations of the present disclosure described in the above "Specific Implementation Methods" section of this specification.

[0143] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0144] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0145] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0146] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0147] The embodiments of the present disclosure provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the target detection method provided in various optional ways in any embodiment of the present disclosure.

[0148] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0149] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0150] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0151] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope of the present disclosure is indicated by the appended claims.

Claims

1. A target detection method, characterized in that: include: Obtain video stream data within the detection time period in real time; Performing image extraction on the video stream data to obtain a plurality of first detection images; Crop the multiple first detection images according to the computer room information to obtain multiple second detection images, where the second detection images include the target detection area corresponding to the computer room information; Performing template matching on a preset area template and the plurality of second detection images to obtain a plurality of third detection images, wherein the area template includes a plurality of entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area; The number of target persons entering the target detection area is obtained according to the multiple third detection images.

2. The method according to claim 1, characterized in that Obtaining the number of people entering the target detection area according to the plurality of third detection images includes: Inputting the plurality of third detection images into a target detection model, extracting a bounding box of a target person, and performing feature extraction of the target person in an area of ​​the bounding box to obtain features of the person; Based on the tracking model and the personnel characteristics, the target personnel are tracked to determine the number of personnel entering the target detection area.

3. The method according to claim 2, characterized in that The inlet and outlet of the target detection area include an inlet and an outlet; The step of tracking the target person based on the tracking model and the person characteristics, thereby determining the number of people entering the target detection area, includes: Based on the tracking model and the personnel characteristics, the target person is tracked to obtain the movement direction of the target person; If the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines at the entrance in sequence, then it is considered to have entered the target detection area, and the number of people in the target detection area is increased by 1; If the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines located at the exit in sequence, it means leaving the target detection area, and the number of people in the target detection area is reduced by 1.

4. The method according to claim 2, characterized in that: The inlet and outlet of the target detection area are the same opening; The step of tracking the target person based on the tracking model and the person characteristics, thereby determining the number of people entering the target detection area, includes: Based on the tracking model and the personnel characteristics, the target person is tracked to obtain the movement direction of the target person; If the movement direction is to enter the target detection area after passing through multiple entry and exit judgment lines in sequence, it is considered to have entered the target detection area, and the number of people in the target detection area is increased by 1; If the movement direction is to leave the target detection area after passing through multiple entry and exit judgment lines in sequence, it means leaving the target detection area, and the number of people in the target detection area is reduced by 1.

5. The method according to claim 1, characterized in that The area template includes two entry and exit judgment lines, which are an entry and exit judgment detection line and an entry and exit judgment auxiliary line. If the target person enters the target detection area through the entry and exit judgment detection line and the entry and exit judgment auxiliary line in sequence, it is judged that the target person has entered the target detection area; If the target person passes through the entry-exit judgment auxiliary line and the entry-exit judgment detection line in sequence and leaves the target detection area, it is determined that the target person has left the target detection area.

6. The method according to claim 1, characterized in that The first detection image, the second detection image, and the third detection image are all images carrying a timestamp.

7. A target detection device, characterized in that: include: An acquisition module is used to acquire video stream data within a detection period in real time; An extraction module, used for performing image extraction on the video stream data to obtain a plurality of first detection images; A processing module, configured to perform cropping processing on the plurality of first detection images according to the computer room information to obtain a plurality of second detection images, wherein the second detection images include a target detection area corresponding to the computer room information; A matching module, used for performing template matching between a preset area template and the plurality of second detection images to obtain a plurality of third detection images, wherein the area template includes a plurality of entry and exit judgment lines, and the entry and exit judgment lines are located at the entrance and exit of the target detection area; The processing module is further used to obtain the number of target persons entering the target detection area according to the multiple third detection images.

8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the target detection method according to any one of claims 1 to 6 by executing the executable instructions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the target detection method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and when the computer instructions are executed by a processor, they implement the operation instructions of the target detection method according to any one of claims 1 to 6.