Target tracking method and system, medium and electronic equipment

Through the combination of frame feature matrix, target text feature and pixel-level matrix, a predictive feature matrix is ​​generated for target tracking, which solves the problem of poor target tracking in complex environments and achieves efficient tracking of predefined targets with text prompts.

CN118587624APending Publication Date: 2024-09-03SHANGHAI MIDU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410577451.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing target tracking technology has unsatisfactory tracking results in complex environments such as target deformation, rotation or occlusion during movement, especially when predefined targets with text prompts have poor tracking results.

Method used

By obtaining the frame feature matrix and target text features of the video to be detected, the pixel-level matrix is ​​calculated, and the prediction feature matrix and target text features are used for target tracking, and the prediction box set is screened based on the similarity vector to achieve accurate target tracking.

Benefits of technology

It effectively improves the tracking accuracy and stability of predefined targets with text prompts, and can maintain efficient target tracking performance in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587624A
    Figure CN118587624A
Patent Text Reader

Abstract

The invention provides a target tracking method and system, a medium and electronic equipment. The method comprises the following steps: acquiring a to-be-detected video and a target text prompt; acquiring a frame feature matrix based on the to-be-detected video; obtaining a target text feature based on the target text prompt; obtaining a pixel-level matrix based on the frame feature matrix and the target text features; obtaining a prediction feature matrix according to the frame feature matrix, the target text prompt and the pixel-level matrix; and performing target tracking based on the prediction feature matrix and the target text features. According to the technical scheme, video target tracking can be carried out on the custom target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target tracking technology, and in particular to a target tracking method and system, medium and electronic equipment. Background Art

[0002] Object tracking technology is an important research direction in the field of computer vision, which involves continuously locating and tracking the positions of one or more objects of interest in a video sequence. This technology has a wide range of applications in security monitoring, human-computer interaction, autonomous driving, video analysis and many other fields.

[0003] In general, the development of target tracking technology continues to promote progress in related fields. It not only improves the level of automation of data processing, but also provides strong technical support for various practical applications. With the continuous optimization of algorithms and the development of new technologies, target tracking in the future will be more accurate, faster and more intelligent.

[0004] However, the tracking of the intended target of the text prompt is not ideal due to the fact that the target may deform, rotate, or be partially blocked or in a complex environment during movement. Summary of the invention

[0005] The purpose of the present application is to provide a target tracking method and system, a medium and an electronic device, which are used to solve the technical problem that the tracking effect of a predefined target of a text prompt is not ideal.

[0006] In a first aspect, the present application provides a target tracking method, the method comprising: obtaining a video to be detected and a target text prompt; obtaining a frame feature matrix based on the video to be detected; obtaining target text features based on the target text prompt; obtaining a pixel-level matrix based on the frame feature matrix and the target text features; obtaining a predicted feature matrix based on the frame feature matrix, the target text prompt and the pixel-level matrix; and tracking the target based on the predicted feature matrix and the target text features.

[0007] In an implementation of the first aspect, obtaining a frame feature matrix based on the video to be detected includes: deframing the video to be detected at a preset frame rate to obtain a set of frames to be detected; and extracting features from the set of frames to be detected to obtain a frame feature matrix.

[0008] In an implementation of the first aspect, obtaining a pixel-level matrix based on the frame feature matrix and the target text feature includes: performing matrix multiplication on the frame feature matrix and the target text feature to obtain a pixel-level matrix; the pixel-level matrix has a shape of (N, 1080, 1080), where N represents the number of frames and (1080, 1080) represents the frame size.

[0009] In an implementation of the first aspect, obtaining a predicted feature matrix based on the frame feature matrix, the target text prompt and the pixel-level matrix includes: setting the input text to {the video frame is [x], please find the position and features of [z] based on [y]}; wherein x is all matrix values ​​in the frame feature matrix, y is all matrix values ​​in the pixel-level matrix, and z is the target text prompt; all matrix values ​​in the frame feature matrix, all matrix values ​​in the pixel-level matrix and the target text prompt are input into a large language model according to the input text to obtain a predicted feature matrix.

[0010] In an implementation of the first aspect, target tracking based on the prediction feature matrix and the target text features includes: obtaining a prediction box set based on the prediction feature matrix; obtaining a similarity vector based on the prediction feature matrix and the target text features; and filtering the prediction box set according to the similarity vector to perform target tracking.

[0011] In an implementation of the first aspect, obtaining a similarity vector based on the prediction feature matrix and the target text feature includes: obtaining a frame vector based on the prediction feature matrix; and obtaining a similarity vector based on the frame vector and the target text feature.

[0012] In an implementation of the first aspect, the similarity vector represents a vector of N elements, the value of the similarity vector is between 0 and 1, and filtering the prediction frame set according to the similarity vector to perform target tracking includes: filtering the value of the similarity vector according to a preset threshold to obtain an available frame; filtering the prediction frame set according to the available frame to obtain a prediction frame corresponding to the target text prompt to achieve target tracking.

[0013] In the second aspect, the present application provides a target tracking system, which includes: a first acquisition module, used to acquire a video to be detected and a target text prompt; a second acquisition module, used to acquire a frame feature matrix based on the video to be detected; a third acquisition module, used to acquire target text features based on the target text prompt; a first processing module, used to acquire a pixel-level matrix based on the frame feature matrix and the target text features; a second processing module, used to acquire a predicted feature matrix based on the frame feature matrix, the target text prompt and the pixel-level matrix; and a tracking module, used to track the target based on the predicted feature matrix and the target text features.

[0014] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by an electronic device, the target tracking method described in any one of the first aspects of the present application is implemented.

[0015] In a fourth aspect, the present application provides an electronic device comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, so that the electronic device performs the target tracking method described in any one of the first aspects of the present application.

[0016] According to the target tracking method and system, medium and electronic device of the present application, a pixel-level matrix and a predicted feature matrix are obtained based on a frame feature matrix and target text features, and target tracking is performed based on the predicted feature matrix and target text features, which can effectively realize the tracking of predefined targets of text prompts. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Shown is a schematic diagram of a scene of an electronic device in an embodiment of the present application.

[0018] Figure 2 Shown is a flowchart of a target tracking method described in the present application in one embodiment.

[0019] Figure 3 Shown is a schematic diagram of a flow chart of obtaining a frame feature matrix in an embodiment of the present application.

[0020] Figure 4 Shown is a schematic diagram of a flow chart of obtaining a prediction feature matrix in an embodiment of the present application.

[0021] Figure 5 Shown is a flowchart of target tracking in one embodiment of the present application.

[0022] Figure 6 Shown is a schematic diagram of the process of obtaining a similarity vector in one embodiment of the present application.

[0023] Figure 7 Shown is a flow chart of selecting a set of prediction boxes according to a similarity vector to perform target tracking in an embodiment of the present application.

[0024] Figure 8 Shown is a flowchart of another embodiment of the target tracking method described in the present application.

[0025] Fig. 9 Shown is a schematic structural diagram of a target tracking system described in the present application in one embodiment.

[0026] Fig.10 Shown is a schematic diagram of the structure of an electronic device described in an embodiment of the present application.

[0027] Component number description

[0028] 11. Cell Phone

[0029] 12 Tablet

[0030] 13 Laptop

[0031] 900 Target Tracking System

[0032] 910 First Acquisition Module

[0033] 920 Second acquisition module

[0034] 930 The third acquisition module

[0035] 940 First processing module

[0036] 950 Second processing module

[0037] 960 Tracking Module

[0038] 101 Processing Unit

[0039] 102 Memory

[0040] 1021 Random Access Memory

[0041] 1022 Cache memory

[0042] 1023 Storage System

[0043] 1024 Programs / Utilities

[0044] 1025 Program Modules

[0045] 103 Bus

[0046] 104 Input / Output Interface

[0047] 105 Network Adapter

[0048] Steps S1 to S6

[0049] Steps S21 to S22

[0050] Steps S51 to S52

[0051] Steps S61 to S63

[0052] Steps S621 to S622

[0053] Steps S631 to S632 DETAILED DESCRIPTION

[0054] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0055] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0056] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0057] The following embodiments of the present application provide a target tracking method and system, a medium and an electronic device, which obtain a pixel-level matrix and a prediction feature matrix through a frame feature matrix and target text features, and perform target tracking based on the prediction feature matrix and target text features, thereby effectively realizing the tracking of predefined targets of text prompts.

[0058] The target tracking method of the present application can be applied to Figure 1 The electronic device described in this application may include a mobile phone 11 with wireless charging function, a tablet computer 12, a laptop computer 13, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiments of this application do not impose any restrictions on the specific types of electronic devices.

[0059] For example, the electronic device may be a station (STAION, ST) in a WLAN with a wireless charging function, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with a wireless charging function, a computing device or other processing device, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating on a wireless system and a next generation communication system, such as a mobile terminal in a 5G network, a mobile terminal in a future evolved Public Land Mobile Network (PLMN), or a mobile terminal in a future evolved Non-terrestrial Network (NTN), etc.

[0060] For example, the electronic device can communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobilecommunication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS) and / or Satellite Based Augmentation Systems (SBAS).

[0061] The principles and implementation methods of the target tracking method and system, medium and electronic device described in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings, so that those skilled in the art can understand the target tracking method and system, medium and electronic device of the embodiments without creative work.

[0062] See also Figure 2 , which is a flow chart of a target tracking method provided by an embodiment of the present application. Figure 2 As shown, the target tracking method includes the following steps S1 to S6.

[0063] Step S1, obtaining the video to be detected and the target text prompt.

[0064] Specifically, a video to be detected shot by a camera or other shooting device is obtained, as well as a target text prompt that needs to be tracked, such as "a man in black carrying a black bag".

[0065] In one embodiment, a video to be detected with a duration of N seconds is obtained, and for the video to be detected, it is necessary to track the target of "the man in black carrying a black bag" in the video to be detected.

[0066] Step S2: obtaining a frame feature matrix based on the video to be detected.

[0067] In some implementations, obtaining a frame feature matrix based on the video to be detected includes: deframing the video to be detected at a preset frame rate to obtain a set of frames to be detected; and extracting features from the set of frames to be detected to obtain a frame feature matrix.

[0068] like Figure 3 As shown, obtaining the frame feature matrix includes the following steps S21 to S22.

[0069] S21. De-frame the video to be detected according to a preset frame rate to obtain a set of frames to be detected.

[0070] Specifically, the video to be detected is deframed according to a preset frame rate.

[0071] In one embodiment, for the to-be-detected video with a duration of N seconds, the preset frame rate is set to 1 frame per second, and the to-be-detected video with a duration of N seconds is split into a to-be-detected frame set of N frames.

[0072] Optionally, if the preset frame rate is set to 2 frames per second, the video to be detected with a duration of N seconds can be divided into a set of 2N frames to be detected.

[0073] It should be noted that the preset frame rate can be adjusted according to actual conditions and is not a unique fixed value.

[0074] S22: extracting features from the set of frames to be detected to obtain a frame feature matrix.

[0075] In one embodiment, for the set of frames to be detected comprising N frames, feature extraction is performed through the VIT model and L2 regularization is performed to obtain a frame feature matrix with a shape of (N, 1080, 1080, 512) to prevent overfitting through the VIT model and enhance the generalization ability of the VIT model.

[0076] Where N represents the number of frames and the position of the frames. For a set of frames to be detected that contains N frames, each frame is sorted in time sequence; for example, a set of frames to be detected that contains 5 frames, where the first frame sorted in time sequence is numbered 0 and the last frame is numbered 4; then for a set of frames to be detected that contains N frames, the first frame is numbered 0 and the last frame is numbered N-1.

[0077] Among them, 1080 represents the resolution of the video to be detected, and 512 represents the number of elements.

[0078] It should be noted that the VIT model (Vision Transformer) is a model based on the original Transformer architecture, which processes images into serialized patches, and then converts these patches into vectors and inputs them into the Transformer. The VIT model captures contextual dependencies in images through a self-attention mechanism and a feedforward neural network layer.

[0079] Step S3: acquiring target text features based on the target text prompt.

[0080] Specifically, the acquired target text prompt is subjected to feature extraction and L2 regularization through a text encoder to obtain the target text feature.

[0081] The target text feature is a vector containing 512 elements.

[0082] Preferably, the target text features are obtained through a text encoder and L2 regularization of CLIP.

[0083] Step S4: obtaining a pixel-level matrix based on the frame feature matrix and the target text feature.

[0084] Specifically, matrix multiplication is performed on the frame feature matrix and the target text feature to obtain a pixel-level matrix; the pixel-level matrix has a shape of (N, 1080, 1080), where N represents the number of frames and (1080, 1080) represents the frame size.

[0085] The element (pixel) value in the pixel-level matrix is ​​between 0 and 1, indicating the degree of matching between each element (pixel) and the target text prompt. The larger the element (pixel) value, the higher the degree of matching between each element (pixel) and the target text prompt.

[0086] Step S5, obtaining a predicted feature matrix according to the frame feature matrix, the target text prompt and the pixel level matrix.

[0087] In some implementations, obtaining a predicted feature matrix based on the frame feature matrix, the target text prompt, and the pixel-level matrix includes: setting the input text to {the video frame is [x], please find the position and features of [z] based on [y]}, where x is all matrix values ​​in the frame feature matrix, y is all matrix values ​​in the pixel-level matrix, and z is the target text prompt; inputting all matrix values ​​in the frame feature matrix, all matrix values ​​in the pixel-level matrix, and the target text prompt into a large language model according to the input text to obtain a predicted feature matrix.

[0088] like Figure 4 As shown, obtaining the prediction feature matrix includes the following steps S51 to S52.

[0089] Step S51, set the input text to {the video frame is [x], please find the position and features of [z] based on [y]}.

[0090] Among them, x is all matrix values ​​in the frame feature matrix, y is all matrix values ​​in the pixel level matrix, and z is the target text prompt.

[0091] Step S52: input all matrix values ​​in the frame feature matrix, all matrix values ​​in the pixel-level matrix and the target text prompt into a large language model according to the input text to obtain a predicted feature matrix.

[0092] Specifically, for the video to be detected with a duration of N seconds and a preset frame rate of 1 frame per second, the shape of the prediction feature matrix is ​​(N, 512).

[0093] Step S6: performing target tracking based on the prediction feature matrix and the target text features.

[0094] In some implementations, performing target tracking based on the prediction feature matrix and the target text features includes: obtaining a prediction box set based on the prediction feature matrix; obtaining a similarity vector based on the prediction feature matrix and the target text features; and filtering the prediction box set according to the similarity vector to perform target tracking.

[0095] like Figure 5As shown, the target tracking is performed based on the prediction feature matrix and the target text features, and the following steps S61 to S63 are performed.

[0096] Step S61: Acquire a prediction frame set based on the prediction feature matrix.

[0097] Specifically, the prediction feature matrix is ​​passed through a multilayer perceptron (MLP) and sigmoid to obtain N*4 rectangular box coordinates, wherein N represents the number of frames, and any frame can obtain 4 rectangular box coordinates, which are the horizontal axis coordinate and the vertical axis coordinate of the upper left corner of the rectangular box and the horizontal axis coordinate and the vertical axis coordinate of the lower right corner of the rectangular box.

[0098] Step S62: Obtain a similarity vector based on the prediction feature matrix and the target text features.

[0099] In some implementations, obtaining a set of prediction frames based on the prediction feature matrix includes: obtaining a frame vector based on the prediction feature matrix; and obtaining a similarity vector based on the frame vector and the target text feature.

[0100] like Figure 6 As shown, obtaining the similarity vector includes the following steps S621 to S622.

[0101] S621. Obtain a frame vector based on the prediction feature matrix.

[0102] Specifically, for the prediction feature matrix, a frame vector with a shape of (N, 512) is obtained through MLP and L2 regularization.

[0103] S622: Obtain a similarity vector based on the frame vector and the target text feature.

[0104] Specifically, matrix multiplication is performed on the frame vector and the target text feature to match the frame with the target text prompt in terms of relevance, thereby obtaining a similarity vector; the similarity vector represents a vector of N elements, and the value of the similarity vector is between 0 and 1.

[0105] Step S63: Filter the prediction box set according to the similarity vector to perform target tracking.

[0106] Specifically, the similarity vector represents a vector of N elements, and the value in the similarity vector is between 0 and 1.

[0107] In some implementations, filtering the prediction box set according to the similarity vector to perform target tracking includes: filtering the value of the similarity vector according to a preset threshold to obtain an available frame; filtering the prediction box set according to the available frame to obtain a prediction box corresponding to the target text prompt to achieve target tracking.

[0108] like Figure 7 As shown, filtering the prediction box set according to the similarity vector to perform target tracking includes the following steps S631 to S632.

[0109] Step S631: Filter the value of the similarity vector according to a preset threshold to obtain available frames.

[0110] Specifically, by comparing the value of the similarity vector with the preset threshold, the frame corresponding to the value of the similarity vector greater than the preset threshold is taken as an available frame.

[0111] In one embodiment, the preset threshold is set to 0.5, and frames corresponding to values ​​of the similarity vector greater than 0.5 are taken as available frames.

[0112] It should be noted that the values ​​in the similarity vector are arranged in the time sequence of the frames.

[0113] It should be noted that the preset threshold can be adjusted according to actual conditions and is not a unique fixed value.

[0114] Step S632: filter the prediction frame set according to the available frames to obtain the prediction frame corresponding to the target text prompt to achieve target tracking.

[0115] Specifically, according to the sequence number of the available frame obtained, the corresponding prediction box is filtered to achieve target tracking.

[0116] For example, a similarity vector is (0.2, 0.3, 0.7), where 0.2 represents the value corresponding to the 0th frame, 0.3 represents the value corresponding to the 1st frame, and 0.7 represents the value corresponding to the 2nd frame. The 2nd frame is an available frame, and the prediction frame corresponding to the 2nd frame in the prediction frame set is filtered. The image corresponding to the coordinates of the prediction frame corresponding to the second frame is the tracked target.

[0117] See also Figure 8 , which is a flow chart of another embodiment of the target tracking method described in the present application.

[0118] like Figure 8As shown, the target tracking method includes: obtaining a video to be detected and a target text prompt; deframing the video to be detected, and obtaining a frame feature matrix in the form of (N, 1080, 1080, 512) through a VIT model and L2 regularization; converting the target text prompt into a target text feature containing 512 elements through a CLIP text encoder and L2 regularization; obtaining a pixel-level matrix in the shape of (N, 1080, 1080) by matrix multiplication of the frame feature matrix and the target text feature; The frame feature matrix, the target text prompt and the pixel-level matrix are input into the LLM model according to the set format to obtain a prediction feature matrix with a shape of (N, 512); the prediction feature matrix is ​​subjected to MLP and sigmoid processing, MLP and L2 regularization processing respectively to obtain an N*4 prediction box set and a frame vector with a shape of (N, 512); the frame vector and the target text feature are subjected to matrix multiplication processing to obtain a similarity vector; finally, target tracking is performed based on the similarity vector and the prediction box set.

[0119] It should be noted that the protection scope of the target tracking method described in the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.

[0120] See also Fig. 9 , showing a structural diagram of the target tracking system described in an embodiment of the present application.

[0121] like Fig. 9 As shown, the target tracking system 900 includes: a first acquisition module 910 , a second acquisition module 920 , a third acquisition module 930 , a first processing module 940 , a second processing module 950 , and a tracking module 960 .

[0122] The first acquisition module 810 is used to acquire the video to be detected and the target text prompt.

[0123] Specifically, a video to be detected shot by a camera or other shooting device is obtained, as well as a target text prompt that needs to be tracked, such as "a man in black carrying a black bag".

[0124] In one embodiment, a video to be detected with a duration of N seconds is obtained, and for the video to be detected, it is necessary to track the target of "the man in black carrying a black bag" in the video to be detected.

[0125] The second acquisition module 820 is used to acquire a frame feature matrix based on the video to be detected.

[0126] In some implementations, obtaining a frame feature matrix based on the video to be detected includes: deframing the video to be detected at a preset frame rate to obtain a set of frames to be detected; and extracting features from the set of frames to be detected to obtain a frame feature matrix.

[0127] The third acquisition module 830 is used to acquire target text features based on the target text prompt.

[0128] Specifically, the acquired target text prompt is subjected to feature extraction and L2 regularization through a text encoder to obtain the target text feature.

[0129] The target text feature is a vector containing 512 elements.

[0130] Preferably, the target text features are obtained through a text encoder and L2 regularization of CLIP.

[0131] The first processing module 840 is used to obtain a pixel-level matrix based on the frame feature matrix and the target text feature.

[0132] Specifically, matrix multiplication is performed on the frame feature matrix and the target text feature to obtain a pixel-level matrix; the pixel-level matrix has a shape of (N, 1080, 1080), where N represents the number of frames and (1080, 1080) represents the frame size.

[0133] The element (pixel) value in the pixel-level matrix is ​​between 0 and 1, indicating the degree of matching between each element (pixel) and the target text prompt. The larger the element (pixel) value, the higher the degree of matching between each element (pixel) and the target text prompt.

[0134] The second processing module 850 is used to obtain a prediction feature matrix according to the frame feature matrix, the target text prompt and the pixel level matrix.

[0135] In some implementations, obtaining a predicted feature matrix based on the frame feature matrix, the target text prompt, and the pixel-level matrix includes: setting the input text to {the video frame is [x], please find the position and features of [z] based on [y]}, where x is all matrix values ​​in the frame feature matrix, y is all matrix values ​​in the pixel-level matrix, and z is the target text prompt; inputting all matrix values ​​in the frame feature matrix, all matrix values ​​in the pixel-level matrix, and the target text prompt into a large language model according to the input text to obtain a predicted feature matrix.

[0136] The tracking module 860 is used to perform target tracking based on the prediction feature matrix and the target text features.

[0137] In some implementations, performing target tracking based on the prediction feature matrix and the target text features includes: obtaining a prediction box set based on the prediction feature matrix; obtaining a similarity vector based on the prediction feature matrix and the target text features; and filtering the prediction box set according to the similarity vector to perform target tracking.

[0138] It should be noted that it should be understood that the division of the above modules is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a chip of the above-mentioned device for implementation. In addition, it can also be stored in the memory of the above-mentioned device in the form of program code, and called and executed by a processing element of the above-mentioned device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0139] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0140] The present application embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by a program to instruct the processor, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state hard disk (SSD)), etc.

[0141] An embodiment of the present application also provides an electronic device, including: a processor and a memory.

[0142] Specifically, the memory is used to store computer programs; the memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0143] The processor is used to execute the computer program stored in the memory so that the electronic device executes the above-mentioned target tracking method.

[0144] like Fig.10 As shown, the electronic device of the present invention is in the form of a general computing device. The components of the electronic device may include but are not limited to: one or more processors or processing units 101, a memory 102, and a bus 103 connecting different system components (including the memory 102 and the processing unit 101).

[0145] Bus 103 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0146] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.

[0147] The memory 102 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1021 and / or cache memory 1022. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 1023 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 not shown, usually called a "hard drive"). Although Fig.10 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 103 via one or more data medium interfaces. The memory 102 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0148] A program / utility 1024 having a set (at least one) of program modules 1025 may be stored, for example, in the memory 102, such program modules 1025 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 1025 generally perform the functions and / or methods of the embodiments described herein.

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

[0150] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0151] In summary, according to the target tracking method and system, medium and electronic device of the present application, a pixel-level matrix and a prediction feature matrix are obtained based on the frame feature matrix and the target text feature, and the target is tracked based on the prediction feature matrix and the target text feature, which can effectively realize the tracking of the predefined target of the text prompt. Therefore, the present application effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.

[0152] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A target tracking method, characterized in that: The method comprises: Get the video to be detected and the target text prompt; Acquire a frame feature matrix based on the video to be detected; Acquire target text features based on the target text prompt; Acquire a pixel-level matrix based on the frame feature matrix and the target text feature; Acquire a prediction feature matrix according to the frame feature matrix, the target text prompt and the pixel level matrix; Target tracking is performed based on the predicted feature matrix and the target text features.

2. The target tracking method according to claim 1, characterized in that: Acquiring a frame feature matrix based on the video to be detected includes: De-framing the video to be detected according to a preset frame rate to obtain a set of frames to be detected; Feature extraction is performed on the set of frames to be detected to obtain a frame feature matrix.

3. The target tracking method according to claim 1, characterized in that: Acquiring a pixel-level matrix based on the frame feature matrix and the target text feature includes: Performing matrix multiplication on the frame feature matrix and the target text feature to obtain a pixel-level matrix; The pixel-level matrix shape is (N, 1080, 1080), where N represents the number of frames and (1080, 1080) represents the frame size.

4. The target tracking method according to claim 1, characterized in that: Acquiring a prediction feature matrix based on the frame feature matrix, the target text prompt and the pixel-level matrix includes: Set the input text to {video frame is [x], please find the position and features of [z] based on [y]}; where x is all matrix values ​​in the frame feature matrix, y is all matrix values ​​in the pixel-level matrix, and z is the target text prompt; All matrix values ​​in the frame feature matrix, all matrix values ​​in the pixel-level matrix and the target text prompt are input into a large language model according to the input text to obtain a predicted feature matrix.

5. The target tracking method according to claim 1, characterized in that: Target tracking based on the prediction feature matrix and the target text features includes: Acquire a set of prediction boxes based on the prediction feature matrix; Acquire a similarity vector based on the predicted feature matrix and the target text feature; The prediction box set is filtered according to the similarity vector to perform target tracking.

6. The target tracking method according to claim 5, characterized in that: Acquiring a similarity vector based on the prediction feature matrix and the target text feature includes: Acquire a frame vector based on the prediction feature matrix; A similarity vector is obtained based on the frame vector and the target text feature.

7. The target tracking method according to claim 5, characterized in that: The similarity vector represents a vector of N elements, the value of the similarity vector is between 0 and 1, and filtering the prediction frame set according to the similarity vector to perform target tracking includes: Filter the value of the similarity vector according to a preset threshold to obtain a usable frame; The prediction frame set is filtered according to the available frames to obtain the prediction frame corresponding to the target text prompt to achieve target tracking.

8. A target tracking system, characterized in that: The system comprises: The first acquisition module is used to obtain the video to be detected and the target text prompt; A second acquisition module is used to acquire a frame feature matrix based on the video to be detected; A third acquisition module, used for acquiring target text features based on the target text prompt; A first processing module, used for obtaining a pixel-level matrix based on the frame feature matrix and the target text feature; A second processing module, configured to obtain a prediction feature matrix according to the frame feature matrix, the target text prompt and the pixel level matrix; A tracking module is used to track the target based on the prediction feature matrix and the target text feature.

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

10. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory so that the electronic device executes the target tracking method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Target tracking method and device, electronic equipment and storage medium

    CN115147458A

  • Short-time natural language target tracking method based on visual language large model

    CN117746024A

  • Pre-training of computer vision foundational models

    US20230162481A1

Cited By

  • Target detection method and system, medium and electronic equipment

    CN119723066A

  • Target detection method, system, medium and electronic equipment

    CN119723066B