A campus brain perception method and system based on video content analysis
Through the combination of optical flow algorithm and KM algorithm, the video matching and processing process is optimized, which solves the problem of video accumulation and processing lag in the park brain system, realizes efficient and real-time video data processing and target recognition, and improves the system's response ability and accuracy.
Patent Information
- Application Number
- CN202010603000.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Due to the insufficient number of GPUs in the existing campus brain system based on video content analysis, videos are accumulated, unable to realize real-time perception and processing, and the processing characteristics lag behind, making it unable to effectively handle emergencies.
The optical flow algorithm is used to predict the target position, and the KM algorithm is used to obtain a complete matching set, and the cosine similarity or IOU of the target feature vector is used to verify the similarity, the matching weight is added, and key frames and non-key frames are separated for processing to reduce calculations quantity, improve detection efficiency, and perform target matching through different algorithms to reduce the probability of identification and tracking failure.
It improves the accuracy of video matching and the response sensitivity of the system, enables image analysis and processing on CPU, NPU and other processors, reduces system costs, and is suitable for real-time video data processing.
Smart Images

Figure CN111783618B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing, and in particular to a campus brain perception method and system based on video content analysis. Background Art
[0002] The current campus brain based on video content analysis needs to obtain surveillance videos and analyze them frame by frame, such as warnings of suspicious behavior, vehicle speeding, traffic accident identification, pedestrian and vehicle flow statistics, etc. The information that needs to be monitored and identified is stored in the database and analyzed after the video content is extracted. However, the above-mentioned existing technical solutions require high-performance GPUs to deploy and process videos, and the insufficient number of deployed GPUs often leads to video accumulation, making it impossible to achieve real-time perception and processing, and its lagging processing characteristics cannot effectively handle emergencies. Summary of the invention
[0003] One of the main purposes of the present invention is to provide a campus brain perception method and system based on video content analysis. The method and system use an optical flow algorithm to predict the target position, obtain a complete matching set through a KM algorithm, and calculate the cosine similarity of the target feature vector or IOU to verify the similarity in the complete set. A matching weight is added to the KM algorithm to match the same object in the previous and next frames of the video to the greatest extent.
[0004] Another main purpose of the present invention is to provide a campus brain perception method and system based on video content analysis. The method and system match the same historical target multiple times, and judge whether each matching result meets the requirements based on a similarity threshold, and merge two or more matching results that meet the requirements as the matching target output, thereby greatly improving the matching accuracy.
[0005] Another main purpose of the present invention is to provide a campus brain perception method and system based on video content analysis. The method and system distinguish between key frames and non-key frames, which can reduce the amount of calculation, improve detection efficiency and thus improve the response sensitivity of the campus brain.
[0006] Another main purpose of the present invention is to provide a campus brain perception method and system based on video content analysis. The method and system use different algorithms for target matching, and the results of two successful matches are used as tracking targets, thereby reducing the probability of target recognition and tracking failure due to a single algorithm defect.
[0007] Another main purpose of the present invention is to provide a campus brain perception method and system based on video content analysis. The method and system process the key frames and non-key frames in the captured video separately, perform tracking operations on the key frames and the first B frame after the key frames, and use optical flow algorithms for other non-key frames to obtain the movement information of the target image position, which is used to update the target position of the current frame, thereby making the target tracking continuous and stable. At the same time, the amount of video data processing can be greatly reduced. It can be suitable for CPU, NPU and other processors for image analysis and processing, which can reduce the cost of the system.
[0008] In order to achieve at least one of the above-mentioned invention objects, the present invention further provides a campus brain perception method based on video content analysis, comprising the following steps:
[0009] Get the I frame in the video and the first B frame after the I frame as the key frames;
[0010] A convolutional neural network is used to obtain the detection target of the key frame, and the target position, category and feature vector of the key frame are calculated;
[0011] Calculate the optical flow map of the current key frame and the previous frame according to the optical flow algorithm to obtain the predicted position of the target in the current key frame;
[0012] Calculate the similarity information between the historical tracking target and the current detection target, use the KM algorithm to calculate the complete match of the current detection target and the historical tracking target bipartite graph, and obtain the first matched target set, the first unmatched historical tracking target set, and the first unmatched detection target set;
[0013] Eliminate dissimilar elements in the target set matched for the first time based on the target similarity information obtained by calculation;
[0014] According to the target position predicted by the optical flow algorithm, the KM algorithm is used to match the first unmatched historical tracking target and the first unmatched detection target to obtain the second matched target set, the second unmatched historical tracking target and the second unmatched detection target.
[0015] According to one of the preferred embodiments of the present invention, the cosine similarity between the currently detected pedestrian target and the historically tracked pedestrian target is calculated based on the feature vector, and the KM algorithm is used to calculate the complete matching of the bipartite graph of the currently detected pedestrian target and the historically tracked pedestrian target, and the first matched pedestrian target set, the first unmatched historically tracked pedestrian target set, and the first unmatched detected pedestrian target set are obtained;
[0016] According to the calculated cosine similarity of pedestrian targets, the dissimilar elements in the first matching pedestrian target set are eliminated;
[0017] According to the pedestrian target matching position predicted by the optical flow algorithm, the KM algorithm is used to match the historical tracked pedestrian targets that were not matched for the first time and the detected pedestrian targets that were not matched for the first time, and the second matching pedestrian target set, the second unmatched historical tracked pedestrian targets and the second unmatched detected pedestrian targets are obtained.
[0018] According to another preferred embodiment of the present invention, a pedestrian target cosine similarity threshold is set. If the cosine similarity of the pedestrian targets in the first matched pedestrian target set is less than the pedestrian target cosine similarity threshold, the pedestrian target is removed from the first matched pedestrian target set, and the pair of pedestrian targets are respectively added to the first unmatched historical tracking pedestrian target set and the first unmatched detected pedestrian target set for matching.
[0019] According to another preferred embodiment of the present invention, the matching position of the current frame is calculated based on the optical flow algorithm, and the historical tracked pedestrian targets that were not matched for the first time and the detected pedestrian targets that were not matched for the first time are matched to obtain the second matched pedestrian target set, the second unmatched historical tracked pedestrian target set and the second undetected pedestrian target set.
[0020] According to one of the preferred embodiments of the present invention, the targets that are matched successfully both the first and second times are merged as the successfully tracked targets, the historical tracking targets that are not matched or fail to match both the first and second times are deleted, and the detection targets that are not matched both the first and second times are added as new tracking targets to the historical tracking target set.
[0021] According to another preferred embodiment of the present invention, a vehicle target is obtained according to a feature vector, a historically tracked vehicle set A containing the feature vector is established, and a currently detected vehicle target set B containing the feature vector is established, and the similarity between set A and set B is calculated according to the intersection-over-union function IOU, wherein IOU= (A ∩ B) / (A ∪ B), and the KM algorithm is used to match set A and set B to obtain a first matched vehicle target set, a first unmatched detected vehicle target set, and a first unmatched historically tracked vehicle target set, and an IOU threshold of historically tracked vehicle targets and currently detected vehicle targets is set, and if the IOU value between the first matched vehicle targets is less than the IOU threshold, the vehicle target is removed from the first matched vehicle target set, and the vehicle target is added to the first unmatched detected vehicle target set and the first unmatched historically tracked vehicle target set for matching, and the second matched vehicle target set, the second unmatched detected vehicle target set, and the second unmatched historically tracked vehicle target set are obtained according to the KM algorithm.
[0022] According to another preferred embodiment of the present invention, the first vehicle target matching set and the second vehicle target matching set are merged as a vehicle tracking target set, and the status of the vehicle tracking target is updated in the historical vehicle tracking target set. If the second vehicle target matching is still not successful, the vehicle target is removed from the historical tracking target, and the detected vehicle target that was not successfully matched for the second time is added to the historical tracking vehicle target set as a new historical tracking vehicle target.
[0023] According to another preferred embodiment of the present invention, the first unmatched historical tracked vehicle target is obtained from the previous key frame.
[0024] According to another preferred embodiment of the present invention, the optical flow map of the current frame and the frame before the current frame is calculated according to the optical flow algorithm, the center point position of the historical tracking target position area is obtained, and the target position of the historical tracking target in the current frame is updated according to the optical flow map. If the center position of the historical tracking target is not within the range of the current frame, the historical tracking target is deleted.
[0025] According to another preferred embodiment of the present invention, the center value (uc, vc) and the mode value (uz, vz) of the area corresponding to the target position are obtained according to the optical flow map, and the mean (um, vm) = C (uc, vc) + D (uz, vz) is calculated, where C and D are the weighted values of the center value and the mode value of the area corresponding to the target position of the optical flow map, respectively, and the current target position is predicted to be: (x+um, y+vm), where x and y are the horizontal and vertical coordinates of the picture, respectively.
[0026] In order to achieve at least one of the above-mentioned invention objectives, the present invention further provides a campus brain perception system based on video content analysis, the system is operated by the above-mentioned method, and includes:
[0027] Video acquisition module;
[0028] Analysis and processing module;
[0029] Alarm module;
[0030] The video acquisition module acquires video information, transmits the video information to the analysis and processing module to identify vehicles and pedestrians, is used to identify dangerous information of pedestrians and vehicles, and drives the alarm module to send alarm information. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 Shown is a flow chart of a campus brain perception method based on video content analysis according to the present invention.
[0032] Figure 2 Shown is a module schematic diagram of a campus brain warning system based on video content analysis according to the present invention.
[0033] Figure 3 Shown is a schematic diagram of a matching of the bipartite graph involved in the present invention.
[0034] Figure 4 Shown is another schematic diagram of the bipartite graph involved in the present invention. DETAILED DESCRIPTION
[0035] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0036] Those skilled in the art should understand that, in the disclosure of the present invention, the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, which are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.
[0037] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0038] Please refer to Figure 2 The present invention shows a campus brain warning system based on video content analysis, the system includes an image acquisition module, an analysis and processing module and an alarm module, wherein the image acquisition module is composed of a camera and a communication module, the camera is used to obtain video information in the campus, the communication module sends the video information obtained by the camera to the analysis and processing module, it is worth mentioning that the CPU for analysis and processing is preferably a CPU that can support openVINO, which is used to process video information, and the alarm module selects to output alarm information to a mobile terminal or a host computer according to the processing results of the analysis and processing module.
[0039] It is worth mentioning that please refer to Figure 1 A campus brain perception method based on video content analysis is shown, wherein the method comprises the following steps:
[0040] Get the I frame in the video and the first B frame after the I frame as the key frames;
[0041] A convolutional neural network is used to obtain the detection target of the key frame, and the target position, category and feature vector of the key frame are calculated;
[0042] Calculate the optical flow map of the current key frame and the previous frame according to the optical flow algorithm to obtain the predicted position of the target in the current key frame;
[0043] The cosine similarity between the currently detected pedestrian target and the historically tracked pedestrian target is calculated based on the feature vector, and the KM algorithm is used to calculate the complete matching of the bipartite graph of the currently detected pedestrian target and the historically tracked pedestrian target, and the first matched pedestrian target set, the first unmatched historically tracked pedestrian target set, and the first unmatched detected pedestrian target set are obtained;
[0044] According to the calculated cosine similarity of pedestrian targets, the dissimilar elements in the first matching pedestrian target set are eliminated;
[0045] According to the pedestrian target matching position predicted by the optical flow algorithm, the KM algorithm is used to match the historical tracked pedestrian targets that were not matched for the first time and the detected pedestrian targets that were not matched for the first time, and the second matched target set, the second unmatched historical tracked target set and the second unmatched detected target set are obtained.
[0046] It should be noted that the present invention adopts X264-encoded video, and the X264-encoded video includes key frame I frame and non-key frame P frame and B frame, wherein the key frame I frame retains more original data, and the P frame and B frame synthesize the current frame data according to the adjacent key frames, wherein the P frame tends to combine the previous key frame to synthesize the current frame, and the B frame tends to combine the subsequent key frame to synthesize the current frame. The present invention preferably uses the I frame in the video and the first B frame after the I frame as the key frames to process the video information, thereby reducing the amount of calculation in the video analysis and improving the efficiency of video recognition and processing.
[0047] The optical flow algorithm is used to predict the specific position of the target in the current frame. The optical flow map of the current frame and the previous frame is obtained according to the optical flow algorithm. The convolutional neural network is used to intercept the target optical flow map in the previous frame optical flow map, and the center point value (uc, vc) and the mode value (uz, vz) of the target position area corresponding to the optical flow map are obtained. The center point value is further weighted averaged, and the mean (um, vm) = C (uc, vc) + D (uz, vz), where C and D are the center value influencing parameters and the mode value influencing parameters of the corresponding target position area, respectively. It should be noted that the specific position of the target in the optical flow map and the specific posture, distance, and shape of the target will affect the values of parameters C and D, so the specific values of the influencing parameters C and D are set automatically or manually according to the actual situation.
[0048] For pedestrian targets, first take the feature vector to calculate the historical tracking pedestrian target hn and the current detected pedestrian target g n , calculate the cosine similarity between the historically tracked pedestrian targets and the currently detected pedestrian targets, further use the KM algorithm to match the currently detected pedestrian targets and the historically tracked pedestrian targets, and obtain the first matched pedestrian target set F1, the first unmatched detected pedestrian target set G1 and the first unmatched historically tracked pedestrian target set H1, and further set the pedestrian target cosine similarity threshold t1. In the first matched pedestrian target set, if the cosine similarity of two matching elements is less than the cosine similarity threshold, it can be judged that the two elements fail to match, and the two elements are deleted from the matched set, and are added to the first unmatched historically tracked pedestrian target set and the unmatched detected pedestrian target set, respectively.
[0049] For example, see Figure 3 , H is the set of historical tracked pedestrian targets to be matched, H=(h1, h2, h3, h4), h1-h4 are single historical tracked pedestrian targets to be matched respectively, G is the set of detected pedestrian targets to be matched, G=(g1, g2, g3, g4), g1-g4 are single detected pedestrian targets to be matched respectively, KM algorithm is used to match set H and set G, if h1 and g3 match, h4 and g4 match, then the unmatched elements in set H are h2 and h3, and the unmatched pedestrian targets in set G are g1 and g2, according to the feature vector, calculate the cosine similarity values of h1 and g3, h4 and g4 respectively, if the cosine similarity threshold is set to 0.8, and the cosine similarity values of h1 and g3 are 0.9, and the cosine similarity values of h4 and g4 are 0.1, then it can be judged that h4 and g4 are two elements that failed to match successfully, then Add g4 to g1 and g2 to form the first unmatched detected pedestrian target set G1, that is, G1=(g1, g2, g4), add h4 to h2 and h3 to form the first unmatched historical tracked pedestrian target H1=(h2, h3, h4), further, use the optical flow algorithm to predict the target position, and use the KM algorithm to match the first unmatched historical tracked pedestrian target and the first unmatched detected pedestrian target to obtain the second matched pedestrian target set, the second unmatched historical tracked pedestrian target set and the second unmatched detected pedestrian target set.
[0050] Specifically, if h3 and g2 match in the matching of the above H1 set and G1 set, the cosine similarity of h3 and g2 is calculated based on the feature vector. If it is greater than the cosine similarity threshold, it means that h3 and g2 are successfully matched, and the pedestrian target that successfully matched for the first time and the historically tracked pedestrian target that successfully matched for the second time are merged, that is, F2 = (g2, g3) as the pedestrian target that needs to be tracked and analyzed. If the historically tracked pedestrian target is not matched or fails to match twice, such as g1 and g4, it is removed from the historically tracked target set.
[0051] It should be noted that in other feasible embodiments of the present invention, if there are a sufficient number of historical tracking pedestrian target sets, after the second matching is completed for the pedestrian target that was not matched the first time, the result of the second successful matching can indicate that the target exists in the historical tracking target set. Therefore, the historical pedestrian target that successfully matched the second time can be directly processed as the target that needs to be tracked.
[0052] It is worth mentioning that the present invention further provides vehicle identification and tracking, wherein the target vehicle obtains image information of the vehicle through a convolutional neural network, and outputs attribute information of the target vehicle such as the model, location and color of the target vehicle, wherein the license plate number can be identified and obtained using OCR technology.
[0053] Furthermore, the identification and analysis of the target vehicle includes the following steps:
[0054] Establish a historical tracking vehicle target set A containing location information;
[0055] Establish a detection vehicle target set B containing feature vectors;
[0056] The predicted vehicle position information can be calculated based on the optical flow map, the historically tracked vehicle target can be obtained from the previous key frame, and the feature vector is obtained through convolutional neural network calculation.
[0057] Set the vehicle target detection frame in set A and set B, obtain the predicted position of the historically tracked vehicle target according to the optical flow algorithm, and establish the IOU matrix with the position of the vehicle target detected in the current frame, IOU=(a ∩ b) / ( a ∪ b), where a and b are the detection frame areas of the vehicle targets in set A and set B respectively, a ∩ b represents the intersection area of the vehicle targets in set A and the vehicle target detection area in set B, and a ∪ b represents the union area of the vehicle targets in set A and the vehicle target detection area in set B. Use the KM algorithm to match the target vehicles in set A and set B, that is, use the KM algorithm to match the historically tracked vehicle targets and the detected vehicle targets in the current frame, and obtain the first matched vehicle target set, the first unmatched historically tracked vehicle target set A1, and the first unmatched detected vehicle target B1. Set the IOU matrix similarity threshold t2. If the IOU matrix similarity in the first matched vehicle target set is less than t2, it means that the matching fails. The historical tracked vehicle targets and detected vehicle targets that failed to match are deleted from the matching set and added to set A1 and set B1 respectively.
[0058] For example, see Figure 4, set A = (a1, a2, a3, a4), set B = (b1, b2, b3, b4), according to the KM algorithm, obtain a1 and b1 matching, a2 and b2 matching, calculate the IOU of a1 and b1, a2 and b2 respectively, assuming that the IOU of a1 and b1 is less than the set IOU matrix similarity threshold, it is considered that a1 and b1 match failed, a1 and b1 are deleted from set A and set B, and added to the first unmatched historical tracking vehicle target and the first unmatched detection vehicle target respectively, that is, A1 = (a1, a3, a4), B1 = (b1, b3, b4), according to the optical flow Figure predicts the position of the detected vehicle target, and uses the KM algorithm to match the vehicle targets in the A1 and B1 sets to obtain the second matched vehicle target, the second unmatched historical tracking vehicle target, and the second unmatched detection vehicle target. For example, a3 and b3 are successfully matched for the second time, and the IOU value of a3 and b3 is greater than the IOU matrix similarity threshold, then delete the historical target vehicle a4 in the A set that failed to match the first and second times, and delete the historical tracking vehicle a1 in the A set that failed to match, and merge the historical tracking targets a2 and a3 that successfully matched twice as tracking target identification and analysis.
[0059] It should be noted that in other feasible embodiments of the present invention, if there are a sufficient number of historical tracking vehicle target sets, after the second matching is completed for the pedestrian target that was not matched the first time, the result of the second successful matching can indicate that the target exists in the historical tracking vehicle target set, and therefore the historical pedestrian target that successfully matched the second time can be directly processed as the target that needs to be tracked.
[0060] It should be noted that after completing the identification and tracking of pedestrian targets, the present invention can use face recognition technology and human posture recognition technology to analyze the identity and movements of the target pedestrian, or further analyze and process the information in the video based on the present invention, such as emergency event identification (fire). These technologies are all existing technologies and can be used as applications of the present invention. It can be understood that the application of the above-mentioned existing technologies in the present invention is not a limitation of the present invention.
[0061] In the matching process, the present invention preferably introduces weights into the KM algorithm, and the specific steps are as follows:
[0062] First, assign values to each bipartite graph vertex, assign the left vertex to the maximum weight of the edge connected to it, and the right vertex to 0;
[0063] Match the edge with the same connection weight as the left side. If no edge match is found, subtract d from the top marks of all left vertices of this path and add d to the top marks of all right vertices. Preferably, the parameter d is set to 0.1 in the present invention.
[0064] When the expected value drops to 0, the match is abandoned and an unmatched set is obtained.
[0065] By introducing weights, the same object can be matched to the maximum extent.
[0066] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with 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), an 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 above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. 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 computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0067] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0068] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.
Claims
1. A campus brain perception method based on video content analysis, characterized in that: The steps include: Get the I frame in the video and the first B frame after the I frame as the key frames; A convolutional neural network is used to obtain the detection target of the key frame, and the target position, category and feature vector of the key frame are calculated; Calculate the optical flow map of the current key frame and the previous frame according to the optical flow algorithm to obtain the predicted position of the target in the current key frame; The cosine similarity between the currently detected pedestrian target and the historically tracked pedestrian target is calculated based on the feature vector, and the KM algorithm is used to calculate the complete matching of the bipartite graph of the currently detected pedestrian target and the historically tracked pedestrian target, and the first matched pedestrian target set, the first unmatched historically tracked pedestrian target set, and the first unmatched detected pedestrian target set are obtained; According to the calculated cosine similarity of pedestrian targets, the dissimilar elements in the first matching pedestrian target set are eliminated; According to the pedestrian target matching position predicted by the optical flow algorithm, the KM algorithm is used to match the historical tracked pedestrian targets that were not matched for the first time and the detected pedestrian targets that were not matched for the first time, and the second matching pedestrian target set, the second unmatched historical tracked pedestrian targets and the second unmatched detected pedestrian targets are obtained.
2. The campus brain perception method based on video content analysis according to claim 1 is characterized in that: A pedestrian target cosine similarity threshold is set. If the pedestrian target cosine similarity in the first matched pedestrian target set is less than the pedestrian target cosine similarity threshold, the pedestrian target is removed from the first matched pedestrian target set, and the pedestrian target is added to the first unmatched historical tracking pedestrian target set and the first unmatched detected pedestrian target set.
3. The campus brain perception method based on video content analysis according to claim 2 is characterized in that: The matching position of the current frame is calculated according to the optical flow algorithm, and the historical tracked pedestrian targets that were not matched for the first time and the detected pedestrian targets that were not matched for the first time are matched to obtain the pedestrian target set for the second time, the historical tracked pedestrian target set that was not matched for the second time, and the detected pedestrian target set that was not matched for the second time.
4. The campus brain perception method based on video content analysis according to claim 3 is characterized in that: The pedestrian target sets that are successfully matched for the first and second times are merged as the successfully tracked pedestrian target set, and the status of the successfully matched pedestrian target is updated, the historically tracked pedestrian target that is not matched or fails to match for the second time is deleted, and the detected pedestrian target that is not successfully matched for the second time is added as a new tracked pedestrian target to the historically tracked pedestrian target set.
5. The campus brain perception method based on video content analysis according to claim 1 is characterized in that: According to the convolutional neural network, the detection targets of the vehicle category are obtained, and a historical tracking vehicle set A containing feature vectors and target position information is established, and a current detection vehicle target set C containing feature vectors and target position information is established. The target position overlap between set A and set C is calculated according to the intersection-over-union function IOU, where IOU = (A ∩ C) / (A ∪ C), using the KM algorithm to match the targets in set A and set C to obtain the first matched vehicle target set, the first unmatched detected vehicle target set, and the first unmatched historically tracked vehicle target set, set the IOU threshold of the historically tracked vehicle target and the currently detected vehicle target, if the IOU value between the first matched vehicle targets is less than the IOU threshold, then the vehicle target is removed from the first matched vehicle target set, and the matching of the vehicle target is added to the first unmatched detected vehicle target set and the first unmatched historically tracked vehicle target set respectively, calculate the cosine similarity of the feature vectors corresponding to the vehicle targets between the first unmatched detected vehicle target set and the first unmatched historically tracked vehicle target set according to the vector cosine function, match the first unmatched detected vehicle target set and the first unmatched historically tracked vehicle target set according to the KM algorithm, and obtain the second matched vehicle target set, the second unmatched historically tracked vehicle target set, and the second unmatched detected vehicle target set.
6. The campus brain perception method based on video content analysis according to claim 5 is characterized in that: The first matched vehicle target set and the second matched vehicle target set are merged as the matched vehicle tracking target set. If there are still historically tracked vehicle targets that have not been successfully matched in the second vehicle target matching, the vehicle target will be removed from the historical tracking target set, and the second unmatched detected vehicle target will be added to the historical tracking target set as a new historically tracked vehicle target.
7. The campus brain perception method based on video content analysis according to claim 6 is characterized in that: The historical vehicle tracking targets and vehicle detection targets that were matched successfully for the first and second times are merged as the tracking vehicle targets, and the status information of the tracking vehicle targets is updated in the historical tracking target set. The historical tracking vehicle targets that were not matched successfully for the second time are deleted, and the vehicle detection targets that were still not matched successfully for the second time are added as new tracking vehicle targets to the historical tracking vehicle target set.
8. The campus brain perception method based on video content analysis according to claim 1 is characterized in that: According to the optical flow algorithm, the optical flow map of the current frame and the previous frame of the current frame is calculated, the center point position of the historical tracking target position area is obtained, and the target position of the historical tracking target in the current frame is updated according to the optical flow map. If the center position of the historical tracking target is not in the current frame range, the historical tracking target is deleted.
9. The campus brain perception method based on video content analysis according to claim 8 is characterized in that: According to the optical flow map, the center value (uc, vc) and the mode value (uz, vz) of the corresponding target position area are obtained, and the mean (um, vm) = D (uc, vc) + E (uz, vz) is calculated, where D and E are the weighted values of the center value and the mode value of the corresponding target position area in the optical flow map, respectively. The current target position is predicted to be: (x+um, y+vm), where x and y are the horizontal and vertical coordinates of the image, respectively.
10. A campus brain perception system based on video content analysis, the system is operated by the campus brain perception method based on video content analysis according to any one of claims 1 to 9, characterized in that: include: Video acquisition module; Analysis and processing module; Alarm module; The video acquisition module acquires video information, transmits the video information to the analysis and processing module to identify vehicles and pedestrians, is used to identify dangerous information of pedestrians and vehicles, and drives the alarm module to send alarm information.
Citation Information
Patent Citations
Target tracking method, target tracking device and target tracking equipment
CN110163889A
Target tracking method and device, terminal equipment and medium
CN111145214A
