Intelligent video analysis method and device based on target detection and large model

By combining target detection and large-scale language models, the key features of the target in the video are extracted and detailed behavior explanations are generated, which solves the problem of inability to analyze the target behavior in depth with existing technologies and achieves intelligent analysis and interpretation of the target behavior in the video. It is suitable for Various scenarios and application requirements.

CN118840700AInactive Publication Date: 2024-10-25JIANGSU ZHENGFANG TRANSPORTATION TECH CO LTD

Patent Information

Application Number
CN202411333862.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-10-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing video analysis technology is difficult to conduct in-depth analysis and explanation of the behavior and intentions of the target in the video, and can only provide location information of the target.

Method used

Intelligent video analysis methods based on target detection and large models are used to identify target information through target detection algorithms, target tracking algorithms track target locations, and input key features into large language models to generate detailed behavioral explanations.

Benefits of technology

It realizes real-time detection, tracking and behavioral interpretation of targets in videos, captures the spatio-temporal characteristics of target behaviors, and generates natural, smooth and detailed explanations, which is convenient for human understanding and decision-making, and has good versatility and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118840700A_ABST
    Figure CN118840700A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent video analysis method and device based on target detection and a large model in the technical field of video processing. The method comprises the following steps: acquiring a video data stream to be analyzed; performing target detection on each data frame in the video data stream based on a target detection algorithm, and identifying target object information; performing target tracking on the target object in each data frame based on a target tracking algorithm, and identifying the position of the target object; performing storage and key feature extraction on the target object information, the target object position and the timestamp of the data frame; and inputting the key features into a large-scale language model, obtaining behavior interpretation of the target object and outputting the behavior interpretation. According to the method, the target detection and tracking technology is combined with a large language model, so that the crossing from low-level visual features to high-level semantic understanding is realized, and a new direction is opened up for intelligent analysis and application of video data. The system has good universality and expansibility, and can be suitable for various scenes and application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video processing technology, and in particular to an intelligent video analysis method and device based on target detection and large models. Background Art

[0002] With the widespread application of video surveillance systems, how to quickly and accurately extract valuable information from massive video data has become an important research topic. Current video analysis technologies mainly focus on target detection and target tracking, which can achieve real-time positioning and tracking of targets in videos. However, these technologies can often only provide the location information of the target, and cannot conduct in-depth analysis and interpretation of the target's behavior and intentions. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide an intelligent video analysis method and device based on target detection and large models, which can realize real-time detection and tracking of targets in videos and generate detailed behavior explanations based on target trajectories.

[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions: In a first aspect, the present invention provides an intelligent video analysis method based on target detection and a large model, comprising: Obtain the video data stream to be analyzed; Performing target detection on each data frame in the video data stream based on a target detection algorithm to identify target object information; Tracking the target object in each of the data frames based on a target tracking algorithm to identify the position of the target object; Storing and extracting key features of the target object information, the target object position and the timestamp of the data frame; The key features are input into a large language model to obtain and output the behavior interpretation of the target object.

[0005] Optionally, the step of obtaining the video data stream to be analyzed further includes: The acquired video data stream is adjusted in resolution and converted in frame rate according to the preset resolution and frame rate.

[0006] Optionally, the video data stream includes a real-time video data stream and a pre-recorded video data stream; if the real-time video data stream is used, a buffering mechanism is used to cache the real-time video data stream.

[0007] Optionally, the target detection algorithm adopts the YOLOv5 algorithm of deep learning, uses a sliding window to slide and capture the data frame, and inputs the YOLOv5 algorithm for target detection; the target object information includes the category of the target object and the bounding box coordinates of the target object on the data frame.

[0008] Optionally, the target tracking algorithm adopts the DeepSORT algorithm, and in the target tracking stage of the DeepSORT algorithm, Kalman filtering is used for trajectory prediction.

[0009] Optionally, the storing and extracting key features of the target object information, the target object position and the timestamp of the data frame includes: Generate an original trajectory of the target object according to the position of the target object and the timestamp of the data frame; Use Kalman filtering to smooth the original trajectory of the target object, remove noise and abnormal points, and generate a smooth trajectory of the target object; Determine the moving speed and moving direction of the target object according to the smooth trajectory of the target object, and set the point where the moving speed or moving direction of the target object is greater than the corresponding preset threshold as the segmentation point; The smooth trajectory of the target object is divided into a plurality of sub-trajectories by the segmentation points, and key features are extracted from each of the sub-trajectories.

[0010] Optionally, the key features include the duration, average speed, maximum speed, acceleration, movement direction, trajectory curvature, stop point, interaction information, and scene information of the target object on the sub-trajectory.

[0011] Optionally, the large language model adopts GPT4o-mini as a base model and is optimized for video analysis tasks through fine-tuning.

[0012] Optionally, obtaining the target object's behavior interpretation and outputting it includes: Convert the target's behavior interpretation into text, audio, video or picture format for output.

[0013] In a second aspect, the present invention provides an intelligent video analysis device based on target detection and a large model, the analysis device comprising: A data acquisition module, configured to acquire a video data stream to be analyzed; The target object recognition module is configured to perform target detection on each data frame in the video data stream based on a target detection algorithm to identify target object information; A position identification module is configured to track the target object in each of the data frames based on a target tracking algorithm to identify the position of the target object; A feature extraction module is configured to store and extract key features of the target object information, the target object position and the timestamp of the data frame; The explanation generation module is configured to input the key features into a large language model, obtain the behavior explanation of the target object and output it.

[0014] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides an intelligent video analysis method and device based on target detection and large models, which realize the organic combination of target detection, tracking and large language models, and can intelligently analyze and interpret the behavior of the target in the video; by recording and analyzing the target trajectory, the temporal and spatial characteristics of the target behavior can be captured, providing rich contextual information for the behavior interpretation; by utilizing the powerful generation ability of the large language model, a natural, fluent and detailed behavior interpretation can be generated, which is convenient for human understanding and decision-making; at the same time, it has good versatility and scalability, and can be applied to a variety of scenarios and application requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of an intelligent video analysis method based on target detection and a large model provided by an embodiment of the present invention; Figure 2 It is a flowchart of an intelligent video analysis method based on target detection and a large model corresponding to a specific implementation method provided in an embodiment of the present invention; Figure 3 is a schematic diagram of a character trajectory in a specific example provided by an embodiment of the present invention; Figure 4 is a schematic diagram of extracting key features of a person's trajectory in a specific example provided by an embodiment of the present invention; Figure 5 is a schematic diagram of behavior interpretation generation in a specific example provided by an embodiment of the present invention; Figure 6 It is a structural diagram of an intelligent video analysis device based on target detection and a large model corresponding to the specific implementation method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0017] Embodiment 1:

[0018] like Figure 1 As shown, the present invention provides an intelligent video analysis method based on target detection and large models, comprising the following steps: Step S1: Obtain the video data stream to be analyzed.

[0019] Specifically in this embodiment, obtaining the video data stream to be analyzed further includes: The obtained video data stream is adjusted in resolution and converted in frame rate according to the preset resolution and frame rate, and the subsequent processing of the video data stream is facilitated by the resolution adjustment and frame rate conversion.

[0020] Video data streams include real-time video data streams and pre-recorded video data streams. If real-time video data streams are used, a buffer mechanism is used to cache the real-time video data stream to ensure data continuity and real-time performance. At the same time, video data streams support a variety of common video formats, such as MP4, AVI, MOV, etc.

[0021] Step S2: Perform target detection on each data frame in the video data stream based on a target detection algorithm to identify target object information.

[0022] Specifically in this embodiment, the target detection algorithm adopts the YOLOv5 algorithm of deep learning, which has high detection accuracy and real-time performance. A sliding window is used to slide the data frame and input it into the YOLOv5 algorithm for target detection; the target information includes the category of the target (such as people, vehicles, animals, etc.) and the bounding box coordinates (x, y, width, height) of the target on the data frame, where x, y are the corner coordinates of the bounding box, and width, height are the width and height of the bounding box.

[0023] Step S3: Track the target in each data frame based on the target tracking algorithm to identify the position of the target.

[0024] Specifically in this embodiment, the target tracking algorithm adopts the DeepSORT algorithm. In the target tracking stage of the DeepSORT algorithm, the Kalman filter is used for trajectory prediction.

[0025] By combining deep learning feature extraction (step S2) and Kalman filtering, it is possible to effectively handle complex situations such as target occlusion and scale changes. During the tracking process, the system assigns a unique ID to each target and records the location information of the target in each frame of data.

[0026] Step S4: storing the target information, target position and the timestamp of the data frame and extracting key features.

[0027] Specifically in this embodiment, the stored data structure is such as: "{"timestamp": 1623456789, "x": 100, "y": 200, "width": 50, "height": 100}". In order to improve storage and query efficiency, the system adopts spatiotemporal indexing technology, which can quickly retrieve trajectory data within a specific time period or spatial range.

[0028] Specifically in this embodiment, key feature extraction includes: Step S401, generating an original trajectory of the target object according to the position of the target object and the timestamp of the data frame; Step S402: Use Kalman filtering to smooth the original trajectory of the target object, remove noise and abnormal points, and generate a smooth trajectory of the target object; Step S403, determining the moving speed and moving direction of the target object according to the smooth trajectory of the target object, and setting the point where the moving speed or moving direction of the target object is greater than the corresponding preset threshold as the segmentation point; Step S404: segment the smooth trajectory of the target object into multiple sub-trajectories by segmentation points, and extract key features from each sub-trajectory.

[0029] Key features include the duration of the target object on the sub-track, average speed, maximum speed, acceleration, direction of movement, track curvature, stop point, interaction information, and scene information. Specifically, the stop point can be set to the position where the speed is lower than the preset speed threshold, and the interaction information can be set to the target object approaching, moving away from, or following other targets. The scene information such as roads and buildings can be comprehensively judged based on the previous and next sub-tracks. The above key features can be flexibly adjusted according to user needs.

[0030] In addition to key features, abnormal behaviors in trajectories can also be detected based on statistical models or machine learning methods.

[0031] Step S5: Input the key features into the large language model, obtain the behavior explanation of the target object and output it.

[0032] Specifically in this embodiment, the large language model uses GPT4o-mini as the basic model and is optimized for the video analysis task through fine-tuning.

[0033] Behavioral explanations include but are not limited to: Description of the target's motion state (such as walking, running, staying, etc.), motion path characteristics (such as straight line, turning, detour, etc.), speed and acceleration changes, interaction with other targets or environments, possible intention or purpose speculation, description and analysis of abnormal behavior.

[0034] Obtaining the behavior explanation of the target object and outputting the following: The target object's behavior interpretation is converted into text (detailed natural language description), audio (converting text into speech, suitable for real-time monitoring scenarios), video (combining trajectory playback and text description to intuitively display the target behavior) or picture output.

[0035] In combination with the above specific implementation methods, the intelligent video analysis method based on target detection and large model is as follows Figure 2 shown.

[0036] like Figures 3 to 5 As shown, the working process of this embodiment is described below by a specific example: When the character leaves the screen, the system analyzes its complete trajectory. The trajectory analysis results are as follows: Duration: 120 seconds Average speed: 1.2 m / s Maximum speed: 2.5 m / s Acceleration: Little change, mostly stable Movement direction: generally eastward, with multiple turns in the middle Track curvature: Medium, with many turns Stop points: 3, each stop time is about 10 seconds Interaction: Briefly approach 2 other character targets Abnormalities: No obvious abnormalities Scene information: Passed by the clothing area, electronics area and cashier counter The system feeds these features into a large language model to generate the following explanation of the behavior: "The person was active in the mall for 120 seconds (t=120s). He moved in the mall at a normal walking speed (average 1.2 m / s), with the overall direction facing east. On the way, he briefly stopped at three different locations (stop 1, stop 2, stop 3), each for about 10 seconds, probably to check out the merchandise. His path showed that he first visited the clothing area, then turned to the electronics area, and finally came to the cashier. During the movement, he changed direction several times, probably looking for specific merchandise or browsing different areas. His speed remained stable most of the time, without abnormally fast movements or sudden stops. During the journey, he briefly approached two other people, probably for brief exchanges with other customers or store clerks (interaction 1, interaction 2). P1-P6 are events Nodes, with the entrance of the mall as the initial time t=0s, enter event node P1, t=20s, enter event node P2, t=40s, enter event node P3, t=60s, enter event node P4, t=80s, enter event node P5, t=100s, enter event node P6, and leave the mall at t=120s. Stopping occurred at event nodes P2, P4, and P6, with the locations being stop point 1, stop point 2, and stop point 3; interaction occurred at event nodes P3 and P5, namely interaction 1 and interaction 2. Overall, this person's behavior pattern conforms to typical shopping behavior. He seems to be browsing the goods purposefully and may be ready to check out at the end. No abnormal or suspicious behavior patterns were observed. " This example shows how the system can transform raw trajectory data into meaningful behavior descriptions, providing intuitive and detailed information for monitors or managers.

[0037] Embodiment 2:

[0038] The embodiment of the present invention provides an intelligent video analysis device based on target detection and a large model, the analysis device comprising: A data acquisition module, configured to acquire a video data stream to be analyzed; The target object recognition module is configured to perform target detection on each data frame in the video data stream based on the target detection algorithm to identify the target object information; A position identification module is configured to track the target in each data frame based on a target tracking algorithm and identify the position of the target; A feature extraction module is configured to store and extract key features of target object information, target object location, and timestamp of data frame; The explanation generation module is configured to input key features into a large language model, obtain the behavior explanation of the target object and output it.

[0039] like Figure 6 As shown, this embodiment can be expanded into: video input module, target detection module, target tracking module, trajectory storage module, trajectory analysis module, large language model, and output module when applied.

[0040] This invention combines object detection, object tracking and large language models to achieve a leap from low-level visual features to high-level semantic understanding, opening up a new direction for the intelligent analysis and application of video data. The modular design and scalable architecture of the system enable it to adapt to the needs of different scenarios and be continuously optimized and upgraded with the advancement of technology.

[0041] The intelligent video analysis system of the present invention is expected to have an important impact in many fields such as security, retail, medical care, and transportation, and contribute to the intelligent development of society. With the continuous advancement of technology and the expansion of application scenarios, the system will provide users with more intelligent, efficient, and reliable video analysis solutions, and promote the in-depth development of computer vision and artificial intelligence technologies in practical applications.

[0042] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0043] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0044] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0045] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0046] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An intelligent video analysis method based on target detection and large models, characterized in that: include: Obtain the video data stream to be analyzed; Performing target detection on each data frame in the video data stream based on a target detection algorithm to identify target object information; Tracking the target object in each of the data frames based on a target tracking algorithm to identify the position of the target object; Storing and extracting key features of the target object information, the target object position and the timestamp of the data frame; The key features are input into a large language model to obtain and output the behavior interpretation of the target object.

2. The intelligent video analysis method based on target detection and large model according to claim 1 is characterized in that: The obtaining of the video data stream to be analyzed further comprises: The acquired video data stream is adjusted in resolution and converted in frame rate according to the preset resolution and frame rate.

3. The intelligent video analysis method based on target detection and large model according to claim 1 is characterized in that: The video data stream includes a real-time video data stream and a pre-recorded video data stream; If a real-time video data stream is used, a buffer mechanism is used to cache the real-time video data stream.

4. The intelligent video analysis method based on target detection and large model according to claim 1 is characterized in that: The target detection algorithm adopts the YOLOv5 algorithm of deep learning, uses a sliding window to slide and capture data frames, and inputs the YOLOv5 algorithm for target detection; the target object information includes the category of the target object and the bounding box coordinates of the target object on the data frame.

5. The intelligent video analysis method based on target detection and large model according to claim 1 is characterized in that: The target tracking algorithm adopts the DeepSORT algorithm. In the target tracking stage of the DeepSORT algorithm, the Kalman filter is used for trajectory prediction.

6. The intelligent video analysis method based on target detection and large model according to claim 1 is characterized in that: The storing and key feature extraction of the target object information, the target object position and the timestamp of the data frame includes: Generate an original trajectory of the target object according to the position of the target object and the timestamp of the data frame; Use Kalman filtering to smooth the original trajectory of the target object, remove noise and abnormal points, and generate a smooth trajectory of the target object; Determine the moving speed and moving direction of the target object according to the smooth trajectory of the target object, and set the point where the moving speed or moving direction of the target object is greater than the corresponding preset threshold as the segmentation point; The smooth trajectory of the target object is divided into a plurality of sub-trajectories by the segmentation points, and key features are extracted from each of the sub-trajectories.

7. The intelligent video analysis method based on target detection and large model according to claim 6 is characterized in that: The key features include the duration, average speed, maximum speed, acceleration, movement direction, trajectory curvature, stop points, interaction information, and scene information of the target object on the sub-trajectory.

8. The intelligent video analysis method based on target detection and large model according to claim 6 is characterized in that: The large language model uses GPT4o-mini as the base model and is optimized for video analysis tasks through fine-tuning.

9. The intelligent video analysis method based on target detection and large model according to claim 1 is characterized in that: The obtaining and outputting of the behavior interpretation of the target object includes: Convert the target's behavior interpretation into text, audio, video or picture format for output.

10. An intelligent video analysis device based on target detection and large models, characterized in that: The analysis device comprises: A data acquisition module, configured to acquire a video data stream to be analyzed; The target object recognition module is configured to perform target detection on each data frame in the video data stream based on a target detection algorithm to identify target object information; A position identification module is configured to track the target in each of the data frames based on a target tracking algorithm to identify the position of the target; A feature extraction module is configured to store and extract key features of the target object information, the target object position and the timestamp of the data frame; The explanation generation module is configured to input the key features into a large language model, obtain the behavior explanation of the target object and output it.

Citation Information

Patent Citations

  • Underground personnel running abnormal behavior detection method based on trajectory analysis

    CN111291735A

  • Video-based public safety incident prediction system and method therefor

    US20230360402A1

Cited By

  • Evaluation test method of multi-modal chart question and answer large model, medium and equipment

    CN119760369A