Video target positioning method, system, medium and electronic device

By using the VIT model and MLP in the video target positioning method to extract the reference features and position coding of the first frame of the video, and combining it with the fusion operation of the transformer decoder, the problem of inaccurate video target positioning in the existing technology is solved and a higher accuracy is achieved. Positioning accuracy.

CN118230226BActive Publication Date: 2024-09-13SHANGHAI MIDU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410645647.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-13
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

The accuracy of existing video target positioning methods is not high, and they fail to effectively utilize the timing information and processing strategies between different frames in the video, resulting in inaccurate target positioning.

Method used

A video target positioning method is used to obtain the reference features and position coding of the first frame of the video, combine the VIT model and MLP for feature extraction and embedding, obtain the video feature matrix, and separate the confidence level through the fusion of transformer decoder and MLP operation. matrix and rectangular frame coordinate matrix, and the process is repeated until the target positioning result is obtained.

Benefits of technology

It significantly improves the accuracy of video target positioning and can effectively determine the existence and location of targets in subsequent frames. It is suitable for a variety of application scenarios such as security monitoring and autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118230226B
    Figure CN118230226B
Patent Text Reader

Abstract

The present application provides a video target positioning method, system, medium and electronic device. The video target positioning method includes: obtaining an input video; obtaining a reference feature of a target and a position code of the reference feature according to the first frame of the video; processing the input video to obtain a video feature matrix; obtaining a reference matrix according to the position code and the reference feature; obtaining a reference feature matrix according to the video feature matrix and the reference matrix; selecting a subsequent frame containing the target from the input video; obtaining an input matrix according to the reference feature matrix, the position code and the frame features of the subsequent frame; fusing the input matrix with the video feature matrix and obtaining a fused feature according to the fusion result; performing an MLP operation on the fused feature to obtain an output matrix; separating the output matrix into a confidence matrix and a rectangular frame coordinate matrix; repeating the above steps until the target positioning result is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video processing technology and relates to a video target positioning method, system, medium and electronic equipment. Background Art

[0002] Target positioning is a very important research topic in the field of video processing. Target positioning methods can not only be applied to various security monitoring systems, autonomous driving systems, drones and other fields, but also have a wide range of commercial uses, such as pedestrian positioning, vehicle positioning, medical impact analysis, etc. With the continuous development of artificial intelligence algorithms, more and more target positioning methods have been proposed. However, the accuracy of existing target positioning methods is generally not high. How to improve the accuracy of video target positioning has become an urgent problem to be solved. Summary of the invention

[0003] The purpose of the present application is to provide a video target positioning method, system, medium and electronic device for improving the accuracy of video target positioning.

[0004] In a first aspect, the present application provides a video target positioning method, the target positioning method comprising: S11, obtaining an input video;

[0005] S12, obtaining reference features of the target and position coding of the reference features according to the first frame of the video; wherein the first frame of the video is a frame containing the target of interest, and the process of obtaining the reference features of the target according to the first frame of the video includes: performing feature extraction on the first frame of the video using the VIT model to obtain the reference features of the target; the process of obtaining the position coding of the reference features according to the first frame of the video includes: obtaining the rectangular frame or center point coordinates of the target of interest in the first frame of the video; performing spatial embedding on the rectangular frame coordinates or the center point coordinates using MLP to obtain a feature matrix; and performing global average pooling on the feature matrix to obtain the position coding of the reference features;

[0006] S13, processing the input video to obtain a video feature matrix;

[0007] S14, acquiring a reference matrix according to the position code and the reference feature;

[0008] S15, obtaining a reference feature matrix according to the video feature matrix and the reference matrix;

[0009] S16, selecting a subsequent frame containing the target from the input video;

[0010] S17, acquiring an input matrix according to the reference feature matrix, the position code and the frame features of the subsequent frame;

[0011] S18, fusing the input matrix and the video feature matrix and obtaining a fusion feature according to the fusion result;

[0012] S19, performing MLP operation on the fusion features to obtain an output matrix;

[0013] S20, separating the output matrix into a confidence matrix and a rectangular frame coordinate matrix, wherein the confidence matrix is ​​used to represent the confidence of the target, and the rectangular frame coordinate matrix is ​​used to represent the rectangular frame coordinates of the target;

[0014] S16-S20 are repeatedly executed until the target positioning result is obtained.

[0015] In an implementation of the first aspect, the process of processing the input video to obtain a video feature matrix includes: using a neural network to extract features from the input video to obtain the video feature matrix.

[0016] In an implementation of the first aspect, the process of obtaining a reference matrix based on the video feature matrix and the reference feature includes: using an encoder to concatenate each vector between the video feature matrix and the reference matrix to obtain the reference feature matrix.

[0017] In an implementation of the first aspect, the process of fusing the input matrix and the video feature matrix and obtaining a fusion feature based on the fusion result includes: inputting the input matrix and the video feature matrix into a decoder for fusion to obtain a fusion output matrix; and performing vector extraction on the fusion output matrix to obtain the fusion feature.

[0018] In an implementation manner of the first aspect, the target positioning method further includes: the confidence of the target is used to determine whether the subsequent frame contains the target, and the rectangular frame coordinates are used to obtain the coordinates of the target.

[0019] In a second aspect, the present application provides a video target positioning system, the target positioning system comprising: an input video acquisition module for acquiring an input video; a reference feature acquisition module for acquiring a reference feature of a target and a position encoding of the reference feature according to the first frame of the video; wherein the first frame of the video is a frame containing a target of interest, and the process of acquiring the reference feature of the target according to the first frame of the video comprises: performing feature extraction on the first frame of the video using a VIT model to acquire the reference feature of the target; the process of acquiring the position encoding of the reference feature according to the first frame of the video comprises: acquiring a rectangular box or center point coordinates of the target of interest in the first frame of the video; performing spatial embedding of the rectangular box coordinates or the center point coordinates using MLP to acquire a feature matrix; performing global average pooling on the feature matrix to acquire the position encoding of the reference feature; a video feature matrix acquisition module for processing the input video to acquire Take a video feature matrix; a reference matrix acquisition module, used to acquire a reference matrix according to the position code and the reference feature; a reference feature matrix acquisition module, used to acquire a reference feature matrix according to the video feature matrix and the reference feature; a subsequent frame acquisition module, used to select a subsequent frame containing the target from the input video; an input matrix acquisition module, used to acquire an input matrix according to the reference feature matrix, the position code and the frame features of the subsequent frame; a fusion feature acquisition module, used to fuse the input matrix and the video feature matrix and obtain fusion features according to the fusion results; an output matrix acquisition module, used to perform MLP operation on the fusion features to obtain an output matrix; a matrix separation module, used to separate the output matrix into a confidence matrix and a rectangular frame coordinate matrix, the confidence matrix is ​​used to represent the confidence of the target, and the rectangular frame coordinate matrix is ​​used to represent the rectangular frame coordinates of the target. In a third aspect, the present application provides an electronic device, the electronic device comprising: a memory, on which a computer program is stored; a processor, communicatively connected to the memory, used to execute the computer program to implement the above-mentioned video target positioning method.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned video target positioning method when executed by an electronic device.

[0021] As described above, the video target positioning method, system, medium and electronic device described in this application have the following beneficial effects:

[0022] The video target positioning method of the embodiment of the present application processes the input video to obtain a video feature matrix, reference features of the target, position encoding of the reference features and frame features of subsequent frames, and locates the target position in the video through further fusion and calculation, thereby effectively improving the accuracy of video target positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 Shown is a schematic diagram of an application scenario of the video target positioning method described in an embodiment of the present application.

[0024] Figure 2 Shown is a process schematic diagram of the video target positioning method described in an embodiment of the present application.

[0025] Figure 3 Shown is a schematic diagram of the process of obtaining position coding described in an embodiment of the present application.

[0026] Figure 4 Shown is a schematic diagram of the process of obtaining fusion features described in an embodiment of the present application.

[0027] Figure 5 Shown is a structural schematic diagram of the video target positioning system described in an embodiment of the present application.

[0028] Figure 6 Shown is a schematic diagram of the structure of an electronic device described in an embodiment of the present application.

[0029] Component number description

[0030] 11. Cell Phone

[0031] 12 Tablet

[0032] 13 Laptop

[0033] 2 Video Target Positioning System

[0034] 21 Input video acquisition module

[0035] 22 Reference Feature Acquisition Module

[0036] 23 Video feature matrix acquisition module

[0037] 24 Reference matrix acquisition module

[0038] 25 Reference feature matrix acquisition module

[0039] 26 Subsequent frame acquisition module

[0040] 27 Input matrix acquisition module

[0041] 28 Fusion feature acquisition module

[0042] 29 Output matrix acquisition module

[0043] 30 Matrix separation module

[0044] 3 Electronic devices

[0045] 31 Memory

[0046] 32 processors

[0047] 33 Display

[0048] Steps S11~S20

[0049] Steps S31~S33

[0050] Steps S51~S52 DETAILED DESCRIPTION

[0051] 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.

[0052] 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.

[0053] Target positioning is a very important research topic in the field of video processing. Target positioning methods can not only be applied to various security monitoring systems, autonomous driving systems, drones and other fields, but also have a wide range of commercial uses, such as pedestrian positioning, vehicle positioning, medical impact analysis, etc. With the continuous development of artificial intelligence algorithms, more and more target positioning methods have been proposed. The current video target positioning methods often take the same processing method for all frames, or select fixed pins as key frames for target detection. However, these methods ignore the timing information between different frames in the video and the role of different processing strategies. Therefore, how to improve the accuracy of video target positioning has become an urgent problem to be solved.

[0054] At least to address the above problems, the following embodiments of the present application provide a video target positioning method, which can be applied to Figure 1 Electronic equipment shown.

[0055] The electronic devices described in the present application may include mobile phones 11, tablet computers 12, laptop computers 13, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc., which have wireless charging functions. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0056] 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).

[0057] 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, etc. The GNSS can include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Satellite Navigation System (BDS), Quasi-Zenith Satellite System (QZSS) and / or Satellite Based Augmentation Systems (SBAS).

[0058] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.

[0059] Figure 2 The following is a schematic diagram of the process of the video target positioning method in one embodiment of the present application. Figure 2 As shown, the video target positioning method includes:

[0060] S11, obtaining input video.

[0061] S12, obtaining reference features of the target and position coding of the reference features according to the first frame of the video. The first frame of the video is a frame including the target of interest. In some implementations, the first frame of the video is the first frame that includes the target of interest in the input video, but the present application is not limited thereto. The target of interest can be a person, a vehicle, a pet, a mobile gaming device, etc., and the present application is not limited thereto. The position coding of the reference features describes the information fragment of the target, and the order and position of the target in the video can be obtained through the position coding.

[0062] The process of obtaining the reference features of the target according to the first frame of the video includes: extracting features of the first frame of the video using a VIT model to obtain the reference features of the target. The shape of the obtained reference features of the target is, for example, (1,256).

[0063] The process of obtaining the position encoding of the reference feature according to the first frame of the video includes:

[0064] Obtaining the coordinates of the rectangular frame or center point of the target of interest in the first frame of the video;

[0065] Using MLP to spatially embed the rectangular frame coordinates or the center point coordinates to obtain a feature matrix;

[0066] Global average pooling is performed on the feature matrix to obtain the position encoding of the reference feature.

[0067] S13, processing the input video to obtain a video feature matrix.

[0068] In some implementations, the process of processing the input video to obtain a video feature matrix may include: performing feature extraction on the input video to obtain an original feature set, filtering out redundant features and irrelevant features in the original feature set of the input video through feature selection and / or feature extraction, retaining required useful features as video features, and organizing these video features into the video feature matrix according to certain rules.

[0069] Exemplarily, feature selection and / or feature extraction can be performed from two aspects: the divergence of each feature (i.e., whether the feature diverges) and the correlation (i.e., whether the feature is related to the target). If a feature does not diverge, it means that the feature is a useless feature, otherwise it means that the feature is a useful feature. If a feature has a low correlation with the target, it means that the feature is a useless feature, otherwise it means that the feature is a useful feature.

[0070] S14, acquiring a reference matrix according to the position code and the reference feature.

[0071] S15, obtaining a reference feature matrix according to the video feature matrix and the reference matrix.

[0072] S16, selecting a subsequent frame containing the target from the input video. The subsequent frame is a frame after the first frame of the video. The VIT model is used to extract features from the subsequent frame to obtain frame features, and the shape of the frame features is, for example, (1,256).

[0073] For example, when step S16 is performed for the first time, the first frame containing the target of interest after the first frame of the video can be selected as the subsequent frame. When step S16 is repeatedly performed, the first frame containing the target of interest after the subsequent frame in the previous cycle can be selected as the subsequent frame.

[0074] S17, acquiring an input matrix according to the reference feature matrix, the position code and the frame features of the subsequent frame.

[0075] S18, fusing the input matrix and the video feature matrix and obtaining a fusion feature according to the fusion result.

[0076] S19, performing MLP operation on the fusion features to obtain an output matrix.

[0077] S20, separating the output matrix into a confidence matrix and a rectangular frame coordinate matrix. The confidence matrix is ​​used to represent the confidence of the target, and whether the target is included in the subsequent frame can be determined according to the confidence of the target. The rectangular frame coordinate matrix is ​​used to represent the rectangular frame coordinates of the target, and the final coordinates of the target can be obtained according to the rectangular frame coordinates of the target.

[0078] S16-S20 are repeatedly performed until the target positioning result is obtained. In some implementations, steps S16-S20 may be repeated N times to obtain the target positioning results in N subsequent frames, where N is a positive integer. For example, N may be the number of all frames containing the target after the first frame of the video.

[0079] According to the above description, the video target positioning method of the embodiment of the present application obtains a video feature matrix, reference features of the target, position encoding of the reference features and frame features of subsequent frames by processing the input video, and locates the target position in the video through further fusion and calculation, thereby effectively improving the accuracy of video target positioning.

[0080] In one embodiment of the present application, the process of processing the input video to obtain a video feature matrix includes: using a neural network to extract features from the input video to obtain the video feature matrix.

[0081] Exemplarily, the conv3D network layer can be used to extract features from the input video to obtain a video feature matrix. The shape of the video feature matrix is, for example, (N, 256), where N is the product of the height and width of the downsampled feature map.

[0082] Figure 3 The following is a schematic diagram of the process of obtaining position coding in one embodiment of the present application. Figure 3 As shown, the process of obtaining the position encoding of the reference feature according to the first frame of the video includes:

[0083] S31, obtaining the rectangular frame or center point coordinates of the focus target in the first frame of the video.

[0084] Exemplarily, the target of interest has multiple different categories. Assuming that the number of categories of the target of interest is K, the value of the rectangular frame of the target of interest can be expressed as [upper left corner x-axis coordinate, upper left corner y-axis coordinate, lower right corner x-axis coordinate, lower right corner y-axis coordinate], and the value of the center point coordinate of the target of interest can be expressed as [x-axis coordinate, y-axis coordinate].

[0085] S32, using an MLP (Multilayer Perceptron) to spatially embed the rectangular frame coordinates or the center point coordinates to obtain a feature matrix.

[0086] Exemplarily, the rectangular frame coordinates or the center point coordinates are spatially embedded using MLP, and the shape of the obtained feature matrix is, for example, (4*K, 256) or (2*K, 256).

[0087] S33, performing global average pooling on the feature matrix to obtain the position code of the reference feature. The shape of the feature matrix after global average pooling is the same as the shape of the reference feature of the target of interest.

[0088] In one embodiment of the present application, the reference matrix is ​​obtained by performing matrix addition on the position code of the reference feature and the reference feature.

[0089] In one embodiment of the present application, the process of obtaining a reference feature matrix based on the video feature matrix and the reference matrix includes: using an encoder to concatenate each vector between the video feature matrix and the reference matrix to obtain the reference feature matrix.

[0090] Exemplarily, a transformer encoder may be used to learn the intrinsic relationship between the video feature matrix and each vector of the reference matrix, so as to obtain a reference feature matrix, where the shape of the reference feature matrix is, for example, (N+1, 256).

[0091] In one embodiment of the present application, the process of obtaining an input matrix based on the reference feature matrix, the position code and the frame features of the subsequent frames includes: splicing the reference feature matrix, the position code and the frame features of the subsequent frames in the time dimension to obtain an input matrix, and the shape of the input matrix is, for example, (N+1+1+K, 256). Wherein, K represents the number after the maximum value pooling of the position code. When the position code is obtained according to the rectangular frame coordinates of the target of interest, the size of the feature matrix changes from (4*K, 256) to (K, 256). When the position code is obtained according to the center point coordinates of the target of interest, the size of the feature matrix changes from (2*K, 256) to (K, 256).

[0092] Figure 4 The following is a schematic diagram of the process of obtaining fusion features in one embodiment of the present application. Figure 4 As shown, the process of fusing the input matrix and the video feature matrix and obtaining the fusion feature according to the fusion result includes:

[0093] S51, inputting the input matrix and the video feature matrix into a decoder for fusion to obtain a fused output matrix.

[0094] Exemplarily, the input matrix is ​​taken as Q, and the video feature matrix is ​​taken as K and V, which are input into the transformer decoder for cross-attention information query fusion to obtain the fused output matrix, and the shape of the fused output matrix is ​​(N+1+1+K, 5).

[0095] S52, performing vector extraction on the fusion output matrix to obtain the fusion feature.

[0096] Exemplarily, K vectors are extracted from the fusion output matrix according to the number of categories of the target of interest, and these K vectors are used as fusion features.

[0097] In one embodiment of the present application, an MLP operation is performed on the fusion features to obtain an output matrix, and the shape of the output matrix is ​​(M, 5).

[0098] Exemplarily, M may be 100. Assuming that at most 100 attention targets appear in each frame, including attention targets of repeated categories, a sigmoid activation function is required to convert it to a value between 0 and 1.

[0099] In one embodiment of the present application, the process of obtaining the target positioning result according to the output matrix includes: separating the output matrix to obtain the confidence of the target of interest and the rectangular frame coordinates of the target of interest. The confidence of the target is used to determine whether the subsequent frame contains the target, and the rectangular frame coordinates are used to obtain the coordinates of the target.

[0100] Exemplarily, the output matrix is ​​separated into two matrices, namely (M, 1) and (M, 4). Among them, (M, 1) represents the confidence of the M targets of interest. When the confidence is greater than 0.5, it means that the target of interest appears in the frame, otherwise it does not appear. (M, 4) represents the rectangular frame coordinates of the N targets, expressed as [upper left corner x-axis coordinate, upper left corner y-axis coordinate, lower right corner x-axis coordinate, lower right corner y-axis coordinate]. In some implementations, the rectangular frame coordinates are relative coordinates and need to be multiplied by the height and width of the frame, that is, (x coordinate multiplied by width, y coordinate multiplied by height). The final coordinates of the target of interest are obtained based on the rectangular frame coordinates and the height and width of the frame.

[0101] The video target positioning method of the present application will be specifically described below through an embodiment, and the specific implementation process is as follows:

[0102] The first step is to obtain the input video.

[0103] In the second step, the conv3D network layer is used to extract the input video to obtain a video feature matrix with a shape of (N, 256). The input video is divided into the first frame of the video containing the frame of the focus target and the subsequent frames. The subsequent frames include both frames containing the focus target and frames not containing the focus target.

[0104] The VIT model is used to extract the first frame of the video to obtain reference features with a shape of (1, 256). The VIT model is used to extract frame features with a shape of (1, 256) in subsequent frames.

[0105] Get the coordinates of the rectangular box or center point of the target in the first frame of the video, use MLP to embed it spatially to obtain a feature matrix with a shape of (4*K, 256) or (2*K, 256), and perform global average pooling on the feature matrix to obtain the position encoding of the reference feature. Add the position encoding and the reference feature matrix to further obtain the reference matrix.

[0106] In the third step, the transformer encoder is used to learn the intrinsic connection between the video feature matrix and each vector of the reference matrix to obtain a reference feature matrix with a shape of (N+1, 256).

[0107] In the fourth step, the reference feature matrix, frame features, and position codes are concatenated in the time dimension to obtain an input matrix of shape (N+1+1+K, 256). K represents the number of position codes after maximum pooling. When the position code is obtained based on the coordinates of the rectangular box of the target of interest, (4*K, 256) becomes (K, 256). When the position code is obtained based on the coordinates of the center point of the target of interest, (2*K, 256) becomes (K, 256).

[0108] In the fifth step, the input matrix is ​​used as Q, and the video feature matrix is ​​used as K and V to input into the transformer decoder for cross-attention information query fusion, and a fusion output matrix of shape (N+1+1+K, 5) is obtained. K vectors are extracted from the fusion output matrix according to the number of categories of the attention target, and these K vectors are used as fusion features.

[0109] In the sixth step, the fused features are subjected to MLP operation to obtain an output matrix of shape (M, 5), where M=100, indicating that at most 100 targets appear in each frame.

[0110] Step 7: Separate the output matrix into two matrices (M, 1) and (M, 4). Among them, (M, 1) represents the confidence of the M targets. When the confidence is greater than 0.5, it means that the target of interest appears in the frame, otherwise it does not appear. (M, 4) represents the rectangular frame coordinates of the M targets. The coordinates of the final target can be obtained by multiplying the rectangular frame coordinates with the height and width of the frame. The rectangular frame coordinates are expressed as [upper left corner x-axis coordinate, upper left corner y-axis coordinate, lower right corner x-axis coordinate, lower right corner y-axis coordinate].

[0111] Step 8: Continue to select frames containing the target of interest from the subsequent frames, and perform the steps from step 2 to step 7 on the first frame of the video to obtain the location of the target of interest again. Repeat the above operation until the location of all the targets of interest in the subsequent frames is obtained. The location of all the targets of interest are collected as the target location result of the video.

[0112] In summary, the video target positioning method provided by the present application can use the VIT model to extract features from the first frame and subsequent frames of the video, and perform spatial embedding and global average pooling operations based on the rectangular frame of the target of interest in the first frame of the video to obtain the reference feature matrix, frame features and position encoding of the target of interest. The positioning position of the target of interest is obtained through the fusion of transformer decoder and MLP operation, and all the positioning positions of the target are combined to finally obtain the target positioning result of the video. The accuracy of video target positioning is improved by the video target positioning method of the present application.

[0113] The protection scope of the video target positioning method described in the embodiment of the present application is not limited to the execution order of the steps listed in the present 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.

[0114] The embodiment of the present application also provides a video target positioning system, which can implement the video target positioning method described in the present application. However, the implementation device of the video target positioning method described in the present application includes but is not limited to the structure of the video target positioning system listed in the present embodiment. All structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.

[0115] Figure 5 The diagram shows a schematic diagram of the structure of a video target positioning system in one embodiment of the present application. Figure 5 As shown, the video target positioning system 2 includes: an input video acquisition module 21, a reference feature acquisition module 22, a video feature matrix acquisition module 23, a reference matrix acquisition module 24, a reference feature matrix acquisition module 25, a subsequent frame acquisition module 26, an input matrix acquisition module 27, a fusion feature acquisition module 28, an output matrix acquisition module 29, and a matrix separation module 30. The input video acquisition module 21 is used to acquire the input video. The reference feature acquisition module 22 is used to acquire the reference features of the target and the position encoding of the reference features according to the first frame of the video. The first frame of the video is a frame containing the target of interest. The process of acquiring the reference features of the target according to the first frame of the video includes: extracting features from the first frame of the video using the VIT model to acquire the reference features of the target. The process of acquiring the position encoding of the reference features according to the first frame of the video includes: acquiring the rectangular frame or center point coordinates of the target of interest in the first frame of the video; spatially embedding the rectangular frame coordinates or the center point coordinates using MLP to acquire a feature matrix; and performing global average pooling on the feature matrix to acquire the position encoding of the reference features. The video feature matrix acquisition 23 is used to process the input video to obtain a video feature matrix. The reference matrix acquisition module 24 is used to obtain a reference matrix from the position code and the reference feature. The reference feature matrix acquisition module 25 is used to obtain a reference feature matrix based on the video feature matrix and the reference feature. The subsequent frame acquisition module 26 is used to select a subsequent frame containing the target from the input video. The input matrix acquisition module 27 is used to obtain an input matrix based on the reference feature matrix, the position code and the frame features of the subsequent frame. The fusion feature acquisition module 28 is used to fuse the input matrix and the video feature matrix and obtain a fusion feature based on the fusion result. The output matrix acquisition module 29 is used to perform MLP operation on the fusion feature to obtain an output matrix. The matrix separation module 30 is used to obtain a target positioning result based on the output matrix.

[0116] It should be noted that Figure 5 The modules in the video target positioning system 2 are shown in FIG. Figure 2 The steps in the video target positioning method correspond to each other and will not be described in detail here.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.

[0118] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0119] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0120] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, the video target positioning method provided by the embodiment of the present application is implemented. 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 instructing the processor through a program, 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 disk (SSD)), etc.

[0121] The embodiment of the present application may also provide an electronic device. Figure 6 The diagram shows a schematic diagram of the structure of an electronic device 3 in an embodiment of the present application. Figure 6 As shown, in this embodiment, the electronic device 3 includes a memory 31 and a processor 32 .

[0122] The memory 31 is used to store computer programs. In some possible implementations, the memory 31 may include: ROM, RAM, a disk, a USB disk, a memory card, or an optical disk, etc., various media that can store program codes.

[0123] In the embodiment of the present application, the memory 31 may include a computer system readable medium in the form of a volatile memory, such as a RAM and / or a cache memory. The electronic device 3 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 31 may include at least one program product, which has a set (e.g., at least one) of program modules, which are configured to perform the functions of each embodiment of the present application.

[0124] The processor 32 is connected to the memory 31 and is used to execute the computer program stored in the memory 31 so that the electronic device 3 executes the video target positioning method.

[0125] Exemplarily, the processor 32 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other embodiments, the processor 32 may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0126] In some implementations, the electronic device 3 provided in the embodiment of the present application may further include a display 33. The display 33 is communicatively connected with the memory 31 and the processor 32, and is used to display a graphical user interface (GUI) related to the speech recognition method.

[0127] In the embodiment of the present application, the display 33 may include a display screen (display panel). In some implementations, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In addition, the display 33 may also be a touch panel (touch screen, touch screen), and the touch panel may include a display screen and a touch-sensitive surface. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 32 to determine the type of touch event, and then the processor 32 provides a corresponding visual output on the display device according to the type of touch event.

[0128] 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.

[0129] 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 video target positioning method, characterized in that: The target positioning method comprises: S11, obtaining input video; S12, obtaining reference features of the target and position codes of the reference features according to the first frame of the video; The first frame of the video is a frame containing the target of interest, and the process of obtaining the reference features of the target according to the first frame of the video includes: extracting features from the first frame of the video using a VIT model to obtain the reference features of the target; The process of obtaining the position encoding of the reference feature according to the first frame of the video includes: Obtaining the coordinates of the rectangular frame or center point of the target of interest in the first frame of the video; Using MLP to spatially embed the rectangular frame coordinates or the center point coordinates to obtain a feature matrix; Performing global average pooling on the feature matrix to obtain the position encoding of the reference feature; S13, processing the input video to obtain a video feature matrix; S14, obtaining a reference matrix according to the position code and the reference feature; S15, obtaining a reference feature matrix according to the video feature matrix and the reference matrix; S16, selecting a subsequent frame containing the target from the input video; S17, acquiring an input matrix according to the reference feature matrix, the position code and the frame features of the subsequent frame; S18, fusing the input matrix and the video feature matrix and obtaining a fusion feature according to the fusion result; S19, performing MLP operation on the fusion features to obtain an output matrix; S20, separating the output matrix into a confidence matrix and a rectangular frame coordinate matrix, wherein the confidence matrix is ​​used to represent the confidence of the target, and the rectangular frame coordinate matrix is ​​used to represent the rectangular frame coordinates of the target; S16-S20 are repeatedly executed until the target positioning result is obtained.

2. The target positioning method according to claim 1, characterized in that: The process of processing the input video to obtain a video feature matrix includes: using a neural network to extract features from the input video to obtain the video feature matrix.

3. The target positioning method according to claim 1, characterized in that: The process of obtaining a reference feature matrix according to the video feature matrix and the reference matrix includes: using an encoder to concatenate each vector between the video feature matrix and the reference matrix to obtain the reference feature matrix.

4. The target positioning method according to claim 1, characterized in that: The process of fusing the input matrix and the video feature matrix and obtaining a fusion feature according to the fusion result includes: Inputting the input matrix and the video feature matrix into a decoder for fusion to obtain a fusion output matrix; Performing vector extraction on the fusion output matrix to obtain the fusion feature.

5. The target positioning method according to claim 1, characterized in that: The target positioning method further includes: the confidence of the target is used to determine whether the subsequent frame contains the target, and the rectangular frame coordinates are used to obtain the coordinates of the target.

6. A video target positioning system, characterized in that: The target positioning system comprises: An input video acquisition module is used to acquire input video; A reference feature acquisition module is used to acquire reference features of a target and position coding of the reference features according to the first frame of a video; wherein the first frame of a video is a frame containing a target of interest, and the process of acquiring reference features of a target according to the first frame of a video comprises: performing feature extraction on the first frame of a video using a VIT model to acquire reference features of the target; the process of acquiring position coding of the reference features according to the first frame of a video comprises: acquiring a rectangular frame or center point coordinates of the target of interest in the first frame of the video; performing spatial embedding of the rectangular frame coordinates or the center point coordinates using MLP to acquire a feature matrix; and performing global average pooling on the feature matrix to acquire position coding of the reference features; A video feature matrix acquisition module, used for processing the input video to acquire a video feature matrix; A reference matrix acquisition module, used to acquire a reference matrix according to the position code and the reference feature; A reference feature matrix acquisition module, used to acquire a reference feature matrix according to the video feature matrix and the reference feature; A subsequent frame acquisition module, used for selecting a subsequent frame containing the target from the input video; An input matrix acquisition module, used to acquire an input matrix according to the reference feature matrix, the position code and the frame features of the subsequent frame; A fusion feature acquisition module, used for fusing the input matrix and the video feature matrix and obtaining a fusion feature according to the fusion result; An output matrix acquisition module, used for performing MLP operation on the fusion features to obtain an output matrix; The matrix separation module is used to separate the output matrix into a confidence matrix and a rectangular frame coordinate matrix, wherein the confidence matrix is ​​used to represent the confidence of the target, and the rectangular frame coordinate matrix is ​​used to represent the rectangular frame coordinates of the target.

7. An electronic device, characterized in that: The electronic device comprises: a memory having a computer program stored thereon; A processor is communicatively connected to the memory, and is used to execute the computer program to implement the video target positioning method according to any one of claims 1 to 5.

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