CN113538519A - Target tracking method and device, electronic equipment and storage medium - Google Patents

Target tracking method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113538519A
CN113538519A CN202110826777.3A CN202110826777A CN113538519A CN 113538519 A CN113538519 A CN 113538519A CN 202110826777 A CN202110826777 A CN 202110826777A CN 113538519 A CN113538519 A CN 113538519A
Authority
CN
China
Prior art keywords
feature
frame image
target object
current frame
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110826777.3A
Other languages
Chinese (zh)
Other versions
CN113538519B (en
Inventor
战赓
庄博涵
孙书洋
欧阳万里
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to CN202110826777.3A priority Critical patent/CN113538519B/en
Priority claimed from CN202110826777.3A external-priority patent/CN113538519B/en
Publication of CN113538519A publication Critical patent/CN113538519A/en
Application granted granted Critical
Publication of CN113538519B publication Critical patent/CN113538519B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • G06T7/248Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Abstract

The present disclosure relates to a target tracking method and apparatus, an electronic device, and a storage medium, the method including: aiming at any current frame image after an initial frame image in a video stream, acquiring a first position of a target object in a previous frame image of the current frame image; and obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristic of the target object in the current frame image, wherein the prediction characteristic of the target object in the current frame image is obtained based on the initial frame image of the video stream and the previous frame image of the current frame. The embodiment of the disclosure can accurately realize target tracking.

Description

Target tracking method and device, electronic equipment and storage medium
The application is a divisional application of a Chinese patent application with the application number of 201910555741.9 and the application name of target tracking method and device, electronic equipment and storage medium, which is submitted in 2019, 25/06/month.
Technical Field
The present disclosure relates to the field of computer vision technologies, and in particular, to a target tracking method and apparatus, an electronic device, and a storage medium.
Background
Video object tracking is a key problem in computer vision that has been explored for decades. Video object tracking has important applications in many computer vision sub-fields, such as video pose tracking, video image segmentation, and video object detection.
In recent years, a tracking algorithm based on deep learning has achieved a certain level, but the conventional method is difficult to quickly adapt to the appearance of a sharp change of an object in a video, and thus the effect of the conventional method is influenced.
Disclosure of Invention
The present disclosure provides a technical solution for target tracking.
According to a first aspect of the present disclosure, there is provided a target tracking method, comprising:
aiming at any current frame image after an initial frame image in a video stream, acquiring a first position of a target object in a previous frame image of the current frame image;
and obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristic of the target object in the current frame image, wherein the prediction characteristic of the target object in the current frame image is obtained based on the initial frame image of the video stream and the previous frame image of the current frame.
In some possible embodiments, obtaining the prediction feature of the current frame image includes:
and obtaining the predicted feature of the target object in the current frame image based on the first feature corresponding to the first position of the target object in the previous frame image of the current frame image and the second feature corresponding to the second position of the target object in the initial frame image.
In some possible embodiments, before the obtaining, for any current frame image after an initial frame image in the video stream, a first position where a target object is located in a previous frame image of the current frame image, the method further includes:
and acquiring a second position where the target object is located in the initial frame image and a second feature corresponding to the second position.
In some possible embodiments, the obtaining the second position where the target object is located in the initial frame image includes at least one of the following manners:
acquiring a position mask image aiming at the target object in the initial frame image, and determining a second position of the target object based on the mask image;
receiving a framing operation aiming at the initial frame image, and determining a second position of the target object based on a position area corresponding to the framing operation;
and executing target detection operation on the initial frame image, and determining a second position of the target object based on a detection result of the target detection operation.
In some possible embodiments, the obtaining the predicted feature of the target object in the current frame image based on a first feature corresponding to a first position of the target object in a previous frame image of the current frame image and a second feature corresponding to a second position of the target object in the initial frame image includes:
performing convolution processing on the first feature and the second feature respectively to obtain a first transition feature of the first feature and a second transition feature of the second feature;
performing first cross-correlation coding processing and graph convolution processing on the first transition feature and the second transition feature to obtain a third feature;
and obtaining the prediction feature based on feature fusion processing of the third feature, the first transition feature and the second feature.
In some possible embodiments, the performing a first cross-correlation encoding process and a graph convolution process on the first transition feature and the second transition feature to obtain a third feature includes:
performing first cross-correlation coding processing on the first transition characteristic and the second transition characteristic to obtain a first coding characteristic;
and inputting the first coding feature into a graph neural network to execute graph convolution processing to obtain the third feature.
In some possible embodiments, performing a first cross-correlation encoding process on the first transition feature and the second transition feature to obtain a first encoded feature includes:
and performing matrix multiplication operation on the first transition characteristic and the second transition characteristic to obtain the first coding characteristic.
In some possible embodiments, the obtaining the predicted feature based on the feature fusion processing of the third feature, the first transition feature and the second feature includes:
performing cross-correlation decoding processing of the third feature based on the first transition feature to obtain a fourth feature;
and performing summation processing on the fourth feature and the second feature to obtain the predicted feature.
In some possible embodiments, the obtaining the position information of the target object in the current frame image based on the first position and the predicted feature of the target object in the current frame image includes:
determining a search area for the target object in the current frame image and a fifth feature corresponding to the search area based on the first position;
taking the prediction characteristic as a convolution kernel, and executing second cross-correlation coding processing of the fifth characteristic to obtain a second coding characteristic;
and executing target detection processing of the target object based on the second coding characteristics to obtain the position information of the target object in the current frame image.
In some possible embodiments, determining a search area for the target object in the any one frame image based on the first position includes:
and amplifying the first position by a preset multiple by taking the first position as a center to obtain a search area aiming at the target object in the current frame image.
In some possible embodiments, the second cross-correlation encoding process of the fifth feature is performed with the predicted feature as a convolution kernel, and includes:
and taking the prediction characteristic as a convolution kernel, and performing convolution processing on the fifth characteristic to obtain the second coding characteristic.
In some possible embodiments, the performing the target detection process of the target object based on the second encoding characteristic to obtain the position information of the target object in the current frame image includes:
and inputting the second coding feature into a target detection network to obtain the position information aiming at the target object in the search area.
In some possible embodiments, the target tracking method is applied in a twin neural network comprising a first branch network, a second branch network, and a feature update network and a target detection network, wherein the first branch network and the second branch network are the same;
the first branch network is used for detecting a second position of a target object in the initial frame image and a second feature corresponding to the second position;
the second branch network is used for detecting a first position of a target object in a previous frame image of any current frame image after the initial frame image and a first feature corresponding to the first position;
the feature updating network is used for obtaining a prediction feature based on an initial frame image and a previous frame image of a current frame image;
the target detection network is used for obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristics of the current frame image.
In some possible embodiments, the method further comprises:
highlighting the position information of the target object in an image frame of the video stream.
According to a second aspect of the present disclosure, there is provided a target tracking device comprising:
the detection module is used for acquiring a first position of a target object in a previous frame image of a current frame image aiming at any current frame image behind an initial frame image in a video stream;
a tracking module, configured to obtain location information of a target object in a current frame image based on the first location and a prediction feature of the target object in the current frame image, where the prediction feature of the target object in the current frame image is obtained based on an initial frame image of the video stream and a previous frame image of the current frame.
In some possible embodiments, the tracking module comprises:
and the prediction unit is used for obtaining the prediction characteristic of the current frame image, and obtaining the prediction characteristic of the target object in the current frame image based on a first characteristic corresponding to a first position of the target object in a previous frame image of the current frame image and a second characteristic corresponding to a second position of the target object in the initial frame image.
In some possible embodiments, the detection module is further configured to obtain a second position where the target object is located in the initial frame image, and a second feature corresponding to the second position.
In some possible embodiments, the obtaining, by the detection module, a second position where the target object is located in the initial frame image includes at least one of:
acquiring a position mask image aiming at the target object in the initial frame image, and determining a second position of the target object based on the mask image;
receiving a framing operation aiming at the initial frame image, and determining a second position of the target object based on a position area corresponding to the framing operation;
and executing target detection operation on the initial frame image, and determining a second position of the target object based on a detection result of the target detection operation.
In some possible embodiments, the prediction unit is further configured to perform convolution processing on the first feature and the second feature respectively to obtain a first transition feature of the first feature and obtain a second transition feature of the second feature;
performing first cross-correlation coding processing and graph convolution processing on the first transition feature and the second transition feature to obtain a third feature;
and obtaining the prediction feature based on feature fusion processing of the third feature, the first transition feature and the second feature.
In some possible embodiments, the prediction unit is further configured to perform a first cross-correlation coding process on the first transition feature and the second transition feature to obtain a first coding feature;
and inputting the first coding feature into a graph neural network to execute graph convolution processing to obtain the third feature.
In some possible embodiments, the prediction unit is further configured to perform a matrix multiplication operation on the first transition feature and the second transition feature to obtain the first encoding feature.
In some possible embodiments, the prediction unit is further configured to perform a cross-correlation decoding process on the third feature based on the first transition feature, resulting in a fourth feature;
and performing summation processing on the fourth feature and the second feature to obtain the predicted feature.
In some possible embodiments, the tracking module further includes a tracking unit, configured to determine a search area for the target object in the current frame image and a fifth feature corresponding to the search area based on the first position;
taking the prediction characteristic as a convolution kernel, and executing second cross-correlation coding processing of the fifth characteristic to obtain a second coding characteristic;
and executing target detection processing of the target object based on the second coding characteristics to obtain the position information of the target object in the current frame image.
In some possible embodiments, the tracking unit is further configured to amplify the first position by a preset multiple with the first position as a center, so as to obtain a search area for the target object in the current frame image.
In some possible embodiments, the tracking unit is further configured to perform convolution processing on the fifth feature by using the predicted feature as a convolution kernel, so as to obtain the second encoding feature.
In some possible embodiments, the tracking unit is further configured to input the second encoding characteristic to a target detection network, so as to obtain location information for the target object in the search area.
In some possible embodiments, the target tracking device comprises a twin neural network, the detection module comprises a first branch network and a second branch network of the twin neural network, the tracking module comprises a feature update network and a target detection network of the twin neural network, the first branch network and the second branch network are the same;
the first branch network is used for detecting a second position of a target object in the initial frame image and a second feature corresponding to the second position;
the second branch network is used for detecting a first position of a target object in a previous frame image of any current frame image after the initial frame image and a first feature corresponding to the first position;
the feature updating network is used for obtaining a prediction feature based on an initial frame image and a previous frame image of a current frame image;
the target detection network is used for obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristics of the current frame image.
In some possible implementations, a display module to highlight the location information of the target object in image frames of the video stream.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of the first aspects.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any one of the first aspects.
In the embodiment of the present disclosure, the position of the target object in the subsequent image may be sequentially obtained according to the position information of the target object in the initial frame image, wherein the prediction feature of the target object in the current frame image may be obtained according to a previous frame image of any current frame image and the initial frame image, and the position of the target object in the current frame image may be determined according to the first position in the previous frame image and the obtained prediction feature, wherein the target object may be accurately tracked in an effective forward propagation manner, and meanwhile, the appearance of the object that changes dramatically may be quickly adapted.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a flow diagram of a target tracking method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating obtaining predicted features of a target object in a target tracking method according to step S20 of the present disclosure;
fig. 3 shows a flowchart of step S32 in a target tracking method according to an embodiment of the present disclosure;
FIG. 4 illustrates a schematic structural diagram of deriving predicted features according to an embodiment of the present disclosure;
fig. 5 shows a flowchart of step S20 in a target tracking method according to an embodiment of the present disclosure;
FIG. 6 illustrates a process diagram for implementing target tracking according to an embodiment of the present disclosure;
FIG. 7 illustrates a block diagram of a target tracking device in accordance with an embodiment of the present disclosure;
FIG. 8 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure;
FIG. 9 shows another block diagram of an electronic device in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The disclosed embodiments provide a target tracking method that may be used to track a target object in successive image frames. The method of the embodiments of the present disclosure may be applied to any image processing apparatus, for example, the image processing method may be executed by a terminal device or a server or other processing devices, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the image processing method may be implemented by a processor calling computer readable instructions stored in a memory.
Fig. 1 shows a flowchart of a target tracking method according to an embodiment of the present disclosure, as shown in fig. 1, the target tracking method includes:
s10: and acquiring a first position of a target object in a previous frame image of the current frame image aiming at any current frame image behind the initial frame image in the video stream.
The embodiments of the present disclosure may be used for tracking a target object in a video stream, where the target object may be any type of object, such as a specific person, an animal, or any other object appearing in an image, and the type of the target object is not particularly limited by the present disclosure, and may be determined according to a specific application purpose.
In some possible implementations, the multi-frame image obtained by performing the frame selection operation on the video stream in the embodiment of the present disclosure may perform target object tracking, or all the images in the video stream may also be directly used as the multi-frame image to be performed with target object tracking. Wherein the frame images may be ordered in the order of the time frames.
In some possible embodiments, the position of the target object in the previous frame image may be used to predict the position of the target object in the next frame image, so when performing detection on the target object in any current frame image after the initial frame image in the video stream, the detection result of the target object in the previous frame image of the current frame image, that is, the first position where the target object is located in the previous frame image, may be obtained first, and then the position of the current frame image may be further predicted according to the position.
The method includes the steps of firstly obtaining the position of a target object in an initial frame image of a video stream, wherein the position of the target object in the initial frame image can be obtained through target detection or input by a user, without limitation, then predicting the position of the target object in a second frame image according to the position of the target object in the initial frame image, and so on, and obtaining the positions of the target objects in the other frame images.
S20: and obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristic of the target object in the current frame image, wherein the prediction characteristic of the current frame image is obtained based on the initial frame image of the video stream and the previous frame image of the current frame.
In some possible embodiments, a search region corresponding to a first position in the current frame image may be determined based on the first position of the target object in a previous frame image of the current frame image, and a position region matching the prediction feature may be determined in the search region according to the prediction feature, that is, the position of the target object in the current frame image.
Based on the above configuration, the embodiment of the present disclosure may predict the position of the target object of the current frame image according to the position of the target object of the previous frame image of the current frame image and the obtained prediction characteristics of the target object in the current frame image, where the target object of the current frame image may be quickly tracked in a forward propagation manner.
The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
The embodiment of the present disclosure may first obtain a position (second position) of the target object in the initial frame image and a second feature corresponding to the second position. In some possible embodiments, the second position may be expressed as coordinates of two diagonal vertices of a rectangular box corresponding to the position area of the target object, or may also be expressed as coordinates of one vertex, and length and width information. The corresponding position area of the target object in the initial frame image can be determined through the above information, the second position can be expressed in other forms in other embodiments, or the manner of expressing the position information about the target object in the embodiment of the present disclosure can be the above manner, or can be expressed in other manners, which is not specifically limited by the present disclosure.
The manner of obtaining the second position of the target object in the initial frame image of the video stream may include at least one of the following:
a) acquiring a position mask image aiming at the target object in the initial frame image, and determining a second position of the target object based on the mask image;
in some possible embodiments, the mask map may be represented in a matrix form corresponding to the dimension of the initial frame image, each mask value in the mask map corresponds to a pixel in the initial frame image one to one, and the mask value may be represented as a first code value or a second code value, where the first code value represents an area where the target object is located, for example, the first code value may be "1", the second code value may be "0", and at this time, a set of pixels corresponding to the first code value "1" is a location area of the second location where the target object is located. The mask map may be information input by the user, or may be a mask map obtained by the target object detection processing operation.
b) Receiving a framing operation aiming at the initial frame image, and determining a second position of the target object based on a position area corresponding to the framing operation;
in some possible embodiments, a frame selection operation on the initial frame image may be received through the input component, where the input component may include a mouse, a touch pad, a keyboard, or another device capable of receiving the frame selection operation, where the frame selection operation is an operation of selecting an area of a target object in the initial frame image, where the frame selection operation may obtain a selection area, and a position corresponding to the selection area is the second position.
The selection area obtained by the framing operation may be a regular square, and at this time, the second position may be determined as the position of the selection area corresponding to the framing operation, or the selection area obtained by the framing operation may also be an irregular figure line, and at this time, the smallest square area including the irregular image may be determined based on the irregular figure, and the second position may be the position determined as the square area.
c) And executing target detection operation on the initial frame image, and determining a second position of the target object based on a detection result of the target detection operation.
In some possible embodiments, the initial frame image may be input into a neural network capable of performing detection of the target object, such as a Mask-RCNN (Mask-based convolutional neural network for target recognition), to obtain a Mask map of the position where the target object is located, so as to determine the second position.
When the second position in the initial frame image for the target object is obtained, the second feature corresponding to the second position can be obtained. The image region corresponding to the second position may be captured from the initial frame image, and feature extraction processing may be performed on the image region to obtain the second feature, or feature extraction processing may be performed on the initial frame image to obtain the image feature of the initial frame image, and then the second feature corresponding to the second position in the image feature of the initial frame image is obtained based on the second position. The first feature, the second feature, the subsequent first transition feature, the subsequent second transition feature, the subsequent third feature, the subsequent fourth feature, and the subsequent fifth feature of the embodiment of the present disclosure are image features of the target object, and by detecting the above features and performing fusion optimization and other processing on the features, feature information with higher accuracy can be obtained, so that the position of the target object in each frame of image is detected more accurately.
Further, under the condition that the second position and the corresponding second feature of the target object in the initial frame image are obtained, the positions of the target object in the other frame images can be sequentially obtained according to the sequence of the image frames. The prediction feature of the target object in the current frame image can be obtained according to the initial frame image and the previous frame image of the current frame image.
Fig. 2 shows a flowchart for obtaining a predicted feature of a target object in a target tracking method according to an embodiment of the present disclosure. As shown in fig. 2, the obtaining of the prediction characteristic of the current frame image includes:
s31: obtaining a second feature corresponding to a second position in the initial frame image and a first feature corresponding to the first position in a previous frame image of any frame image;
in some possible embodiments, when performing feature prediction of a target object on any current frame image after the initial frame image in a video stream, the feature of the target object in any frame image may be predicted according to a detection result (i.e., the second position) of the target object in the initial frame and a detection result (i.e., the first position) of the target object in a previous frame image before the current frame image.
For example, feature extraction may be performed on image regions corresponding to the second position in the initial frame image and the first position in the previous frame image, respectively, to obtain corresponding feature information, that is, the second feature and the first feature. Alternatively, the feature extraction processing may be performed on the initial frame image and the previous frame image, and then the second position corresponding to the second position is obtained from the image features of the initial frame image, and the first feature corresponding to the first position is obtained from the image features of the previous frame image. And obtaining the prediction characteristic of the current frame image through the obtained first characteristic and the second characteristic.
Wherein, the feature extraction can be executed through a residual error network to respectively obtain the first feature and the second feature. The feature extraction process may be performed by other feature extraction networks in other embodiments.
Wherein, in response to the current frame image being the second frame image, the first position of the target object in the previous frame image of the current frame image is the second position of the target object in the initial frame image. Correspondingly, the second feature of the second location is the first feature of the first location. That is to say, for a second frame image in the video stream, that is, a next frame image of the initial frame image, the previous frame image is the initial frame image, the first position of the target object of the previous frame image is the second position of the target object in the initial frame, and the first feature corresponding to the first position is the second feature corresponding to the second position. The predicted feature of the target object in the second frame image may be determined based on a second position of the target object in the initial frame image. For the nth frame image after the second frame image, the predicted feature can be obtained according to the second feature corresponding to the second position of the target object in the initial frame image and the first feature corresponding to the first position of the target object in the n-1 th frame image. n is an integer greater than 2, which represents the number of frames of the current frame.
S32: and obtaining the predicted feature of the target object in the current frame image based on the first feature of the target object in the previous frame image of the current frame image and the second feature corresponding to the second position of the target object in the initial frame image.
In some possible embodiments, the predicted feature of the target object in the current frame image may be predicted based on the second feature of the target object in the initial frame image and the first feature of the target object in a frame image previous to the current frame image. The predicted feature may be obtained, for example, by performing cross-correlation processing, convolution processing, or the like on the first feature and the second feature.
Fig. 3 shows a flowchart of step S32 in a target tracking method according to an embodiment of the present disclosure. Wherein the obtaining of the predicted feature of the target object in the current frame image based on the first feature of the target object in the previous frame image of the current frame image and the second feature corresponding to the second position of the target object in the initial frame image includes:
s321: performing convolution processing on the first feature and the second feature respectively to obtain a first transition feature of the first feature and a second transition feature of the second feature respectively;
in some possible embodiments, the convolution processing may be performed on the first feature and the second feature respectively to obtain a first transition feature corresponding to the first feature and a second transition feature corresponding to the second feature. Wherein the feature information about the target object included in the first transition feature can be made more accurate with respect to the first feature and the feature information about the target object included in the second transition feature can be made more accurate with respect to the second feature by the convolution processing. The convolution kernels for performing convolution processing on the first feature and the second feature may be the same or different, such as convolution kernels of 1 × 1, or convolution kernels of other forms may also be used.
FIG. 4 shows a schematic diagram of a structure for obtaining a predicted feature according to an embodiment of the present disclosure. Wherein, the second feature of the second position corresponding to the target object in the initial frame image can be represented as F0The first feature of the first position corresponding to the target object in the previous frame image of any one frame image can be represented as Ft-1T represents the number of frames corresponding to an image frame, and t is a positive integer.
In the embodiment of the present disclosure, the dimensions of the first feature and the second feature are the same and may be represented as C × W × H, where C represents the number of channels, W represents the width of the feature, and H represents the height of the feature. Wherein the first feature and the second feature are in the form of matrices, respectively. Corresponding first transition features obtained by convolution processing
Figure BDA0003174028700000081
May be C1xWxH, and a second transition feature
Figure BDA0003174028700000082
May be C2xW x H, wherein C1And C2The number of channels respectively used for representing the corresponding transition features may be the same value or different values, and W and H may respectively represent the width and height of the transition features.
S322: performing first cross-correlation coding processing and graph convolution processing on the first transition feature and the second transition feature to obtain a third feature;
in the case of obtaining the first transition feature and the second transition feature, a first cross-correlation encoding process (cross correlation) and a graph convolution process (conv1d and conv2d) may be performed on the first transition feature and the second transition feature to fuse feature information of the first transition feature and the second transition feature, so as to obtain a third feature fusing feature information of the first transition feature and the second transition feature, where a dimension of the third feature may be represented as C2×C1
In some possible embodiments, the first cross-correlation encoding process may be expressed as a matrix multiplication operation, that is, the matrix multiplication operation may be performed through the first transition feature and the second transition feature, and the first cross-correlation encoding process is performed to obtain a corresponding third transition feature E, where the dimension of the third transition feature is C2×C1. And then inputting the third transition feature into a graph neural network to execute graph convolution processing to obtain a third feature. Wherein the third feature also has a dimension of C2×C1. The graph neural network of the embodiment of the present disclosure may perform convolution processing (conv1d and conv2d) twice on the third transition feature to obtain a third feature ErefIn other embodiments, other convolution processes may be performed, and the disclosure is not limited thereto.
S323: and obtaining the prediction feature based on feature fusion processing of the third feature, the first transition feature and the second feature.
In some possible embodiments, a feature fusion process may be first performed on the third feature and the first transition feature, that is, a cross-correlation decoding process may be performed on the third feature through the first transition feature to obtain a decoded feature, and then a convolution process may be performed on the decoded feature to obtain a fourth feature M' that fuses feature information in the first transition feature and the third feature. The dimensions of the fourth feature are the same as the dimensions of the second feature. And performing cross-correlation decoding processing on the third feature through the second transition feature, wherein convolution processing can be performed on the second transition feature and the third feature to obtain the decoding feature.
Then, the fourth feature and the second feature are added, for example, the feature values of the corresponding elements are added, thereby obtaining the pre-processingCharacteristic measurement FfinalThe predicted feature further fuses feature information of the second feature. Meanwhile, the predicted feature can be used for representing feature information of the target object in the current frame image.
The dimension of the fourth feature may be the same as the dimension of the second feature, i.e., C × W × H. Or in some embodiments, the feature fusion processing is performed on the third feature and the first transition feature, that is, the feature obtained by performing convolution processing on the third feature and the first transition feature may be an intermediate feature, and the dimension of the intermediate feature may be C2Xwxh, and further performing convolution processing on the intermediate features may result in a fourth feature, i.e., a feature having a dimension of C × W × H.
And then, performing summation processing on the fourth characteristic and the second characteristic to obtain a predicted characteristic. The dimensions of the predicted features are also C W H.
When the prediction feature of the current frame is obtained, the position of the target object in the current frame image can be detected according to the prediction feature.
Fig. 5 shows a flowchart of step S20 in a target tracking method according to an embodiment of the present disclosure. Wherein the obtaining of the position information of the target object in the current frame image based on the first position and the prediction feature of the target object in the current frame image includes:
s201: determining a search area for the target object in the current frame image and a fifth feature corresponding to the search area based on the first position;
in some possible embodiments, the search area for the target object in the current frame image may be determined according to a first position of the target object in a previous frame image of the current frame image. The position area corresponding to the first position can be amplified according to a preset multiple, and the amplified position area can be used as a search area in the current frame image. With this configuration, it is possible to ensure that the target object is within the search area.
The preset multiple may be a preset value, which may be determined according to the type or application scenario of the target object, and may be, for example, 2, or in other embodiments, other values may also be used.
In some possible embodiments, after the search area is determined, the fifth feature corresponding to the search area may be obtained, where feature extraction processing of the image of the search area may be performed by using a feature extraction network to obtain the fifth feature of the target object, or feature extraction processing may be performed on the current frame image, and feature information corresponding to the search area, that is, the fifth feature, may be selected from image features of the current frame image.
After the feature information of the search area is obtained, the matching between the predicted feature and the feature information of the search area may be performed, wherein the feature extraction process may also be implemented by a residual error network, and the disclosure is not particularly limited.
S202: taking the prediction characteristic as a convolution kernel, and executing second cross-correlation coding processing of the fifth characteristic to obtain a second coding characteristic;
in the case of obtaining the fifth feature and the predicted feature, a cross-correlation encoding process may be performed on the fifth feature and the predicted feature to obtain a second encoded feature. The second encoding characteristic may be obtained by performing a convolution process on the fifth characteristic using the prediction characteristic as a convolution kernel to perform the cross-correlation encoding process. The dimensions of the second coding feature are the same as the dimensions of the fifth feature. The second encoding characteristic of the embodiment of the present disclosure may represent a matching degree of the prediction characteristic with each pixel point in the cable region.
S203: and executing target detection processing of the target object based on the second coding feature to obtain the position information of the target object in the current image.
In the case of obtaining the second encoding characteristic, the target detection processing may be performed on the second encoding characteristic, and the embodiment of the present disclosure may perform the target detection processing operation by using the area candidate network, to obtain a candidate frame of the target object corresponding to the second encoding characteristic, that is, a position of the target object.
In some possible implementations, multiple candidate boxes may be obtained for the target object, and the embodiments of the present disclosure may determine the position of the target object based on the candidate box with the highest confidence. The target detection processing can be realized through the regional candidate network, and the position of the candidate frame aiming at the target object is obtained.
According to the embodiment of the disclosure, the position of the target object in each image frame of the video stream can be obtained in a forward propagation manner, so that the target object can be tracked quickly and accurately.
In some possible embodiments, in the case that the position of the target object in the image is detected, the position information of the target object may be highlighted, for example, the position area where the target object is located is marked in the manner of a detection frame, so that the area where the target object is located may be conveniently known, and the highlighting manner is not particularly limited by the present disclosure.
In the following, the process of object tracking is illustrated for the sake of more clearly showing the embodiments of the present disclosure. FIG. 6 shows a process diagram for implementing target tracking according to an embodiment of the present disclosure.
The target tracking method of the embodiments of the present disclosure may be implemented by a twin network. Fig. 6 is a schematic diagram of the network architecture. The target tracking method of the embodiment of the disclosure can be applied to a twin neural network. The twin neural network may include a first branch network, a second branch network, and a feature update network and a target detection network, wherein the first branch network and the second branch network are the same; the first branch network is used for detecting a second position of the target object in the initial frame image and a second feature corresponding to the second position; the second branch network is used for detecting a first position of a target object in a previous frame image of any current frame image after the initial frame image and a first characteristic corresponding to the first position; the characteristic updating network is used for obtaining a prediction characteristic based on an initial frame image and a previous frame image of a current frame image; and the target detection network is used for obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristics of the current frame image. The method can further comprise a third branch network, and the third branch network is used for obtaining a fifth feature corresponding to the search area of the current frame image. The third branch network may be the same as the first branch network and the second branch network. For any frame image (hereinafter, current frame image) after the initial frame image of the video stream, the position information of the target object of the current frame image can be determined based on the position of the target object in the initial frame image and the position of the target object of the previous frame image of the current frame.
Specifically, first, feature extraction processing is respectively performed on an image region corresponding to a first position of an initial frame image and an image region corresponding to a second position of a previous frame image through a first branch network and a second branch network, for example, corresponding first features and second features are respectively obtained through a feature extraction network. The first branch network and the second branch network can be respectively realized by a network for realizing feature extraction of a target object, the feature extraction network can comprise a residual error module (Res) and a convolution module (T), the residual error module can be composed of a residual error neural network, such as Resnet-18, residual error processing of an image area at a first position and an image area at a second position is respectively executed through the two residual error neural networks, and then convolution operation of a structure of the residual error processing is executed through the convolution module, so that the first feature and the second feature of the target object are more accurate. The characteristic information of the target object in the image area corresponding to the first position and the second position can be more accurately extracted through the residual error processing and the convolution processing. In other embodiments, the feature extraction may be implemented only by a residual network, or may be implemented by other feature extraction networks.
Under the condition of obtaining the first feature and the second feature, the first feature and the second feature are processed by using a feature Update network (e.g., a feature Update module shown in fig. 6), so as to obtain a predicted feature of the target object in the current frame image. The convolution processing, the first cross-correlation coding, and the graph convolution processing may be performed on the first feature and the second feature, and then the feature fusion is performed to obtain the predicted feature (refer to the embodiment shown in fig. 4).
Under the condition of obtaining the prediction characteristics, a search area of the current frame image can be determined based on the first position area, then the characteristics corresponding to the search area are subjected to characteristic extraction processing through a third branch network to obtain the characteristics corresponding to the search area, and then the final position of the target object in the current frame image is obtained through cross-correlation coding and target detection of a target detection network based on the prediction characteristics and the characteristic information corresponding to the search area. In the embodiment of the disclosure, the appearance change of the object is considered through the twin network, and the prediction characteristic is obtained by accurately performing the updating of the characteristic.
The method mainly comprises the following steps of extracting a target feature template of an initial frame (second feature extraction), extracting a target feature template of a previous frame (first feature extraction), updating a template online updating module (obtaining a predicted feature), extracting a feature of a current frame search area, and obtaining the position of a current frame tracking target by template matching. The following subsections describe module implementations.
Target feature template extraction for the initial frame (first branch network):
inputting: the coordinate position of the object in the initial frame and the image of the initial frame;
and (3) outputting: a target feature template (second feature) for the initial frame;
the method comprises the following specific steps: and acquiring an image block (an image area corresponding to the second position) by taking the position of the object as a center, and performing feature extraction through a neural network to be used as a feature template (a second feature) of the object in the initial frame.
Target feature template extraction for the previous frame (second branch network):
inputting: coordinate position of object in previous frame, image of previous frame
And (3) outputting: a target feature template (first feature) of a previous frame;
the method comprises the following specific steps: and acquiring an image block (an image area corresponding to the first position) by taking the position of the object as a center, and performing feature extraction through a neural network to be used as a feature template (a first feature) of the object in the previous frame.
Template online updating module to obtain prediction characteristics (characteristic updating network):
inputting: a feature template (second feature) of an initial frame target, a feature template (first feature) of a previous frame target;
and (3) outputting: a feature template (prediction feature) applicable to the current frame;
the method comprises the following specific steps: respectively using a convolution layer to perform feature transition on the feature template (second feature) of the initial frame target and the feature template (first feature) of the previous frame target (to obtain a first transition feature and a second transition feature), and then using cross-correlation operation to perform first cross-correlation coding on the two feature templates after transition. The obtained first coding feature can be understood as a Graph (Graph), then feature interaction and feature updating of each node are realized by utilizing a Graph neural network, and two steps of operation of Graph convolution processing are realized by using convolution respectively (obtaining a second feature). The obtained updated second feature is then decoded to the same feature space as the input of the present module by cross-correlation operation as updated feature information (predicted feature). This information is added to the template features of the original frame target as the output of this module, i.e., the updated template features.
Search region feature extraction of the current frame (third branch network):
inputting: coordinate position of object in current frame, image of current frame
And (3) outputting: the search area characteristics of the current frame.
The method comprises the following specific steps: and acquiring an image block by taking the first position as a center, namely acquiring a search area (for example, the size of the search area is twice of the size of the template), and extracting features through a neural network to be used as the features of the search area of the current frame.
Template matching to obtain the position of the current frame tracking target (target detection network):
inputting: updated feature template (predicted feature), the features of the current frame search area;
and (3) outputting: the position of the target object in the current frame image.
The method comprises the following specific steps: and performing cross-correlation operation (convolution processing), performing similarity comparison on each position of the feature template and the search area, taking a similarity result as input, and correcting the position of the object in the current frame by using the area with the highest classification score as the position of the object in the current frame through two neural network modules of classification and regression.
In the embodiment of the present disclosure, the position of the target object in the subsequent image may be sequentially obtained according to the position information of the target object in the initial frame image, wherein the prediction feature of the target object in the current frame image may be obtained according to the previous frame image of the current frame image and the initial frame image, and the position of the target object in the current frame image may be determined according to the first position in the previous frame image and the obtained prediction feature, wherein the target object may be tracked in an effective forward propagation manner, and meanwhile, the appearance of the object that changes dramatically may be quickly adapted.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides a target tracking device, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the target tracking methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the methods section are not repeated.
Fig. 7 shows a block diagram of a target tracking device according to an embodiment of the present disclosure, as shown in fig. 7, the target tracking device includes:
the detection module 10 is configured to, for any current frame image after an initial frame image in a video stream, obtain a first position where a target object is located in a previous frame image of the current frame image;
a tracking module 20, configured to obtain position information of a target object in a current frame image based on the first position and a prediction characteristic of the target object in the current frame image, where the prediction characteristic of the target object in the current frame image is obtained based on an initial frame image of the video stream and a previous frame image of the current frame.
In some possible embodiments, the tracking module 20 comprises:
and the prediction unit is used for obtaining the prediction characteristic of the current frame image, and obtaining the prediction characteristic of the target object in the current frame image based on a first characteristic corresponding to a first position of the target object in a previous frame image of the current frame image and a second characteristic corresponding to a second position of the target object in the initial frame image.
In some possible embodiments, the detection module 10 is further configured to obtain a second position where the target object is located in the initial frame image, and a second feature corresponding to the second position.
In some possible embodiments, the detecting module 10 obtains the second position of the target object in the initial frame image, and includes at least one of the following manners:
acquiring a position mask image aiming at the target object in the initial frame image, and determining a second position of the target object based on the mask image;
receiving a framing operation aiming at the initial frame image, and determining a second position of the target object based on a position area corresponding to the framing operation;
and executing target detection operation on the initial frame image, and determining a second position of the target object based on a detection result of the target detection operation.
In some possible embodiments, the prediction unit is further configured to perform convolution processing on the first feature and the second feature respectively to obtain a first transition feature of the first feature and obtain a second transition feature of the second feature;
performing first cross-correlation coding processing and graph convolution processing on the first transition feature and the second transition feature to obtain a third feature;
and obtaining the prediction feature based on feature fusion processing of the third feature, the first transition feature and the second feature.
In some possible embodiments, the prediction unit is further configured to perform a first cross-correlation coding process on the first transition feature and the second transition feature to obtain a first coding feature;
and inputting the first coding feature into a graph neural network to execute graph convolution processing to obtain the third feature.
In some possible embodiments, the prediction unit is further configured to perform a matrix multiplication operation on the first transition feature and the second transition feature to obtain the first encoding feature.
In some possible embodiments, the prediction unit is further configured to perform a cross-correlation decoding process on the third feature based on the first transition feature, resulting in a fourth feature;
and performing summation processing on the fourth feature and the second feature to obtain the predicted feature.
In some possible embodiments, the tracking module further includes a tracking unit, configured to determine a search area for the target object in the current frame image and a fifth feature corresponding to the search area based on the first position;
taking the prediction characteristic as a convolution kernel, and executing second cross-correlation coding processing of the fifth characteristic to obtain a second coding characteristic;
and executing target detection processing of the target object based on the second coding characteristics to obtain the position information of the target object in the current frame image.
In some possible embodiments, the tracking unit is further configured to amplify the first position by a preset multiple with the first position as a center, so as to obtain a search area for the target object in the current frame image.
In some possible embodiments, the tracking unit is further configured to perform convolution processing on the fifth feature by using the predicted feature as a convolution kernel, so as to obtain the second encoding feature.
In some possible embodiments, the tracking unit is further configured to input the second encoding characteristic to a target detection network, so as to obtain location information for the target object in the search area.
In some possible embodiments, the target tracking device comprises a twin neural network, the detection module comprises a first branch network and a second branch network of the twin neural network, the tracking module comprises a feature update network and a target detection network of the twin neural network, the first branch network and the second branch network are the same;
the first branch network is used for detecting a second position of a target object in the initial frame image and a second feature corresponding to the second position;
the second branch network is used for detecting a first position of a target object in a previous frame image of any current frame image after the initial frame image and a first feature corresponding to the first position;
the feature updating network is used for obtaining a prediction feature based on an initial frame image and a previous frame image of a current frame image;
the target detection network is used for obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristics of the current frame image.
In some possible embodiments, the apparatus further comprises: a display module for highlighting the position information of the target object in an image frame of the video stream.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
FIG. 8 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 8, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
FIG. 9 shows another block diagram of an electronic device in accordance with an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 9, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (15)

1. An object tracking method applied in a twin neural network, the twin neural network comprising a first branch network, a second branch network, a feature update network and an object detection network, wherein the first branch network and the second branch network are the same, the method comprising:
detecting a second position of a target object in an initial frame image in a video stream and a second feature corresponding to the second position through the first branch network;
for any current frame image after the initial frame image, detecting a first position of a target object in a previous frame image of the current frame image and a first feature corresponding to the first position through the second branch network;
obtaining the prediction characteristics of a target object in the current frame image based on the initial frame image and the previous frame image of the current frame image through the characteristic updating network;
and obtaining the position information of the target object in the current frame image based on the first position and the prediction characteristics through the target detection network.
2. The method of claim 1, wherein obtaining the predicted feature of the current frame image comprises:
and obtaining the predicted feature of the target object in the current frame image based on the first feature corresponding to the first position of the target object in the previous frame image of the current frame image and the second feature corresponding to the second position of the target object in the initial frame image.
3. The method of claim 1, wherein detecting the second location of the target object within the initial frame image comprises at least one of:
acquiring a position mask image aiming at the target object in the initial frame image, and determining a second position of the target object based on the mask image;
receiving a framing operation aiming at the initial frame image, and determining a second position of the target object based on a position area corresponding to the framing operation;
and executing target detection operation on the initial frame image, and determining a second position of the target object based on a detection result of the target detection operation.
4. The method of claim 2, wherein obtaining the predicted feature of the target object in the current frame image based on a first feature corresponding to a first position of the target object in a previous frame image of the current frame image and a second feature corresponding to a second position of the target object in the initial frame image comprises:
performing convolution processing on the first feature and the second feature respectively to obtain a first transition feature of the first feature and a second transition feature of the second feature;
performing first cross-correlation coding processing and graph convolution processing on the first transition feature and the second transition feature to obtain a third feature;
and obtaining the prediction feature based on feature fusion processing of the third feature, the first transition feature and the second feature.
5. The method of claim 4, wherein performing a first cross-correlation encoding process and a graph convolution process on the first transition feature and the second transition feature to obtain a third feature comprises:
performing first cross-correlation coding processing on the first transition characteristic and the second transition characteristic to obtain a first coding characteristic;
and inputting the first coding feature into a graph neural network to execute graph convolution processing to obtain the third feature.
6. The method of claim 5, wherein performing a first cross-correlation encoding process on the first transition feature and the second transition feature to obtain a first encoded feature comprises:
and performing matrix multiplication operation on the first transition characteristic and the second transition characteristic to obtain the first coding characteristic.
7. The method according to claim 4, wherein obtaining the predicted feature based on a feature fusion process of the third feature, the first transition feature and the second feature comprises:
performing cross-correlation decoding processing of the third feature based on the first transition feature to obtain a fourth feature;
and performing summation processing on the fourth feature and the second feature to obtain the predicted feature.
8. The method according to any one of claims 1 to 7, wherein the obtaining the position information of the target object in the current frame image based on the first position and the predicted feature of the target object in the current frame image comprises:
determining a search area for the target object in the current frame image and a fifth feature corresponding to the search area based on the first position;
taking the prediction characteristic as a convolution kernel, and executing second cross-correlation coding processing of the fifth characteristic to obtain a second coding characteristic;
and executing target detection processing of the target object based on the second coding characteristics to obtain the position information of the target object in the current frame image.
9. The method of claim 8, wherein determining a search area in the image of any frame for the target object based on the first position comprises:
and amplifying the first position by a preset multiple by taking the first position as a center to obtain a search area aiming at the target object in the current frame image.
10. The method of claim 8, wherein performing a second cross-correlation encoding process of the fifth feature using the predicted feature as a convolution kernel comprises:
and taking the prediction characteristic as a convolution kernel, and performing convolution processing on the fifth characteristic to obtain the second coding characteristic.
11. The method of claim 8, wherein the performing the target detection process of the target object based on the second encoding characteristic to obtain the position information of the target object in the current frame image comprises:
and inputting the second coding feature into a target detection network to obtain the position information aiming at the target object in the search area.
12. The method according to any one of claims 1-7, further comprising:
highlighting the position information of the target object in an image frame of the video stream.
13. An object tracking device, comprising a detection module and a tracking module, wherein the detection module comprises a first branch network and a second branch network of a twin neural network, the first branch network and the second branch network are the same, and the tracking module comprises a feature update network and an object detection network of the twin neural network;
the first branch network detects a second position of a target object in an initial frame image in a video stream and a second feature corresponding to the second position;
the second branch network is used for detecting a first position of a target object in a previous frame image of the current frame image and a first feature corresponding to the first position aiming at any current frame image after the initial frame image;
the feature updating network is used for obtaining the prediction feature of a target object in the current frame image based on the initial frame image and the previous frame image of the current frame image;
the feature updating network is used for obtaining the prediction feature of a target object in the current frame image based on the initial frame image and the previous frame image of the current frame image;
the target detection network is configured to obtain position information of the target object in the current frame image based on the first position and the prediction feature.
14. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1 to 12.
15. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 12.
CN202110826777.3A 2019-06-25 Target tracking method and device, electronic equipment and storage medium Active CN113538519B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110826777.3A CN113538519B (en) 2019-06-25 Target tracking method and device, electronic equipment and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910555741.9A CN110287874B (en) 2019-06-25 2019-06-25 Target tracking method and device, electronic equipment and storage medium
CN202110826777.3A CN113538519B (en) 2019-06-25 Target tracking method and device, electronic equipment and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201910555741.9A Division CN110287874B (en) 2019-06-25 2019-06-25 Target tracking method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113538519A true CN113538519A (en) 2021-10-22
CN113538519B CN113538519B (en) 2024-05-17

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538517A (en) * 2019-06-25 2021-10-22 北京市商汤科技开发有限公司 Target tracking method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160135023A1 (en) * 2014-11-07 2016-05-12 At&T Mobility Ii Llc Cloud-based device twinning
CN108960090A (en) * 2018-06-20 2018-12-07 腾讯科技(深圳)有限公司 Method of video image processing and device, computer-readable medium and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160135023A1 (en) * 2014-11-07 2016-05-12 At&T Mobility Ii Llc Cloud-based device twinning
CN108960090A (en) * 2018-06-20 2018-12-07 腾讯科技(深圳)有限公司 Method of video image processing and device, computer-readable medium and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
丁晓风: "基于Mean Shift的多模板目标跟踪算法", 计算机工程与应用, pages 141 - 143 *
孙凯鹏;李新军;: "复杂背景下单个运动物体的实时视觉追踪算法", 北京航空航天大学学报, no. 03 *
李永佳: "基于均值漂移算法和局部特征的目标跟踪研究", 中国优秀硕士学位论文全文数据库 信息科技, pages 138 - 1410 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538517A (en) * 2019-06-25 2021-10-22 北京市商汤科技开发有限公司 Target tracking method and device, electronic equipment and storage medium
CN113538517B (en) * 2019-06-25 2024-04-12 北京市商汤科技开发有限公司 Target tracking method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110287874B (en) 2021-07-27
CN110287874A (en) 2019-09-27
CN113538517A (en) 2021-10-22
CN113538517B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN110287874B (en) Target tracking method and device, electronic equipment and storage medium
CN110647834B (en) Human face and human hand correlation detection method and device, electronic equipment and storage medium
CN111310616B (en) Image processing method and device, electronic equipment and storage medium
CN110674719B (en) Target object matching method and device, electronic equipment and storage medium
CN109522910B (en) Key point detection method and device, electronic equipment and storage medium
CN110378976B (en) Image processing method and device, electronic equipment and storage medium
CN110889469B (en) Image processing method and device, electronic equipment and storage medium
US11301726B2 (en) Anchor determination method and apparatus, electronic device, and storage medium
CN111753822A (en) Text recognition method and device, electronic equipment and storage medium
CN109615006B (en) Character recognition method and device, electronic equipment and storage medium
CN112465843A (en) Image segmentation method and device, electronic equipment and storage medium
CN110532956B (en) Image processing method and device, electronic equipment and storage medium
CN111539410B (en) Character recognition method and device, electronic equipment and storage medium
CN110543849B (en) Detector configuration method and device, electronic equipment and storage medium
CN109685041B (en) Image analysis method and device, electronic equipment and storage medium
CN110781813A (en) Image recognition method and device, electronic equipment and storage medium
CN113486830A (en) Image processing method and device, electronic equipment and storage medium
CN111680646B (en) Action detection method and device, electronic equipment and storage medium
CN110633715B (en) Image processing method, network training method and device and electronic equipment
CN109903252B (en) Image processing method and device, electronic equipment and storage medium
CN113052874B (en) Target tracking method and device, electronic equipment and storage medium
CN111311588B (en) Repositioning method and device, electronic equipment and storage medium
CN113538310A (en) Image processing method and device, electronic equipment and storage medium
CN114549983A (en) Computer vision model training method and device, electronic equipment and storage medium
CN113538519B (en) Target tracking method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant