WO2020187095A1 - 一种目标跟踪方法、装置和无人机 - Google Patents

一种目标跟踪方法、装置和无人机 Download PDF

Info

Publication number
WO2020187095A1
WO2020187095A1 PCT/CN2020/078629 CN2020078629W WO2020187095A1 WO 2020187095 A1 WO2020187095 A1 WO 2020187095A1 CN 2020078629 W CN2020078629 W CN 2020078629W WO 2020187095 A1 WO2020187095 A1 WO 2020187095A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
detected
image
tracker
target frame
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.)
Ceased
Application number
PCT/CN2020/078629
Other languages
English (en)
French (fr)
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.)
Autel Robotics Co Ltd
Original Assignee
Autel Robotics 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 Autel Robotics Co Ltd filed Critical Autel Robotics Co Ltd
Publication of WO2020187095A1 publication Critical patent/WO2020187095A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/758Involving statistics of pixels or of feature values, e.g. histogram matching

Definitions

  • This application relates to the technical field of unmanned aerial vehicles, in particular to a target tracking method, device and unmanned aerial vehicle.
  • Intelligent tracking of moving targets using drones has been widely used, and intelligent tracking can be used for fugitive tracking, abnormal target behavior analysis, etc.
  • filtering algorithms are often used to track targets, and the tracking speed is fast.
  • the target tracking method based on filtering algorithm is easy to lose the target when the target is occluded or the target is deformed, especially when tracking the target for a long time.
  • the purpose of the embodiments of the present invention is to provide a target tracking method, device and drone, which can reduce the loss rate of target tracking.
  • an embodiment of the present invention provides a target tracking method, the method including:
  • a tracker to detect the target in the image to be detected, wherein the tracker is obtained by training based on the characteristics of the target;
  • the target is not detected in the image to be detected, input the image to be detected into a preset target detection model based on deep learning to obtain at least one candidate target frame and a category corresponding to the candidate target frame;
  • the determining whether the target is detected in the image to be detected includes:
  • the selecting one candidate target frame from the at least one candidate target frame according to the category and color characteristics of the target includes:
  • the determining whether the target is detected in the feature detection image includes:
  • the method further includes:
  • the position corresponding to the maximum response value is taken as the position of the target in the image to be detected.
  • the feature of the target includes the initial target frame of the target. Then, before the detecting the target in the image to be detected by the tracker, the method further includes:
  • the color feature includes a color statistical histogram.
  • the method further includes:
  • a color statistical histogram of the target is obtained based on the initial target frame.
  • the method further includes:
  • a candidate target frame that is the same as the target category and whose color feature similarity is greater than the preset similarity threshold is not obtained from the at least one candidate target frame, increase the preset timing value, and obtain a new image to be detected Perform detection again based on the preset target detection model;
  • a candidate target frame that is the same as the target category and has a maximum similarity of color features greater than a preset similarity threshold is obtained from the at least one candidate target frame, reset the preset timing to zero;
  • the initial target frame is acquired again, and the tracker is updated based on the initial target frame.
  • the tracker is a tracker based on a core-related filtering algorithm.
  • the preset target detection model is a target detection model based on an SSD algorithm.
  • an embodiment of the present invention provides a target tracking device, the device including:
  • Image acquisition module for acquiring the image to be detected
  • the tracker detection module is configured to use a tracker to detect the target in the image to be detected, wherein the tracker is obtained by training based on the characteristics of the target;
  • the judgment module is used to judge whether the target is detected in the image to be detected
  • the target detection module is configured to, if the target is not detected in the image to be detected, input the image to be detected into a preset target detection model based on deep learning to obtain at least one candidate target frame and the candidate The category corresponding to the target frame;
  • a candidate target frame selection module configured to select a candidate target frame from the at least one candidate target frame according to the category and color characteristics of the target;
  • the first tracker update module is used to retrain the tracking model based on the selected candidate target frame and update the tracker.
  • the judgment module is specifically used for:
  • the candidate target frame selection module is specifically configured to:
  • the judgment module is also specifically used to:
  • the device further includes:
  • the target position determining module is configured to use the position corresponding to the maximum response value as the position of the target in the image to be detected.
  • the feature of the target includes the initial target frame of the target
  • the device also includes a tracker training module, which is used to: before using the tracker to detect the target in the image to be detected:
  • the color feature includes a color statistical histogram.
  • the device further includes:
  • the target color feature acquisition module is configured to obtain a color statistical histogram of the target based on the initial target frame.
  • the device further includes a second tracker update module for:
  • a candidate target frame that is the same as the target category and whose color feature similarity is greater than the preset similarity threshold is not obtained from the at least one candidate target frame, increase the preset timing value, and obtain a new image to be detected Perform detection again based on the preset target detection model;
  • a candidate target frame that is the same as the target category and has a maximum similarity of color features greater than a preset similarity threshold is obtained from the at least one candidate target frame, reset the preset timing to zero;
  • the initial target frame is acquired again, and the tracker is updated based on the initial target frame.
  • the tracker is a tracker based on a core-related filtering algorithm.
  • the preset target detection model is a target detection model based on an SSD algorithm.
  • an embodiment of the present invention provides an unmanned aerial vehicle, the unmanned aerial vehicle including a fuselage, an arm connected to the fuselage, a power system provided on the arm, and
  • the camera device and the tracking chip of the body, the camera device and the tracking chip are electrically connected, wherein the camera device is used to obtain the image to be detected, and the tracking chip includes:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the foregoing method.
  • an embodiment of the present invention provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions.
  • the computer-executable instructions When the computer-executable instructions are When the drone is executed, the drone is made to execute the above-mentioned method.
  • the target in the image to be detected is first detected by the tracker obtained in advance, and if the target is not detected in the image to be detected, the target is preset
  • the detection model detects the image to be detected, and obtains at least one candidate target frame in the image to be detected and a category corresponding to the candidate target frame. Then, a candidate target frame is selected from the at least one candidate target frame according to the color feature and category of the target, and the tracking model is retrained to obtain a new tracker. That is, when the target in the image to be detected cannot be detected by the tracker, the candidate target frame corresponding to the target obtained by the target detection model is used to update the tracker. It can improve the detection ability of the tracker and reduce the loss rate of target tracking.
  • FIG. 1 is a schematic diagram of an application scenario of a target tracking method and device according to an embodiment of the present invention
  • Figure 2 is a schematic structural diagram of an embodiment of the drone of the present invention.
  • Figure 3 is a schematic diagram of a target frame in an embodiment of the present invention.
  • Figure 4 is a schematic structural diagram of an embodiment of the drone of the present invention.
  • FIG. 5 is a schematic flowchart of an embodiment of the target tracking method of the present invention.
  • Figure 6a is a schematic diagram of training a tracker model in an embodiment of the present invention.
  • Fig. 6b is a schematic diagram of using a tracker to detect an image to be detected in an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of an embodiment of the target tracking device of the present invention.
  • FIG. 8 is a schematic structural diagram of an embodiment of the target tracking device of the present invention.
  • Fig. 9 is a schematic diagram of the hardware structure of the tracking chip or the controller in an embodiment of the unmanned aerial vehicle of the present invention.
  • the target tracking method, device and drone provided by the embodiments of the present invention can be applied to the application scenario shown in FIG. 1. Please refer to FIG. 1.
  • the drone 100 and the target 200 are included.
  • the UAV 100 is used to track the target 200.
  • the UAV 100 may be suitable unmanned aerial vehicles including fixed-wing unmanned aerial vehicles and rotary-wing unmanned aerial vehicles, such as helicopters, quadrotors, and aircraft with other numbers of rotors and/or rotor configurations.
  • the UAV 100 may also be other movable objects, such as a manned aircraft, a model airplane, an unmanned airship, and an unmanned hot air balloon.
  • the target 200 can be any suitable movable or non-movable object, including vehicles, people, animals, buildings, mountains and rivers, etc.
  • the drone 100 includes a fuselage 10, an arm connected to the fuselage 10, and an The power system of the arm and the control system provided in the fuselage 10.
  • the power system is used to provide thrust, lift, etc. for the flight of the UAV 100.
  • the control system is the central nerve of the UAV 100 and can include multiple functional units, such as flight control systems, tracking systems, path planning systems, and other specific Functional system.
  • the tracking system is used to obtain the position and tracking distance of the tracking target (that is, the distance between the UAV 100 and the target 200), and the like.
  • the flight control system includes various sensors (such as gyroscopes, accelerometers, etc.), and the flight control system is used to control the flight attitude of the UAV.
  • the path planning system is used to plan the flight path of the UAV based on the location of the tracking target, and instruct the flight control system to control the flight attitude of the UAV to make the UAV fly along the specified path.
  • the tracking system includes a camera device 20 and a tracking chip 30.
  • the camera device 20 and the tracking chip 30 are electrically connected.
  • the camera device 20 is used to capture the image to be detected, and the tracking chip 30 is used to obtain the image to be detected and determine the The position of the target in the image to be detected, so as to obtain the true position of the target.
  • the camera device 20 can be a high-definition digital camera or other camera device.
  • the camera device 20 can be set at any suitable location that is convenient for shooting.
  • the camera device 20 is installed on the bottom of the body 10 through a pan-tilt.
  • the tracking chip 30 can track the target according to the characteristics of the target.
  • the characteristics of the target may be a target frame for frame selection of the target.
  • the small person represents a target
  • the small person enclosed by a dashed line represents a target frame.
  • Some application scenarios of the drone 100 also include an electronic device 300, and the target frame can be sent to the drone 100 through the electronic device 300.
  • the electronic device 300 may display a picture taken by the drone 100, and the user can select a target in the picture to obtain an initial target frame, and then upload the initial target frame to the drone 100.
  • the electronic device 300 is, for example, a smart phone, a tablet computer, a computer, a remote control, and the like.
  • the user can interact with the electronic device 300 through any suitable type of one or more user interaction devices, and these user interaction devices may be a mouse, a button, a touch screen, and the like.
  • a communication connection can be established through wireless communication modules (such as a signal receiver, a signal transmitter, etc.) respectively provided in each of them, and data/commands can be uploaded or issued.
  • the initial target frame may also be stored in the storage device or tracking chip 30 of the drone 100 in advance.
  • a tracking model may be trained based on the initial target frame to obtain a tracker, and the tracking chip 30 uses the tracker to detect the target in the image to be detected obtained by the camera 20.
  • the target is included in the image to be detected, and the tracking chip 30 can determine the position of the target in the image to be detected, so as to obtain the true position of the target.
  • the target cannot be detected in the to-be-detected image due to reasons such as the target being occluded or the target being deformed. In this case, the true position of the target cannot be obtained.
  • a pre-obtained target detection model based on deep learning may be used to identify the image to be detected, and to obtain at least one candidate target frame in the image to be detected and a category corresponding to the candidate target frame. Then, a candidate target frame is selected from at least one candidate target frame according to the color feature and category of the target, the tracking model is retrained, and the tracker is updated.
  • the embodiment of the present invention uses the retrieved candidate target frame to update the tracker, which can improve the detection ability of the tracker and reduce the target tracking loss rate.
  • a separate tracking chip 30 may not be provided, and the methods executed in the tracking chip 30, the flight control system, and the path planning system may be executed by one or more other controllers ( Please refer to the controller 40 in FIG. 4). That is, it is executed by one or more other controllers: based on the image to be detected taken by the camera device 20, the position of the target in the image to be detected is determined, so as to obtain the true position of the target, and based on the position of the tracking target. Plan the flight path of the man-machine and control the flight attitude of the UAV to make the UAV fly according to the designated path.
  • FIG. 5 is a schematic flowchart of a target tracking method provided by an embodiment of the present invention.
  • the method may be executed by the drone 100 in FIG. 1 (specifically, in some embodiments, the method is executed by the drone 100).
  • the tracking chip 30 of the tracking system is executed.
  • the method is executed by the controller 40 of the drone 100). As shown in FIG. 5, the method includes:
  • the image to be detected is obtained by the camera device 20 of the drone 100. Before the camera device 20 captures the image to be detected, the drone 100 needs to face the camera device 20 in the direction of the target.
  • 102 Use a tracker to detect the target in the image to be detected, where the tracker is obtained by training based on the characteristics of the target.
  • the tracker may be directly loaded on the drone 100 after being obtained by other devices through training the tracking model.
  • the tracker is obtained by the UAV 100 itself by training a tracking model.
  • the method before the tracker is used to detect the target in the image to be detected, the method further includes training tracking The step of the device is to obtain an initial target frame, train a tracking model based on the initial target frame, and obtain a tracker.
  • the initial target frame may be stored in advance on the drone 100, or uploaded by the electronic device 300 to the drone 100.
  • the tracker is a tracker based on a kernel correlation filter algorithm (Kernel Correlation Filter, KCF).
  • KCF Kernel Correlation Filter
  • other related filter trackers may also be used. The following takes the KCF tracker as an example to illustrate the principles of tracker training and the use of the tracker to detect the target in the image to be detected.
  • the initial target frame (the frame indicated by the dashed line, which is a positive sample) is cyclically shifted to obtain multiple sample frames.
  • the labels corresponding to the sample frames are assigned according to the distance from the positive sample. Closer, the larger the label value.
  • the dashed frame is first cyclically shifted to obtain multiple frames to be detected.
  • the tracker is used to calculate the response value of each frame to be detected, and the position of the frame to be detected with the largest response value is the position of the target in the image to be detected, so that the true position of the target can be obtained.
  • the frame to be detected with the largest response value should be the frame represented by the bold line.
  • the target will not be detected in the image to be detected.
  • the KCF tracker is used to detect the target
  • the target is not detected in the image to be detected, input the image to be detected into a preset target detection model based on deep learning to obtain at least one candidate target frame and the corresponding candidate target frame category.
  • the image to be detected is input into the preset target detection model for identification, and multiple candidate target frames and the categories corresponding to the candidate target frames of each target in the image to be detected are obtained.
  • the preset target detection model may be obtained by other devices by training a neural network model based on deep learning, and directly loaded on the drone 100.
  • the preset target detection model is obtained by the drone 100 itself by training a neural network model based on deep learning.
  • the preset target detection model can be obtained by training a large amount of sample data and the label (ie category) corresponding to the sample data, for example, based on data training on the data set PASCAL VOC.
  • the preset target detection model is a network model based on the SSD (Single Shot MultiBox Detector) algorithm.
  • it can also be replaced by other deep learning networks, for example, YOLO (You Only Look Once), Fast-RCNN (Regions with CNN), etc.
  • 105 Select a candidate target frame from the at least one candidate target frame according to the category and color feature of the target.
  • the candidate target frame corresponding to the target can be selected according to the target category and color characteristics.
  • a candidate target frame with the same target category as the target category is selected from the at least one candidate target frame.
  • a candidate target frame whose color feature is the most similar to the color feature of the target and is greater than a preset similarity threshold is selected from the candidate target frame with the same target category. That is, the color feature of the candidate target frame is used to match the color feature of the target, and if the similarity of the most similar candidate target frame is greater than the preset similarity threshold, the candidate target frame is used to update the tracker.
  • a value with a better target similarity effect can be selected as the preset similarity threshold.
  • the Euclidean distance between the color feature of the target and the color feature of the candidate target frame can be calculated.
  • the color feature includes a color statistical histogram.
  • the color statistical histogram of the target can be obtained directly based on the initial target frame.
  • the color statistical histogram may be a color statistical histogram of part or all of the three channels of R, G, and B.
  • the color value 0-255 can be quantized in steps, for example, quantized to 0-31 in steps of 8.
  • the image corresponding to the initial target frame is cut, divided into m multiplied by n small blocks, and the number of each color value in each small block is counted, that is, the color statistical histogram of the target is obtained.
  • the similarity between the two can be obtained.
  • the target in the image to be detected is first detected by the tracker obtained in advance, and if the target is not detected in the image to be detected, the image to be detected is detected through a preset target detection model, Obtain at least one candidate target frame in the image to be detected and the category corresponding to the candidate target frame. Then, a candidate target frame is selected from the at least one candidate target frame according to the color feature and category of the target, and the tracking model is retrained to obtain a new tracker. That is, when the target in the image to be detected cannot be detected by the tracker, the candidate target frame obtained by the target detection model is used to update the tracker. It can improve the detection ability of the tracker and reduce the loss rate of target tracking.
  • the image to be detected is a continuous frame image, and the detection of the image to be detected is continuously performed.
  • the timing may be preset, and an initial value may be assigned. If at least one candidate target frame obtained from the preset target detection model does not have the same target category as the target, and the color feature similarity is greater than For the candidate target frame with a preset similarity threshold, the preset timing value is increased, and a new image to be detected is obtained for re-detection based on the preset target detection model. If, from the at least one candidate target frame, a candidate target frame with the same target category and with a maximum similarity of color features greater than a preset similarity threshold is obtained, then the preset timing is cleared.
  • the timing function can be realized by a counter or a timer.
  • the preset threshold can take any suitable value, for example, a value equivalent to 30 seconds or 1 minute.
  • an embodiment of the present invention also provides a target tracking device, which can be used for the drone shown in FIG. 1, and the target tracking device 700 includes:
  • the image acquisition module 701 is used to acquire an image to be detected
  • the tracker detection module 702 is configured to use a tracker to detect a target in the image to be detected, wherein the tracker is obtained by training based on the characteristics of the target;
  • the judgment module 703 is used to judge whether the target is detected in the image to be detected
  • the target detection module 704 is configured to, if the target is not detected in the image to be detected, input the image to be detected into a preset target detection model based on deep learning to obtain at least one candidate target frame and the The category corresponding to the candidate target frame;
  • Candidate target frame selection module 705, configured to select one candidate target frame from the at least one candidate target frame according to the category and color characteristics of the target;
  • the first tracker update module 706 is configured to retrain the tracking model based on the selected candidate target frame to update the tracker.
  • the target in the image to be detected is first detected by the tracker obtained in advance, and if the target is not detected in the image to be detected, the image to be detected is detected through a preset target detection model, Obtain at least one candidate target frame in the image to be detected and the category corresponding to the candidate target frame. Then, a candidate target frame is selected from the at least one candidate target frame according to the color feature and category of the target, and the tracking model is retrained to obtain a new tracker. That is, when the target in the image to be detected cannot be detected by the tracker, the candidate target frame obtained by the target detection model is used to update the tracker. It can improve the detection ability of the tracker and reduce the loss rate of target tracking.
  • the judgment module 703 is specifically configured to:
  • the candidate target frame selection module 705 is specifically configured to:
  • the judgment module 703 is also specifically configured to:
  • the device further includes:
  • the target position determining module 710 is configured to use the position corresponding to the maximum response value as the position of the target in the image to be detected.
  • the feature of the target includes the initial target frame of the target; the device further includes a tracker training module 707, which is used to detect the image to be detected by using a tracker Before the goal:
  • the color feature includes a color statistical histogram.
  • the device further includes:
  • the target color feature obtaining module 708 is configured to obtain a color statistical histogram of the target based on the initial target frame.
  • the device further includes a second tracker update module 709 for:
  • a candidate target frame that is the same as the target category and whose color feature similarity is greater than the preset similarity threshold is not obtained from the at least one candidate target frame, increase the preset timing value, and obtain a new image to be detected Perform detection again based on the preset target detection model;
  • a candidate target frame that is the same as the target category and has a maximum similarity of color features greater than a preset similarity threshold is obtained from the at least one candidate target frame, reset the preset timing to zero;
  • the initial target frame is acquired again, and the tracker is updated based on the initial target frame.
  • the tracker is a tracker based on a core-related filtering algorithm.
  • the preset target detection model is a target detection model based on an SSD algorithm.
  • the target tracking method described in any of the above embodiments can be executed by the tracking chip 30 or the controller 40 in the drone 100, and the tracking chip 30 (please refer to FIG. 2) or the controller 40 (please refer to FIG. 4) can be implemented as Figure 9 shows the hardware structure.
  • the hardware structure includes:
  • One processor 1 is taken as an example in FIG. 9.
  • the processor 1 and the memory 2 may be connected through a bus or in other ways, and the connection through a bus is taken as an example in FIG. 9.
  • the memory 2 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the target tracking method in the embodiments of the present application /Module (for example, the image acquisition module 701, the tracker detection module 702, the judgment module 703, the target detection module 704, the candidate target frame selection module 705, and the first tracker update module 706 shown in FIG. 7).
  • the processor 1 executes various functional applications and data processing of the controller or tracking chip by running the non-volatile software programs, instructions, and modules stored in the memory 2, that is, realizing the target tracking method of the foregoing method embodiment.
  • the memory 2 may include a program storage area and a data storage area.
  • the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the controller.
  • the memory 2 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the storage 2 may optionally include storage remotely arranged relative to the processor 1, and these remote storages may be connected to the drone through a network. Examples of the aforementioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the one or more modules are stored in the memory 2, and when executed by the one or more processors 1, the target tracking method in any of the foregoing method embodiments is executed, for example, the target tracking method described in FIG. Step 101 to step 106 of the method; realize the functions of modules 701-706 in Fig. 7 and modules 701-710 in Fig. 8.
  • the embodiments of the present application provide a non-volatile computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, in FIG. 9
  • One processor 1 of the above-mentioned one or more processors can execute the target tracking method in any of the above-mentioned method embodiments, for example, execute the above-described method steps 101 to 106 in FIG. 5; Functions of modules 701-706 and modules 701-710 in Figure 8.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each embodiment can be implemented by software plus a general hardware platform, and of course, it can also be implemented by hardware.
  • a person of ordinary skill in the art can understand that all or part of the processes in the method of the foregoing embodiments can be implemented by instructing relevant hardware through a computer program.
  • the program can be stored in a computer readable storage medium. When executed, it may include the processes of the above-mentioned method embodiments.
  • the storage medium can be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

一种目标跟踪方法、装置和无人机,所述方法包括:获取待检测图像(101);利用跟踪器检测所述待检测图像中的目标(102);判断在待检测图像中是否检测到所述目标(103),如果在待检测图像中未检测到所述目标,则将待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别(104);根据目标的类别和颜色特征从至少一个候选目标框中选择一个候选目标框(105);基于选中的候选目标框更新跟踪器(106)。当利用跟踪器无法检测到待检测图像中的目标时,利用目标检测模型获得的与目标对应的候选目标框更新所述跟踪器。能提高跟踪器的检测能力、降低目标跟踪丢失率。

Description

一种目标跟踪方法、装置和无人机
本申请要求于2019年3月20日提交中国专利局、申请号为201910213970.2、申请名称为“一种目标跟踪方法、装置和无人机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及无人飞行器技术领域,特别涉及一种目标跟踪方法、装置和无人机。
背景技术
利用无人机对运动目标进行智能跟踪已得到广泛应用,智能跟踪可以用于逃犯追踪、异常目标行为分析等。目前,多采用滤波算法对目标进行跟踪,跟踪速度快。
在实现本发明过程中,发明人发现相关技术中至少存在如下问题:
基于滤波算法的目标跟踪方法,在目标被遮挡或者目标形变的场合,尤其是长时间跟踪目标时容易丢失目标。
发明内容
本发明实施例的目的是提供一种目标跟踪方法、装置和无人机,能降低目标跟踪的丢失率。
第一方面,本发明实施例提供了一种目标跟踪方法,所述方法包括:
获取待检测图像;
利用跟踪器检测所述待检测图像中的目标,其中,所述跟踪器基于所述目标的特征训练获得;
判断在所述待检测图像中是否检测到所述目标;
如果在所述待检测图像中未检测到所述目标,则将所述待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别;
根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择候选目标框;
基于选中的候选目标框重新训练跟踪模型,更新所述跟踪器。
在其中一些实施例中,所述判断在所述待检测图像中是否检测到所述目标,包括:
判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否不大于 预设响应阈值;
若是,则确定在所述待检测图像中未检测到所述目标。
在其中一些实施例中,所述根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择一个候选目标框,包括:
从所述至少一个候选目标框中选择与所述目标类别相同的候选目标框;
从与所述目标类别相同的候选目标框中选择颜色特征与所述目标的颜色特征相似度最大且大于预设相似度阈值的候选目标框。
在其中一些实施例中,,所述判断在所述特征检测图像中是否检测到所述目标,包括:
判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否大于预设响应阈值;
若是,则确定在所述待检测图像中检测到所述目标。
在其中一些实施例中,该方法还包括:
将所述最大响应值对应的位置作为所述目标在所述待检测图像中的位置。
在其中一些实施例中,所述目标的特征包括所述目标的初始目标框,则,在所述利用跟踪器检测所述待检测图像中的目标之前,所述方法还包括:
获取初始目标框;
基于所述初始目标框训练跟踪模型,获得所述跟踪器。
在其中一些实施例中,所述颜色特征包括颜色统计直方图。
在其中一些实施例中,所述方法还包括:
基于所述初始目标框获得所述目标的颜色统计直方图。
在其中一些实施例中,所述方法还包括:
如果从所述至少一个候选目标框中未获得与所述目标类别相同、且颜色特征相似度大于预设相似度阈值的候选目标框,则增加预设计时的数值,并获取新的待检测图像基于预设目标检测模型再次进行检测;
如果从所述至少一个候选目标框中得到与所述目标类别相同、且颜色特征最大相似度大于预设相似度阈值的候选目标框,则将预设计时清零;
如果所述预设计时的数值达到预设阈值,则重新获取初始目标框,并基于所述初始目标框更新所述跟踪器。
在其中一些实施例中,所述跟踪器为基于核相关滤波算法的跟踪器。
在其中一些实施例中,所述预设目标检测模型为基于SSD算法的目标检测模型。
第二方面,本发明实施例提供了一种目标跟踪装置,所述装置包括:
图像获取模块,用于获取待检测图像;
跟踪器检测模块,用于利用跟踪器检测所述待检测图像中的目标,其中,所述跟踪器基于所述目标的特征训练获得;
判断模块,用于判断在所述待检测图像中是否检测到所述目标;
目标检测模块,用于如果在所述待检测图像中未检测到所述目标,则将所 述待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别;
候选目标框选择模块,用于根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择候选目标框;
第一跟踪器更新模块,用于基于选中的候选目标框重新训练跟踪模型,更新所述跟踪器。
在其中一些实施例中,所述判断模块具体用于:
判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否不大于预设响应阈值;
若是,则确定在所述待检测图像中未检测到所述目标。
在其中一些实施例中,所述候选目标框选择模块具体用于:
从所述至少一个候选目标框中选择与所述目标类别相同的候选目标框;
从与所述目标类别相同的候选目标框中选择颜色特征与所述目标的颜色特征相似度最大且大于预设相似度阈值的候选目标框。
在其中一些实施例中,所述判断模块还具体用于:
判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否大于预设响应阈值;
若是,则确定在所述待检测图像中检测到所述目标。
在其中一些实施例中,所述装置还包括:
目标位置确定模块,用于将所述最大响应值对应的位置作为所述目标在所述待检测图像中的位置。
在其中一些实施例中,所述目标的特征包括所述目标的初始目标框;
所述装置还包括跟踪器训练模块,用于在利用所述跟踪器检测所述待检测图像中的目标之前:
获取初始目标框;
基于所述初始目标框训练跟踪模型,获得所述跟踪器。
在其中一些实施例中,所述颜色特征包括颜色统计直方图。
在其中一些实施例中,所述装置还包括:
目标颜色特征获取模块,用于基于所述初始目标框获得所述目标的颜色统计直方图。
在其中一些实施例中,所述装置还包括第二跟踪器更新模块,用于:
如果从所述至少一个候选目标框中未获得与所述目标类别相同、且颜色特征相似度大于预设相似度阈值的候选目标框,则增加预设计时的数值,并获取新的待检测图像基于预设目标检测模型再次进行检测;
如果从所述至少一个候选目标框中得到与所述目标类别相同、且颜色特征最大相似度大于预设相似度阈值的候选目标框,则将预设计时清零;
如果所述预设计时的数值达到预设阈值,则重新获取初始目标框,并基于所述初始目标框更新所述跟踪器。
在其中一些实施例中,所述跟踪器为基于核相关滤波算法的跟踪器。
在其中一些实施例中,所述预设目标检测模型为基于SSD算法的目标检测模型。
第三方面,本发明实施例提供了一种无人机,所述无人机包括机身、与所述机身相连的机臂、设于所述机臂的动力系统、设置于所述机身的摄像装置和跟踪芯片,所述摄像装置和所述跟踪芯片电性连接,其中,所述摄像装置用于获取待检测图像,所述跟踪芯片包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的方法。
第四方面,本发明实施例提供了一种非易失性计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,当所述计算机可执行指令被无人机执行时,使所述无人机执行上述的方法。
本发明实施例的目标跟踪方法、装置和无人机,先通过预先获得的跟踪器检测待检测图像中的目标,如果未在所述待检测图像中检测到所述目标,则通过预设目标检测模型对所述待检测图像进行检测,获得待检测图像中的至少一个候选目标框及所述候选目标框对应的类别。然后根据所述目标的颜色特征和类别从所述至少一个候选目标框中选择一个候选目标框,重新训练跟踪模型,获得新的跟踪器。即当利用跟踪器无法检测到待检测图像中的目标时,利用目标检测模型获得的与目标对应的候选目标框更新所述跟踪器。能提高跟踪器的检测能力、降低目标跟踪丢失率。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本发明实施例目标跟踪方法和装置的应用场景示意图;
图2是本发明无人机的一个实施例的结构示意图;
图3是本发明实施例中目标框的示意图;
图4是本发明无人机的一个实施例的结构示意图;
图5是本发明目标跟踪方法的一个实施例的流程示意图;
图6a是本发明实施例中训练跟踪器模型的示意图;
图6b是本发明实施例中利用跟踪器对待检测图像进行检测的示意图;
图7是本发明目标跟踪装置的一个实施例的结构示意图;
图8是本发明目标跟踪装置的一个实施例的结构示意图;
图9是本发明无人机的一个实施例中跟踪芯片或者控制器的硬件结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供的目标跟踪方法、装置和无人机可以应用于如图1所示的应用场景,请参照图1,在无人机的一些应用场景中,包括无人机100和目标200,无人机100用于跟踪目标200。其中,无人机100可以为合适的无人飞行器包括固定翼无人飞行器和旋转翼无人飞行器,例如直升机、四旋翼机和具有其它数量的旋翼和/或旋翼配置的飞行器。无人机100还可以是其他可移动物体,例如载人飞行器、航模、无人飞艇和无人热气球等。目标200可以为任何合适的可移动或不可移动物体,包括交通工具、人、动物、建筑物、山川河流等。
其中,在一些实施例中,请参照图2(图中仅示出了无人机的部分结构),无人机100包括机身10、与所述机身10相连的机臂、设于机臂的动力系统和设于机身10的控制系统。动力系统用于提供无人机100飞行的推力、升力等,控制系统是无人机100的中枢神经,可以包括多个功能性单元,例如飞控系统、跟踪系统、路径规划系统以及其他具有特定功能的系统。
其中,跟踪系统用于获得跟踪目标的位置、跟踪距离(即无人机100距目标200的距离)等。飞控系统包括各类传感器(例如陀螺仪、加速计等),飞控系统用于控制无人机的飞行姿态等。路径规划系统用于基于跟踪目标的位置对无人机的飞行路径进行规划,并指示飞控系统控制无人机的飞行姿态以使无人机按指定路径飞行。
其中,跟踪系统包括摄像装置20和跟踪芯片30,摄像装置20和跟踪芯片30电性连接,摄像装置20用于拍摄获得待检测图像,跟踪芯片30用于获得所述待检测图像,并确定所述目标在待检测图像中的位置,从而获得所述目标的真实位置。摄像装置20可以为高清数码相机或其他摄像装置,摄像装置20可以设置于任何利于拍摄的合适位置,在一些实施例中,摄像装置20通过云台安装于机身10的底部。
跟踪芯片30可以根据目标的特征对目标进行跟踪,其中,在一些实施例中,所述目标的特征可以是对目标进行框选的目标框。例如,图3中小人表示目标,虚线框框住的小人表示目标框。在无人机100的一些应用场景中还包括电子设备300,目标框可以通过电子设备300发送给无人机100。具体的,电子设备300可以显示无人机100拍摄的图片,由用户对图片中的目标进行框选,获得初始目标框,然后将所述初始目标框上传至无人机100。
其中,电子设备300例如智能手机、平板电脑、电脑、遥控器等。用户可以通过任何合适类型的、一种或者多种用户交互设备与电子设备300交互,这 些用户交互设备可以是鼠标、按键、触摸屏等。无人机100和电子设备300之间,可以通过分别设置在各自内部的无线通信模块(例如信号接收器、信号发送器等)建立通信连接,上传或者下发数据/指令。在另一些实施例中,初始目标框也可以事先存储于无人机100的存储装置或跟踪芯片30中。
在其中一些实施例中,可以基于所述初始目标框训练跟踪模型,获得跟踪器,跟踪芯片30利用所述跟踪器检测摄像装置20获得的待检测图像中的目标。在其中一些情形,待检测图像中包含所述目标,跟踪芯片30能确定所述目标在所述待检测图像中的位置,从而获得所述目标的真实位置。而在另一些情形,由于目标被遮挡或目标变形等原因会导致在所述待检测图像中检测不到所述目标,在这种情况下将无法获得所述目标的真实位置。
为了避免这种情况发生,可以利用预先获得的基于深度学习的目标检测模型对所述待检测图像进行识别,获得所述待检测图像中的至少一个候选目标框以及候选目标框对应的类别。然后根据目标的颜色特征和类别从至少一个候选目标框中选择候选目标框,重新训练跟踪模型,更新所述跟踪器。本发明实施例利用重新获得的候选目标框更新跟踪器,能提高跟踪器的检测能力、降低目标跟踪丢失率。
在无人机100的另一些实施例中,也可以不设置单独的跟踪芯片30,跟踪芯片30、飞控系统和路径规划系统中所执行的方法可以由一个或者多个其他控制器来执行(请参照图4中的控制器40)。即由一个或者多个其他控制器执行:基于摄像装置20拍摄的待检测图像,确定所述目标在待检测图像中的位置,从而获得所述目标的真实位置,以及基于跟踪目标的位置对无人机的飞行路径进行规划,并控制无人机的飞行姿态以使无人机按指定路径飞行等。
图5为本发明实施例提供的一种目标跟踪方法的流程示意图,所述方法可以由图1中无人机100执行(具体的,在一些实施例中,所述方法由无人机100中跟踪系统的跟踪芯片30执行,在另一些实施例中,所述方法由无人机100的控制器40执行),如图5所示,所述方法包括:
101:获取待检测图像。
其中,所述待检测图像通过无人机100的摄像装置20获得,在摄像装置20拍摄所述待检测图像前,无人机100需将摄像装置20朝向目标所在的方向。
102:利用跟踪器检测所述待检测图像中的目标,其中,所述跟踪器基于所述目标的特征训练获得。
其中,在一些实施例中,跟踪器可以是其他装置通过训练跟踪模型获得之后直接加载在无人机100上的。在另一些实施例中,跟踪器是无人机100自身通过训练跟踪模型获得的,在该实施例中,在利用跟踪器检测所述待检测图像中的目标之前,所述方法还包括训练跟踪器的步骤,即:获取初始目标框,基于所述初始目标框训练跟踪模型,获得跟踪器。其中,初始目标框可以是事先存储于无人机100上的,也可以是电子设备300上传至无人机100的。
其中,在一些实施例中,所述跟踪器为基于核相关滤波算法(Kernel  Correlation Filter,KCF)的跟踪器。在其他实施例中,也可以采用其他相关滤波跟踪器。以下以KCF跟踪器为例说明跟踪器训练以及利用跟踪器检测所述待检测图像中目标的原理。
请参照图6a,首先对所述初始目标框(虚线表示的框,为正样本)进行循环移位之后获得多个样本框,样本框对应的标签是根据距离正样本的远近赋值的,距离越近,标签值越大。将多个样本框及其对应的标签训练跟踪模型,获得跟踪器。请参照图6b,在利用跟踪器对待检测图像中的目标进行检测时,先对虚线框进行循环移位,获得多个待检测框。然后利用跟踪器计算各个待检测框的响应值,响应值最大的待检测框的位置即为目标在待检测图像中的位置,由此可以获得目标的真实位置。在图6b中,响应值最大的待检测框应为加粗线表示的框。
103:判断在所述待检测图像中是否检测到所述目标;
在目标被遮挡或目标变形等情形,将在所述待检测图像中检测不到所述目标。在其中一些实施例(例如利用KCF跟踪器检测目标的实施例)中,可以根据利用跟踪器检测所述待检测图像获得的最大响应值判断是否在待检测图像中检测到所述目标。如果最大响应值较大,大于预设响应阈值,则可以确定在所述待检测图像中检测到所述目标,并将所述最大响应值对应的位置作为所述目标在所述待检测图像中的位置。如果最大响应值小于或者等于预设响应阈值,则确定在所述待检测图像中没有检测到所述目标。其中,可以通过多次测试,选择目标检测效果较好的值作为预设响应阈值。
104:如果在所述待检测图像中未检测到所述目标,则将所述待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别。
如果利用跟踪器在待检测图像中没有检测到目标,则将待检测图像输入预设目标检测模型进行识别,获得待检测图像中各个目标的多个候选目标框以及候选目标框对应的类别。
其中,预设目标检测模型可以是其他装置通过训练基于深度学习的神经网络模型获得、并直接加载在无人机100上的。在另一些实施例中,预设目标检测模型是无人机100自身通过训练基于深度学习的神经网络模型获得的。预设目标检测模型可以通过大量样本数据以及样本数据对应的标签(即类别)训练获得,例如基于数据集PASCAL VOC上的数据训练获得。在其中一些实施例中,预设目标检测模型为基于SSD(Single Shot MultiBox Detector)算法的网络模型。在另一些实施例中,也可以被其它深度学习网络替换,例如,YOLO(You Only Look Once)、Fast-RCNN(Regions with CNN)等。
105:根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择候选目标框。
对同一个目标而言,其类别和颜色是不变的,根据目标类别和颜色特征可以选择出与所述目标对应的候选目标框。其中,在一些实施例中,先从所述至 少一个候选目标框中选择与所述目标类别相同的候选目标框。再从与所述目标类别相同的候选目标框中选择颜色特征与所述目标的颜色特征相似度最大且大于预设相似度阈值的一个候选目标框。即用候选目标框的颜色特征匹配目标的颜色特征,如果最相似的候选目标框的相似度大于预设相似度阈值,则利用该候选目标框更新所述跟踪器。其中,可以通过多次测试,选择目标相似效果较好的值作为预设相似度阈值。
具体的,可以计算目标的颜色特征和候选目标框的颜色特征之间的欧式距离,所述欧式距离越小,则候选目标框与所述目标越匹配,即候选目标框与所述目标越相似。所述欧式距离越大,则候选目标框与所述目标越不匹配,即候选目标框与所述目标越不相似。
其中,在一些实施例中,所述颜色特征包括颜色统计直方图。在获得初始目标框时,可以直接基于所述初始目标框获得目标的颜色统计直方图。所述颜色统计直方图可以是R、G、B三个通道中部分或全部通道的颜色统计直方图。对每一个通道而言,可以将颜色值0-255按步长进行量化,例如按步长8量化为0-31。然后对初始目标框对应的图像进行切割,分成m乘以n个小块,统计各个小块中属于各个颜色值的个数,即获得所述目标的颜色统计直方图。同样的,获得候选目标框的颜色统计直方图,匹配候选目标框的颜色统计直方图和所述目标的颜色统计直方图,即可以获得两者的相似度。
106:基于选中的候选目标框重新训练跟踪模型,更新所述跟踪器。
本发明实施例先通过预先获得的跟踪器检测待检测图像中的目标,如果未在所述待检测图像中检测到所述目标,则通过预设目标检测模型对所述待检测图像进行检测,获得待检测图像中的至少一个候选目标框及所述候选目标框对应的类别。然后根据所述目标的颜色特征和类别从所述至少一个候选目标框中选择一个候选目标框,重新训练跟踪模型,获得新的跟踪器。即当利用跟踪器无法检测到待检测图像中的目标时,利用目标检测模型获得的候选目标框更新所述跟踪器。能提高跟踪器的检测能力、降低目标跟踪丢失率。
在实际应用中,所述待检测图像是连续帧图像,对待检测图像的检测是持续进行的。对任一帧待检测图像而言,先利用跟踪器检测待检测图像中的目标,如果未检测到所述目标,则利用预设目标检测模型获取候选目标框,并基于所述候选目标框更新所述跟踪器,再利用更新后的跟踪器检测下一帧待检测图像。如果利用预设目标检测模型未获取到候选目标框,则继续用预设目标检测模型检测下一帧待检测图像。以此类催,如果预设目标检测模型长时间没有获得到候选目标框,则需由用户在电子设备上重新选择初始目标框,并基于该初始目标框更新跟踪器。
具体的,在一些实施例中,可以预设计时,并赋予初始值,如果从利用预设目标检测模型获得的至少一个候选目标框中未获得与所述目标类别相同、且颜色特征相似度大于预设相似度阈值的候选目标框,则增加预设计时的数值,并获取新的待检测图像基于预设目标检测模型再次进行检测。如果从所述至少 一个候选目标框中得到与所述目标类别相同、且颜色特征最大相似度大于预设相似度阈值的候选目标框,则将预设计时清零。当所述预设计时的数值达到预设阈值,则重新获取初始目标框,并基于所述初始目标框更新所述跟踪器。其中,计时功能可以由计数器或者计时器来实现。预设阈值可以取任何合适的数值,例如相当于30秒或者1分钟的数值。
相应的,如图7所示,本发明实施例还提供了一种目标跟踪装置,所述装置可以用于图1所示的无人机,目标跟踪装置700包括:
图像获取模块701,用于获取待检测图像;
跟踪器检测模块702,用于利用跟踪器检测所述待检测图像中的目标,其中,所述跟踪器基于所述目标的特征训练获得;
判断模块703,用于判断在所述待检测图像中是否检测到所述目标;
目标检测模块704,用于如果在所述待检测图像中未检测到所述目标,则将所述待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别;
候选目标框选择模块705,用于根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择一个候选目标框;
第一跟踪器更新模块706,用于基于选中的候选目标框重新训练跟踪模型,以更新所述跟踪器。
本发明实施例先通过预先获得的跟踪器检测待检测图像中的目标,如果未在所述待检测图像中检测到所述目标,则通过预设目标检测模型对所述待检测图像进行检测,获得待检测图像中的至少一个候选目标框及所述候选目标框对应的类别。然后根据所述目标的颜色特征和类别从所述至少一个候选目标框中选择一个候选目标框,重新训练跟踪模型,获得新的跟踪器。即当利用跟踪器无法检测到待检测图像中的目标时,利用目标检测模型获得的候选目标框更新所述跟踪器。能提高跟踪器的检测能力、降低目标跟踪丢失率。
在其中一些实施例中,判断模块703具体用于:
判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否不大于预设响应阈值;
若是,则确定在所述待检测图像中未检测到所述目标。
在其中一些实施例中,候选目标框选择模块705具体用于:
从所述至少一个候选目标框中选择与所述目标类别相同的候选目标框;
从与所述目标类别相同的候选目标框中选择颜色特征与所述目标的颜色特征相似度最大且大于预设相似度阈值的候选目标框。
在其中一些实施例中,判断模块703还具体用于:
判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否大于预设响应阈值;
若是,则确定在所述待检测图像中检测到所述目标。
在其中一些实施例中,请参照图8,所述装置还包括:
目标位置确定模块710,用于将所述最大响应值对应的位置作为所述目标在所述待检测图像中的位置。
在其中一些实施例中,请参照图8,所述目标的特征包括所述目标的初始目标框;所述装置还包括跟踪器训练模块707,用于在利用跟踪器检测所述待检测图像中的目标之前:
获取初始目标框;
基于所述初始目标框训练跟踪模型,获得跟踪器。
在其中一些实施例中,所述颜色特征包括颜色统计直方图。
在其中一些实施例中,请参照图8,所述装置还包括:
目标颜色特征获取模块708,用于基于所述初始目标框获得所述目标的颜色统计直方图。
在其中一些实施例中,请参照图8,所述装置还包括第二跟踪器更新模块709,用于:
如果从所述至少一个候选目标框中未获得与所述目标类别相同、且颜色特征相似度大于预设相似度阈值的候选目标框,则增加预设计时的数值,并获取新的待检测图像基于预设目标检测模型再次进行检测;
如果从所述至少一个候选目标框中得到与所述目标类别相同、且颜色特征最大相似度大于预设相似度阈值的候选目标框,则将预设计时清零;
如果所述预设计时的数值达到预设阈值,则重新获取初始目标框,并基于所述初始目标框更新所述跟踪器。
在其中一些实施例中,所述跟踪器为基于核相关滤波算法的跟踪器。
在其中一些实施例中,所述预设目标检测模型为基于SSD算法的目标检测模型。
上述任一实施例所描述的目标跟踪方法可以由无人机100中的跟踪芯片30或控制器40执行,跟踪芯片30(请参照图2)或控制器40(请参照图4)可以采用如图9所示的硬件结构。如图9所示,该硬件结构包括:
一个或多个处理器1以及存储器2,图9中以一个处理器1为例。
处理器1和存储器2可以通过总线或者其他方式连接,图9中以通过总线连接为例。
存储器2作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的目标跟踪方法对应的程序指令/模块(例如,附图7所示的图像获取模块701、跟踪器检测模块702、判断模块703、目标检测模块704、候选目标框选择模块705和第一跟踪器更新模块706)。处理器1通过运行存储在存储器2中的非易失性软件程序、指令以及模块,从而执行控制器或跟踪芯片的各种功能应用以及数据处理,即实现上述方法实施例的目标跟踪方法。
存储器2可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据控制器的使 用所创建的数据等。此外,存储器2可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器2可选包括相对于处理器1远程设置的存储器,这些远程存储器可以通过网络连接至无人机。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述存储器2中,当被所述一个或者多个处理器1执行时,执行上述任意方法实施例中的目标跟踪方法,例如,执行以上描述的图5中的方法步骤101至步骤106;实现图7中的模块701-706、图8中的模块701-710的功能。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请实施例提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图9中的一个处理器1,可使得上述一个或多个处理器可执行上述任意方法实施例中的目标跟踪方法,例如,执行以上描述的图5中的方法步骤101至步骤106;实现图7中的模块701-706、图8中的模块701-710的功能。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施例的描述,本领域普通技术人员可以清楚地了解到各实施例可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (24)

  1. 一种目标跟踪方法,其特征在于,所述方法包括:
    获取待检测图像;
    利用跟踪器检测所述待检测图像中的目标,其中,所述跟踪器基于所述目标的特征训练获得;
    判断在所述待检测图像中是否检测到所述目标;
    如果在所述待检测图像中未检测到所述目标,则将所述待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别;
    根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择候选目标框;
    基于选中的候选目标框重新训练跟踪模型,更新所述跟踪器。
  2. 根据权利要求1所述的方法,其特征在于,所述判断在所述待检测图像中是否检测到所述目标,包括:
    判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否不大于预设响应阈值;
    若是,则确定在所述待检测图像中未检测到所述目标。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择一个候选目标框,包括:
    从所述至少一个候选目标框中选择与所述目标类别相同的候选目标框;
    从与所述目标类别相同的候选目标框中选择颜色特征与所述目标的颜色特征相似度最大且大于预设相似度阈值的候选目标框。
  4. 根据权利要求1所述的方法,其特征在于,所述判断在所述特征检测图像中是否检测到所述目标,包括:
    判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否大于预设响应阈值;
    若是,则确定在所述待检测图像中检测到所述目标。
  5. 根据权利要求4所述的方法,其特征在于,该方法还包括:
    将所述最大响应值对应的位置作为所述目标在所述待检测图像中的位置。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述目标的特征包括所述目标的初始目标框,则,在所述利用跟踪器检测所述待检测图像中的目标之前,所述方法还包括:
    获取初始目标框;
    基于所述初始目标框训练跟踪模型,获得所述跟踪器。
  7. 根据权利要求3所述的方法,其特征在于,所述颜色特征包括颜色统计直方图。
  8. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    基于所述初始目标框获得所述目标的颜色统计直方图。
  9. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    如果从所述至少一个候选目标框中未获得与所述目标类别相同、且颜色特征相似度大于预设相似度阈值的候选目标框,则增加预设计时的数值,并获取新的待检测图像基于预设目标检测模型再次进行检测;
    如果从所述至少一个候选目标框中得到与所述目标类别相同、且颜色特征最大相似度大于预设相似度阈值的候选目标框,则将预设计时清零;
    如果所述预设计时的数值达到预设阈值,则重新获取初始目标框,并基于所述初始目标框更新所述跟踪器。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述跟踪器为基于核相关滤波算法的跟踪器。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述预设目标检测模型为基于SSD算法的目标检测模型。
  12. 一种目标跟踪装置,其特征在于,所述装置包括:
    图像获取模块,用于获取待检测图像;
    跟踪器检测模块,用于利用跟踪器检测所述待检测图像中的目标,其中,所述跟踪器基于所述目标的特征训练获得;
    判断模块,用于判断在所述待检测图像中是否检测到所述目标;
    目标检测模块,用于如果在所述待检测图像中未检测到所述目标,则将所述待检测图像输入基于深度学习的预设目标检测模型,以获得至少一个候选目标框以及所述候选目标框对应的类别;
    候选目标框选择模块,用于根据所述目标的类别和颜色特征从所述至少一个候选目标框中选择候选目标框;
    第一跟踪器更新模块,用于基于选中的候选目标框重新训练跟踪模型,更新所述跟踪器。
  13. 根据权利要求12所述的装置,其特征在于,所述判断模块具体用于:
    判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否不大于预设响应阈值;
    若是,则确定在所述待检测图像中未检测到所述目标。
  14. 根据权利要求12或13所述的装置,其特征在于,所述候选目标框选择模块具体用于:
    从所述至少一个候选目标框中选择与所述目标类别相同的候选目标框;
    从与所述目标类别相同的候选目标框中选择颜色特征与所述目标的颜色特征相似度最大且大于预设相似度阈值的候选目标框。
  15. 根据权利要求12所述的装置,其特征在于,所述判断模块还具体用于:
    判断利用所述跟踪器检测所述待检测图像获得的最大响应值是否大于预设响应阈值;
    若是,则确定在所述待检测图像中检测到所述目标。
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括:
    目标位置确定模块,用于将所述最大响应值对应的位置作为所述目标在所述待检测图像中的位置。
  17. 根据权利要求12-16中任一项所述的装置,其特征在于,所述目标的特征包括所述目标的初始目标框;
    所述装置还包括跟踪器训练模块,用于在利用所述跟踪器检测所述待检测图像中的目标之前:
    获取初始目标框;
    基于所述初始目标框训练跟踪模型,获得所述跟踪器。
  18. 根据权利要求14所述的装置,其特征在于,所述颜色特征包括颜色统计直方图。
  19. 根据权利要求17所述的装置,其特征在于,所述装置还包括:
    目标颜色特征获取模块,用于基于所述初始目标框获得所述目标的颜色统计直方图。
  20. 根据权利要求14所述的装置,其特征在于,所述装置还包括第二跟踪器更新模块,用于:
    如果从所述至少一个候选目标框中未获得与所述目标类别相同、且颜色特征相似度大于预设相似度阈值的候选目标框,则增加预设计时的数值,并获取 新的待检测图像基于预设目标检测模型再次进行检测;
    如果从所述至少一个候选目标框中得到与所述目标类别相同、且颜色特征最大相似度大于预设相似度阈值的候选目标框,则将预设计时清零;
    如果所述预设计时的数值达到预设阈值,则重新获取初始目标框,并基于所述初始目标框更新所述跟踪器。
  21. 根据权利要求12-20中任一项所述的装置,其特征在于,所述跟踪器为基于核相关滤波算法的跟踪器。
  22. 根据权利要求12-21中任一项所述的装置,其特征在于,所述预设目标检测模型为基于SSD算法的目标检测模型。
  23. 一种无人机,其特征在于,所述无人机包括机身、与所述机身相连的机臂、设于所述机臂的动力系统、设置于所述机身的摄像装置和跟踪芯片,所述摄像装置和所述跟踪芯片电性连接,其中,所述摄像装置用于获取待检测图像,所述跟踪芯片包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-11任一项所述的方法。
  24. 一种非易失性计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,当所述计算机可执行指令被无人机执行时,使所述无人机执行如权利要求1-11任一项所述的方法。
PCT/CN2020/078629 2019-03-20 2020-03-10 一种目标跟踪方法、装置和无人机 Ceased WO2020187095A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910213970.2 2019-03-20
CN201910213970.2A CN109978045A (zh) 2019-03-20 2019-03-20 一种目标跟踪方法、装置和无人机

Publications (1)

Publication Number Publication Date
WO2020187095A1 true WO2020187095A1 (zh) 2020-09-24

Family

ID=67079721

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078629 Ceased WO2020187095A1 (zh) 2019-03-20 2020-03-10 一种目标跟踪方法、装置和无人机

Country Status (2)

Country Link
CN (1) CN109978045A (zh)
WO (1) WO2020187095A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686921A (zh) * 2021-01-08 2021-04-20 西安羚控电子科技有限公司 一种基于轨迹特征的多干扰无人机检测跟踪方法
CN112700469A (zh) * 2020-12-30 2021-04-23 武汉卓目科技有限公司 一种基于eco算法和目标检测的视觉目标跟踪方法及装置
CN112733741A (zh) * 2021-01-14 2021-04-30 苏州挚途科技有限公司 交通标识牌识别方法、装置和电子设备
CN113807464A (zh) * 2021-09-29 2021-12-17 东南大学 基于改进yolo v5的无人机航拍图像目标检测方法
CN113808170A (zh) * 2021-09-24 2021-12-17 电子科技大学长三角研究院(湖州) 一种基于深度学习的反无人机跟踪方法
CN115690155A (zh) * 2022-10-28 2023-02-03 武汉中海庭数据技术有限公司 一种标识牌跟踪方法、跟踪系统、电子设备及存储介质
CN117291950A (zh) * 2023-08-29 2023-12-26 哈尔滨工业大学 一种用于微小型机器人的轻量化目标检测跟踪方法及系统
CN117765031A (zh) * 2024-02-21 2024-03-26 四川盎芯科技有限公司 一种边缘智能设备的图像多目标预跟踪方法及系统

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978045A (zh) * 2019-03-20 2019-07-05 深圳市道通智能航空技术有限公司 一种目标跟踪方法、装置和无人机
CN110569840B (zh) * 2019-08-13 2023-05-16 浙江大华技术股份有限公司 目标检测方法及相关装置
CN110687922B (zh) * 2019-11-08 2022-10-28 湖北经济学院 一种无人机的视觉跟踪方法及具有视觉跟踪功能的无人机
CN111242981A (zh) * 2020-01-21 2020-06-05 北京捷通华声科技股份有限公司 一种定置物品的跟踪方法、装置和安保设备
CN111667505B (zh) * 2020-04-30 2023-04-07 北京捷通华声科技股份有限公司 一种定置物品跟踪的方法和装置
CN112700478A (zh) * 2020-12-31 2021-04-23 北京澎思科技有限公司 目标跟踪方法、系统、计算机可读存储介质和程序产品
CN113256680A (zh) * 2021-05-13 2021-08-13 燕山大学 一种基于无监督学习高精度的目标跟踪系统
CN113470078B (zh) * 2021-07-15 2024-09-06 浙江大华技术股份有限公司 一种目标跟踪方法、装置及系统
CN114937231B (zh) * 2022-07-21 2022-09-30 成都西物信安智能系统有限公司 一种目标识别跟踪的方法
CN115239756A (zh) * 2022-08-12 2022-10-25 亿航智能设备(广州)有限公司 一种目标跟踪方法、设备及计算机可读存储介质
CN115908499B (zh) * 2022-12-27 2026-01-09 深圳创维数字技术有限公司 运动目标跟踪方法、装置、电子设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130301911A1 (en) * 2012-05-08 2013-11-14 Samsung Electronics Co., Ltd Apparatus and method for detecting body parts
CN107066990A (zh) * 2017-05-04 2017-08-18 厦门美图之家科技有限公司 一种目标跟踪方法及移动设备
CN108062764A (zh) * 2017-11-30 2018-05-22 极翼机器人(上海)有限公司 一种基于视觉的物体跟踪方法
CN109409354A (zh) * 2017-08-18 2019-03-01 深圳市道通智能航空技术有限公司 无人机智能跟随目标确定方法、无人机和遥控器
CN109978045A (zh) * 2019-03-20 2019-07-05 深圳市道通智能航空技术有限公司 一种目标跟踪方法、装置和无人机

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960446B (zh) * 2017-04-01 2020-04-24 广东华中科技大学工业技术研究院 一种面向无人艇应用的水面目标检测跟踪一体化方法
CN107564034A (zh) * 2017-07-27 2018-01-09 华南理工大学 一种监控视频中多目标的行人检测与跟踪方法
CN107563313B (zh) * 2017-08-18 2020-07-07 北京航空航天大学 基于深度学习的多目标行人检测与跟踪方法
CN107943837B (zh) * 2017-10-27 2022-09-30 江苏理工学院 一种前景目标关键帧化的视频摘要生成方法
CN107918765A (zh) * 2017-11-17 2018-04-17 中国矿业大学 一种移动目标检测并追踪系统及其方法
CN108229442B (zh) * 2018-02-07 2022-03-11 西南科技大学 基于ms-kcf的图像序列中人脸快速稳定检测方法
CN108596955B (zh) * 2018-04-25 2020-08-28 Oppo广东移动通信有限公司 一种图像检测方法、图像检测装置及移动终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130301911A1 (en) * 2012-05-08 2013-11-14 Samsung Electronics Co., Ltd Apparatus and method for detecting body parts
CN107066990A (zh) * 2017-05-04 2017-08-18 厦门美图之家科技有限公司 一种目标跟踪方法及移动设备
CN109409354A (zh) * 2017-08-18 2019-03-01 深圳市道通智能航空技术有限公司 无人机智能跟随目标确定方法、无人机和遥控器
CN108062764A (zh) * 2017-11-30 2018-05-22 极翼机器人(上海)有限公司 一种基于视觉的物体跟踪方法
CN109978045A (zh) * 2019-03-20 2019-07-05 深圳市道通智能航空技术有限公司 一种目标跟踪方法、装置和无人机

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112700469A (zh) * 2020-12-30 2021-04-23 武汉卓目科技有限公司 一种基于eco算法和目标检测的视觉目标跟踪方法及装置
CN112686921A (zh) * 2021-01-08 2021-04-20 西安羚控电子科技有限公司 一种基于轨迹特征的多干扰无人机检测跟踪方法
CN112686921B (zh) * 2021-01-08 2023-12-01 西安羚控电子科技有限公司 一种基于轨迹特征的多干扰无人机检测跟踪方法
CN112733741A (zh) * 2021-01-14 2021-04-30 苏州挚途科技有限公司 交通标识牌识别方法、装置和电子设备
CN113808170A (zh) * 2021-09-24 2021-12-17 电子科技大学长三角研究院(湖州) 一种基于深度学习的反无人机跟踪方法
CN113808170B (zh) * 2021-09-24 2023-06-27 电子科技大学长三角研究院(湖州) 一种基于深度学习的反无人机跟踪方法
CN113807464A (zh) * 2021-09-29 2021-12-17 东南大学 基于改进yolo v5的无人机航拍图像目标检测方法
CN113807464B (zh) * 2021-09-29 2022-05-13 东南大学 基于改进yolo v5的无人机航拍图像目标检测方法
CN115690155A (zh) * 2022-10-28 2023-02-03 武汉中海庭数据技术有限公司 一种标识牌跟踪方法、跟踪系统、电子设备及存储介质
CN117291950A (zh) * 2023-08-29 2023-12-26 哈尔滨工业大学 一种用于微小型机器人的轻量化目标检测跟踪方法及系统
CN117765031A (zh) * 2024-02-21 2024-03-26 四川盎芯科技有限公司 一种边缘智能设备的图像多目标预跟踪方法及系统
CN117765031B (zh) * 2024-02-21 2024-05-03 四川盎芯科技有限公司 一种边缘智能设备的图像多目标预跟踪方法及系统

Also Published As

Publication number Publication date
CN109978045A (zh) 2019-07-05

Similar Documents

Publication Publication Date Title
WO2020187095A1 (zh) 一种目标跟踪方法、装置和无人机
KR102254491B1 (ko) 지능형 영상 분석 모듈을 탑재한 자율비행 드론
US11287828B2 (en) Obstacle detection method and apparatus and robot using the same
WO2020244649A1 (zh) 一种避障方法、装置和电子设备
CN106527481A (zh) 无人机飞行控制方法、装置及无人机
US11106223B2 (en) Apparatus and methods for landing unmanned aerial vehicle
CN110673647B (zh) 全向避障方法及无人飞行器
CN106292799B (zh) 无人机、遥控装置及其控制方法
WO2019061111A1 (zh) 一种路径调整方法及无人机
WO2020103109A1 (zh) 一种地图生成方法、设备、飞行器及存储介质
CN110619276A (zh) 基于无人机移动监控的异常及暴力检测系统和方法
CN111796603A (zh) 烟雾巡检无人机系统、巡检检测方法和存储介质
CN107871324A (zh) 一种基于双通道的目标跟踪方法及装置
CN110109482A (zh) 基于ssd神经网络的目标跟踪系统
CN108121350B (zh) 一种控制飞行器降落的方法以及相关装置
WO2018045976A1 (zh) 一种飞行器的飞行控制方法和飞行控制装置
CN110751270A (zh) 一种无人机电线故障检测方法、系统及设备
US20210325909A1 (en) Method, apparatus and unmanned aerial vehicle for processing depth map
Bondi et al. Near Real-Time Detection of Poachers from Drones in AirSim.
US11964775B2 (en) Mobile object, information processing apparatus, information processing method, and program
US20190072986A1 (en) Unmanned aerial vehicles
JP6360650B1 (ja) 異常検知システム、方法及びプログラム
Sevil et al. Evaluation of extant computer vision techniques for detecting intruder sUAS
KR102194127B1 (ko) 멤스센서를 구비한 드론
CN110262567A (zh) 一种路径中继点空间生成方法、装置和无人机

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20772549

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20772549

Country of ref document: EP

Kind code of ref document: A1