Video stream face recognition reasoning acceleration method
By collecting video streams from multiple cameras in the amusement park, performing intelligent humanoid frame skipping detection and feature extraction, and combining clustering algorithms, the problem of slow facial recognition processing speed in complex environments is solved, and accurate tourist trajectory acquisition and facility optimization are achieved. , improving tourist satisfaction.
Patent Information
- Application Number
- CN202411098640.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the complex dynamic environment, such as a playground, it is difficult to obtain clear and complete facial pictures, resulting in slow facial recognition processing speed, inaccurate tourist trajectory, and inaccurate facility layout, which cannot be optimized in time to reduce tourist satisfaction.
Through multiple cameras, video streams are collected, framed sequences are decoded, data preprocessing and humanoid intelligent frame skipping detection, detection information is obtained, face detection and feature extraction are performed, face grouping pictures are obtained, and face grouping pictures are compared with the database. Implement multi-threaded processing acceleration and reduce image clarity requirements.
It significantly improves the video stream processing speed, obtains more accurate tourist trajectories, and can timely optimize the layout of the amusement park facilities and improves tourist satisfaction.
Smart Images

Figure CN118898865A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of face recognition, and in particular to a method for accelerating video stream face recognition inference. Background Art
[0002] With the continuous development of the domestic economy and the improvement of residents' living standards, the audience of amusement parks continues to expand, and more and more tourists will go to amusement parks for leisure and entertainment during holidays. As the number of amusement parks gradually increases, the competition among amusement parks is becoming more and more fierce. In order to enhance the tourists' experience and improve operational efficiency, the real-time play trajectories of tourists will be analyzed to understand the popularity of various amusement facilities in the amusement park and the density of people in each area of the amusement park. This will help to optimize the layout of amusement park facilities in a timely manner, reduce tourists' waiting time and the crowding of the amusement park, and improve tourists' satisfaction.
[0003] Amusement parks generally obtain video streams through image monitoring equipment within the park, and use face recognition technology to perform real-time detection on the video streams to determine the location of each tourist, thereby obtaining the travel trajectory of each tourist.
[0004] However, as an amusement park is a typical complex dynamic environment, most image monitoring devices cannot obtain clear and complete facial images when tourists are playing, making it difficult to perform face recognition. As a result, the final tourist travel trajectory is inaccurate, resulting in the inability to timely adjust the layout of the amusement park's facilities. Face detection on video streams requires frame-by-frame image scaling, data pre-processing, model inference, and data post-processing, and generally uses a single-threaded processing method, which is slow. Summary of the invention
[0005] The purpose of the present invention is to provide a video stream face recognition inference acceleration method to solve the following technical problems:
[0006] 1. How to improve the processing speed of video stream.
[0007] 2. How to obtain more accurate travel trajectories of tourists, optimize the layout of amusement park facilities according to the travel trajectories in a timely manner, and improve tourist satisfaction.
[0008] The purpose of the present invention can be achieved through the following technical solutions:
[0009] A video stream face recognition inference acceleration method, the acceleration method comprising the following steps:
[0010] S1: collects video streams from different locations in the playground through multiple cameras in the playground;
[0011] S2: decode the captured video stream into a frame sequence;
[0012] S3: preprocess the frame sequence to make the data size of each frame the same, then perform intelligent human frame skipping detection on the preprocessed frame sequence to obtain detection information, and obtain the trajectory of the person based on the detection information;
[0013] S4: then perform face detection based on the detection information, infer and obtain the position information of the face in the video, and crop the face;
[0014] S5: extract feature vectors from the cropped faces, and apply clustering algorithms combined with human body trajectory information to obtain face grouping images;
[0015] S6: The generated face grouping pictures are compared with the face database for face identification, and finally the travel trajectory of the corresponding tourists is obtained.
[0016] As a further solution of the present invention: the detection information includes human shape information, corresponding time and position information.
[0017] As a further solution of the present invention: the human figure information includes body shape, clothing color, hairstyle and hair color.
[0018] As a further solution of the present invention: the process of obtaining the face database is as follows:
[0019] S10: collecting facial information and human shape information of tourists who are checking tickets through multiple image acquisition modules arranged at the ticket checking place;
[0020] S20: Obtaining the real-name information of the tourist who is checking the ticket through the ticket checking module;
[0021] S30: Match the facial information, human figure information and the tourist's real name information, and then number them, and store the facial information in a facial database.
[0022] As a further solution of the present invention: the humanoid intelligent frame skipping detection is implemented by an acceleration method of a custom video frame extraction function.
[0023] As a further solution of the present invention: the humanoid intelligent frame skipping detection process is:
[0024] S100: Divide the pre-processed frame sequence into a plurality of video processing units of preset sequence lengths;
[0025] S200: Sending each video processing unit to different data processing units in sequence for intelligent frame skipping detection;
[0026] S300: The data processing unit analyzes the frame images of the video processing unit frame by frame to obtain a judgment index;
[0027] S400: Determine whether frame skipping is required based on the judgment index.
[0028] As a further solution of the present invention: in step S300, the judgment index is calculated by the formula:
[0029] , calculate the judgment index ;
[0030] in, is the preset similarity; is the similarity between the current frame image and the most recently detected frame image; is the judgment function, when hour, ;when hour, .
[0031] 8. The method for accelerating face recognition inference in video stream according to claim 7, characterized in that in step S400, the process of determining whether frame skipping is required according to the judgment index is as follows:
[0032] when When , skip frames and do not perform human detection;
[0033] when When , human detection is performed without frame skipping.
[0034] Beneficial effects of the present invention:
[0035] (1) The present invention collects video streams at different locations of an amusement park through multiple cameras of the amusement park; decodes the captured video streams into a frame sequence; and detects whether there is an abnormality in the running state of each frame; if there is no abnormality, preprocesses the frame sequence to make the data size of each frame the same, and then performs human intelligent frame skipping detection on the preprocessed frame sequence to obtain detection information, and obtains the trajectory of the person based on the detection information; then performs face detection based on the detection information, infers and obtains the position information of the face in the video, and crops the face; then extracts feature vectors from the cropped face, and applies a clustering algorithm combined with the human trajectory information to obtain a face grouping picture; the generated face grouping picture , and compare the face identity with the face database, and finally obtain the corresponding tourist's play trajectory; through the intelligent frame skipping detection of human figures, the time for processing the video stream is greatly shortened, thereby improving the processing speed of the video stream; and human figure detection does not require clear face images, and the image requirements for video acquisition are reduced. It can analyze a more accurate trajectory, and then cut out the face from the detected same human figure picture, and after amplification, extract the feature vector and combine the application of clustering algorithm with the data in the face database to determine the tourist corresponding to the trajectory; obtain a more accurate play trajectory of tourists, and be able to optimize the layout of amusement park facilities according to the play trajectory in a timely manner, thereby improving tourist satisfaction;
[0036] (2) The present invention divides the pre-processed frame sequence into a number of video processing units with preset sequence lengths; then sends each video processing unit to different data processing units in sequence for intelligent frame skipping detection; processes the video through multiple threads to improve the processing speed; then analyzes the frame images of the video processing unit frame by frame through the data processing unit to obtain a judgment index; finally, determines whether frame skipping is required based on the judgment index; and realizes humanoid intelligent frame skipping detection, thereby greatly shortening the time for processing the video stream, thereby improving the processing speed of the video stream. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The present invention will be further described below in conjunction with the accompanying drawings.
[0038] Figure 1 The present invention is a method flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] See also Figure 1 As shown, in one embodiment, a method for accelerating video stream face recognition inference is provided, comprising the following steps:
[0041] S1: collects video streams from different locations in the playground through multiple cameras in the playground;
[0042] S2: decode the captured video stream into a frame sequence;
[0043] S3: preprocess the frame sequence to make the data size of each frame the same, then perform intelligent human frame skipping detection on the preprocessed frame sequence to obtain detection information, and obtain the trajectory of the person based on the detection information;
[0044] S4: then perform face detection based on the detection information, infer and obtain the position information of the face in the video, and crop the face;
[0045] S5: extract feature vectors from the cropped faces, and apply clustering algorithms combined with human body trajectory information to obtain face grouping images;
[0046] S6: The generated face grouping pictures are compared with the face database for face identification, and finally the travel trajectory of the corresponding tourists is obtained.
[0047] Through the above technical scheme, multiple cameras in the playground of this embodiment collect video streams at different positions of the playground; decode the captured video streams into frame sequences; and detect whether there is an abnormality in the running state of each frame; if there is no abnormality, perform data preprocessing on the frame sequence to make the data size of each frame the same, then perform human intelligent frame skipping detection on the preprocessed frame sequence to obtain detection information, and obtain the trajectory of the person based on the detection information; then perform face detection based on the detection information, infer and obtain the position information of the face in the video, and crop the face; then perform feature vector extraction on the cropped face, and apply the clustering algorithm in combination with the human trajectory information to obtain a face grouping picture; the generated face segmentation image is The system takes a group of pictures and compares them with the face database for face identification, and finally obtains the corresponding tourist's travel trajectory; the intelligent frame skipping detection of human figures can greatly shorten the time for processing the video stream, thereby improving the processing speed of the video stream; and human figure detection does not require clear face images, which reduces the requirements for images collected by video, and can analyze a more accurate trajectory. Then, the face is cropped out from the detected same human figure pictures, and after enlarging, the feature vector is extracted and combined with the application of clustering algorithm to compare with the data in the face database to determine the tourist corresponding to the trajectory; obtaining a more accurate travel trajectory of tourists can timely optimize the layout of amusement park facilities according to the travel trajectory, thereby improving tourist satisfaction.
[0048] As an implementation mode of the present invention, the detection information includes human figure information, corresponding time and position information; the human figure information includes body shape, clothing color, hairstyle and hair color;
[0049] Through the above technical solution, this embodiment predicts the trajectory of tourists through the body shape, clothing color, hairstyle and hair color, corresponding time and location information of the human figure in each frame, and obtains the trajectory of tourists.
[0050] It should be noted that predicting tourists' trajectories based on human body shape, clothing color, hairstyle and hair color, corresponding time and location information is an existing technology and will not be described in detail here.
[0051] As an implementation mode of the present invention, the process of obtaining the face database is as follows:
[0052] S10: collecting facial information and human shape information of tourists who are checking tickets through multiple image acquisition modules arranged at the ticket checking place;
[0053] S20: Obtaining the real-name information of the tourist who is checking the ticket through the ticket checking module;
[0054] S30: matching the facial information, human figure information and the real name information of the tourist, and then numbering them, and storing the facial information in a facial database;
[0055] Through the above technical scheme, this embodiment collects the facial information and human shape information of the tourists who are checking tickets through multiple image acquisition modules set up at the ticket checking place; obtains the real-name information of the tourists who are checking tickets through the ticket checking module; finally, the facial information, human shape information and the real-name information of the tourists are matched and numbered, and the facial information is stored in the facial database; and the acquisition of the facial database, the real-name information of the tourists and the human shape information is realized.
[0056] As an implementation mode of the present invention, the humanoid intelligent frame skipping detection process is as follows:
[0057] S100: Divide the pre-processed frame sequence into a plurality of video processing units of preset sequence lengths;
[0058] S200: Sending each video processing unit to different data processing units in sequence for intelligent frame skipping detection;
[0059] S300: Analyzing the frame images of the video processing unit frame by frame through the data processing unit to obtain a judgment index;
[0060] S400: determining whether frame skipping is required according to the judgment index;
[0061] Through the above technical scheme, this embodiment divides the preprocessed frame sequence into several video processing units with preset sequence lengths; then sends each video processing unit to different data processing units in sequence for intelligent frame skipping detection; processes the video through multiple threads to improve the processing speed, and then analyzes the frame images of the video processing unit frame by frame through the data processing unit to obtain a judgment index; finally, determines whether frame skipping is needed based on the judgment index; realizes humanoid intelligent frame skipping detection, which greatly shortens the time for processing the video stream, thereby improving the processing speed of the video stream.
[0062] As an implementation mode of the present invention, the intelligent frame skipping detection is accelerated by using a custom video frame extraction function;
[0063] Through the above technical solution, the intelligent frame skipping detection in this embodiment is accelerated by using a custom video frame extraction function; it can also be accelerated by using a custom asynchronous process function.
[0064] As an implementation of the present invention, in step S300, the judgment index is calculated by the formula:
[0065] Calculate the judgment index ;
[0066] in, is the preset similarity; is the similarity between the current frame image and the most recently detected frame image; is the judgment function, when hour, ;when hour, .
[0067] 8. The method for accelerating face recognition inference in video stream according to claim 7, characterized in that in step S400, the process of determining whether frame skipping is required according to the judgment index is as follows:
[0068] when When , skip frames and do not perform human detection;
[0069] when When , human detection is performed without frame skipping;
[0070] Through the above technical solution, this embodiment is the difference between the preset similarity and the similarity between the current frame image and the most recently detected frame image; when hour, , indicating that the similarity between the current frame image and the most recently detected frame image is less than the preset similarity; the two images have changed greatly, frames cannot be skipped, and human detection is required; when hour, , indicating that the similarity between the current frame image and the most recently detected frame image is greater than or equal to the preset similarity; the two images have little change, frames can be skipped, and human detection is not required; the time for processing the video stream is greatly shortened, thereby improving the processing speed of the video stream;
[0071] It should be noted that the similarity between two images is obtained in the prior art, and the preset similarity It is a preset value, obtained based on experience, and will not be described in detail here.
[0072] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A video stream face recognition inference acceleration method, characterized in that: The acceleration method comprises the following steps: S1: collects video streams from different locations in the playground through multiple cameras in the playground; S2: decode the captured video stream into a frame sequence; S3: preprocess the frame sequence to make the data size of each frame the same, then perform intelligent human frame skipping detection on the preprocessed frame sequence to obtain detection information, and obtain the trajectory of the person according to the detection information; S4: then perform face detection based on the detection information, infer and obtain the position information of the face in the video, and crop the face; S5: extract feature vectors from the cropped faces, and apply clustering algorithms combined with human body trajectory information to obtain face grouping images; S6: The generated face grouping pictures are compared with the face database for face identification, and finally the travel trajectory of the corresponding tourists is obtained.
2. The method for accelerating video stream face recognition inference according to claim 1, characterized in that: The detection information includes human shape information, corresponding time and position information.
3. The method for accelerating video stream face recognition inference according to claim 2, characterized in that: The human figure information includes body shape, clothing color, hairstyle and hair color.
4. The method for accelerating video stream face recognition inference according to claim 3, characterized in that: The process of obtaining the face database is as follows: S10: collecting facial information and human shape information of tourists who are checking tickets through multiple image acquisition modules arranged at the ticket checking place; S20: Obtaining the real-name information of the tourist who is checking the ticket through the ticket checking module; S30: Match the facial information, human figure information and the tourist's real name information, and then number them, and store the facial information in a facial database.
5. The method for accelerating video stream face recognition inference according to claim 4, characterized in that: The humanoid intelligent frame skipping detection is implemented by an acceleration method of a custom video frame extraction function.
6. The method for accelerating video stream face recognition inference according to claim 5, characterized in that: The humanoid intelligent frame skipping detection process is as follows: S100: Divide the pre-processed frame sequence into a plurality of video processing units of preset sequence lengths; S200: Sending each video processing unit to different data processing units in sequence for intelligent frame skipping detection; S300: The data processing unit analyzes the frame images of the video processing unit frame by frame to obtain a judgment index; S400: Determine whether frame skipping is required based on the judgment index.
7. The method for accelerating video stream face recognition inference according to claim 6, characterized in that: In step S300, the judgment index is calculated by the formula: , calculate the judgment index ; in, is the preset similarity; is the similarity between the current frame image and the most recently detected frame image; is the judgment function, when hour, ;when hour, .
8. The method for accelerating video stream face recognition inference according to claim 7, characterized in that: In step S400, the process of determining whether frame skipping is required according to the judgment index is as follows: when When , skip frames and do not perform human detection; when When , human detection is performed without frame skipping.
