Semi-artificial initial tracking box determination and tracking method and system combined with object detection

By combining object detection and Mosse algorithm, the initial tracking box is optimized and the tracking box is corrected by using the object detector, the problems of inaccuracy and drift of external boxes in the object detection and tracking methods are solved, and fine tracking and resource conservation are achieved.

CN113947619BActive Publication Date: 2025-08-01SHANGHAI YINGJUE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111327493.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-08-01
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

In the prior art, the object detection and tracking methods have inaccuracy when determining the initial tracking box, especially when the target is small, resulting in the background area being mistaken for the target, and the tracking box is prone to drift, affecting the tracking quality.

Method used

Combining object detection and Mosse algorithm, the initial tracking box is manually marked, the tracking box is corrected using the target detector, and the target detection and tracking are performed alternately. Combining the gradient value to judge the foreground and background pixels, the tracking box is optimized.

Benefits of technology

Without increasing the amount of manual operation, fine target frame determination is achieved, tracking drift is reduced, tracking quality is improved, adaptability is strong, and computing resources are saved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947619B_ABST
    Figure CN113947619B_ABST
Patent Text Reader

Abstract

The present invention provides a semi-artificial initial tracking box determination and tracking method and system combined with object detection, including: Step S1: Manually annotate the object using a tracking box of a preset size; Step S2: Determine whether the current object is a large ship meeting the preset requirements according to the size of the object detection result. When it is a large ship meeting the preset requirements, continue to use the tracking box of the preset size manually annotated for annotation; when it is not a large ship meeting the preset requirements, use the object detector to correct the tracking box to obtain the final tracking box; Step S3: Use the final tracking box to perform tracking through the Mosse algorithm; the object detector and the Mosse algorithm are alternately performed according to a preset ratio, and the latest detection position is used as the new tracking position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vessel target detection, and specifically, to a semi-artificial initial tracking box determination and tracking method combined with target detection. Background Art

[0002] In the prior art, target detection refers to obtaining the position of a target (represented in the form of a rectangular box) from a given image through an automated method. The closer the rectangular box corresponding to the target is to the true outer frame of the target and the higher the degree of overlap, the better the detection quality. As Figure 1 shown. Yolov5 is a relatively popular target detection method at present. This method is based on a deep neural network and, after multiple iterative trainings using a large number of sample images, achieves the effect of target detection and positioning.

[0003] Target tracking is a common application in computer vision, and specifying an initial tracking box manually is a common application form. However, considering the convenience in actual operation, often only by clicking, the center position of the initial tracking box can be roughly given, but the precise outer frame size cannot be provided. When the target is small, the fixed outer frame size results in a large amount of background area in the tracking box, causing the background to be mistakenly regarded as the tracking object during tracking, and thus missing the true target.

[0004] Meanwhile, in the prior art, target tracking uses the initial target position given manually or the initial position of the target automatically detected, and the precise position of the target in each new frame of the video is obtained in real time. The target position in the previous frame and the positions of multiple frames before the previous frame are instructive for determining the target position in the current frame.

[0005] Tracking drift is also a common phenomenon. During the tracking process, it is easy for the tracking box to gradually deviate from the actual position and finally completely lose the target. The main reasons for this phenomenon are changes in the target, such as the target turning, changes in its own pose and movement, and illumination interference, etc.

[0006] In order to solve the technical problems existing in the prior art, the present invention proposes a method for refining the outer frame size using target detection. In addition, during the tracking process, target detection is also used to improve the tracking quality and reduce the interference of problems such as tracking drift.

[0007] Patent document CN109918968A (application date: 201711319225.3) discloses a ship target detection method, which includes extracting the sea-sky line based on gradients from the original visible light image, obtaining the position of the sea-sky line in the image, and segmenting the sea-sky line area image containing the target based on the position of the sea-sky line in the image; performing saliency detection on the obtained sea-sky line area image by using an improved multi-scale phase spectrum algorithm to obtain a saliency image; performing OTSU threshold segmentation on the saliency image, and the segmented one is the ship target. Summary of the Invention

[0008] Aiming at the defects in the prior art, the purpose of the present invention is to provide a semi-artificial initial tracking frame determination and tracking method and system combined with target detection.

[0009] A semi-artificial initial tracking frame determination and tracking method combined with target detection provided by the present invention includes:

[0010] Step S1: Manually annotate the target with a tracking frame of a preset size;

[0011] Step S2: Judge whether the current target is a large ship meeting the preset requirements according to the size of the target detection result. When it is a large ship meeting the preset requirements, continue to annotate with the tracking frame of the preset size manually marked; when it is not a large ship meeting the preset requirements, use the target detector to correct the tracking frame to obtain the final tracking frame;

[0012] Step S3: Perform tracking through the Mosse algorithm by using the final tracking frame;

[0013] The target detector and the Mosse algorithm are alternately performed according to a preset ratio, and the latest detection position is used as the new tracking position.

[0014] Preferably, in step S2, the magnification corresponding to the camera lens when each frame of image is taken and the true size of the target corresponding to each pixel in the image obtained with different magnifications are saved in the database; based on the outer frame size obtained by target detection, according to the pixel data corresponding to the length and height of the outer frame, calculate the true physical size of the corresponding target, and judge whether the current target is a large ship meeting the preset requirements according to the calculated true physical size.

[0015] Preferably, the target detector is to train the yolov5 detector by using the outer frame position in the manually marked pictures to obtain the trained target detector;

[0016] The correction of the tracking box using the target detector is as follows: Use the trained yolov5 detector to perform target detection on the entire image, set a distance threshold, draw a circle with the distance threshold as the radius and the position where the mouse clicks during manual annotation as the center, select all detection results with the target center within the circle, and use the target with the highest confidence among all detection results as the target to be tracked.

[0017] Preferably, step S2 is as follows: When the position of the target detection does not meet the preset requirements, cancel the current tracking, and repeat to trigger steps S1 to S2 until a target detection position that meets the preset requirements is obtained.

[0018] Preferably, calculate the gradient value of each pixel, compare the gradient values of each pixel. When the gradient value of a pixel is higher than the threshold, it is a foreground pixel; when the gradient value of a pixel is lower than or equal to the threshold, it is a background pixel; determine and track the tracking box based on the foreground pixels.

[0019] A semi-artificial initial tracking box determination and tracking system combining target detection according to the present invention includes:

[0020] Module M1: Manually annotate the target using a tracking box of a preset size;

[0021] Module M2: Determine whether the current target is a large ship that meets the preset requirements according to the size of the target detection result. When it is a large ship that meets the preset requirements, continue to use the tracking box of the preset size for manual annotation; when it is not a large ship that meets the preset requirements, correct the tracking box using the target detector to obtain the final tracking box;

[0022] Module M3: Perform tracking using the final tracking box through the Mosse algorithm;

[0023] The target detector and the Mosse algorithm are alternately performed according to a preset ratio, and the latest detection position is used as the new tracking position.

[0024] Preferably, module M2 is as follows: Save the magnification corresponding to the camera lens when each frame of image is captured and the true size of the target corresponding to each pixel in the image obtained with different magnifications to the database; Based on the outer frame size obtained from the target detection, calculate the true physical size of the corresponding target according to the pixel data corresponding to the length and height of the outer frame, and determine whether the current target is a large ship that meets the preset requirements according to the calculated true physical size.

[0025] Preferably, the target detector is trained by using the outer frame position in the manually annotated pictures to train the yolov5 detector to obtain the trained target detector;

[0026] The correction of the tracking box by using the target detector adopts the following method: using the trained yolov5 detector to perform target detection on the entire image, setting a distance threshold, drawing a circle with the distance threshold as the radius and the position clicked by the mouse during manual annotation as the center, selecting all detection results whose target centers are within the circle, and taking the target with the highest confidence among all detection results as the target to be tracked.

[0027] Preferably, the module M2 adopts the following method: when the position of the target detection does not meet the preset requirements, the current tracking is cancelled, and the modules M1 to M2 are repeatedly triggered until a target detection position that meets the preset requirements is obtained.

[0028] Preferably, calculate the gradient value of each pixel, compare the gradient values of each pixel. When the gradient value of a pixel is higher than the threshold, it is a foreground pixel; when the gradient value of a pixel is lower than or equal to the threshold, it is a background pixel; determine and track the tracking box based on the foreground pixels.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] 1. Without increasing the amount of additional manual operations, a fine target outer frame can be automatically obtained, thereby solving the influence on tracking caused by inaccurate outer frames.

[0031] 2. Introducing target detection into the tracking process reduces the interference of tracking drift and improves the tracking quality.

[0032] 3. The Mosse algorithm and the yolov5 algorithm run alternately, which can not only save computing resources but also solve the problem of tracking drift.

[0033] 4. The present invention can simultaneously take into account the tracking of large targets and small targets, and has strong adaptability.

[0034] 5. The present invention makes full use of the pixels with large gradient values on the target, reduces the interference of the background area and the flat areas on the target to tracking, and improves the tracking quality. Description of the Drawings

[0035] By reading the following detailed description of the non-restrictive embodiments with reference to the accompanying drawings, other features, objects and advantages of the present invention will become more apparent:

[0036] Figure 1 It is a schematic diagram of target detection.

[0037] Figure 2 It is a flowchart of the semi-artificial initial tracking box determination and tracking method combined with target detection.

[0038] Figure 3 It is the relationship between the default initial box and the true target outer frame.

[0039] Figure 4 For the case of large ships.

[0040] Figure 5 To filter the background by using gradient information. Specific implementation manner

[0041] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made. These all belong to the protection scope of the present invention.

[0042] Example 1

[0043] A semi-artificial initial tracking box determination and tracking method combined with object detection according to the present invention includes:

[0044] Step S1: Manually annotate the object using a tracking box of a preset size;

[0045] Step S2: Determine whether the current object is a large ship that meets the preset requirements according to the size of the object detection result. When it is a large ship that meets the preset requirements, continue to use the tracking box of the preset size manually annotated for annotation; when it is not a large ship that meets the preset requirements, use the object detector to correct the tracking box to obtain the final tracking box;

[0046] Step S3: Use the final tracking box to perform tracking through the Mosse algorithm;

[0047] The object detector and the Mosse algorithm are alternately performed according to a preset ratio, and the latest detection position is used as the new tracking position. The Mosse and yolov5 detection methods are alternately performed. That is, the yolov5 algorithm is used for detection in the first frame to obtain the tracking box. In the following consecutive N frames, the Mosse algorithm is used for tracking. This method is fast and consumes less resources.

[0048] Specifically, the object detector is a yolov5 detector.

[0049] Specifically, the correction of the tracking box by using the object detector adopts: using the trained yolov5 detector to perform object detection on the entire image, setting a distance threshold, drawing a circle with the distance threshold as the radius and the position clicked by the mouse during manual annotation as the center, selecting all detection results whose object centers are within the circle, and taking the object with the highest confidence among all detection results as the object to be tracked.

[0050] The YOLOv5 object detection network not only gives the position of the bounding rectangle of the object, but also gives a probability value, that is, the confidence level, indicating whether the content within the box is indeed such an object. This confidence level is learned by the YOLOv5 network using deep features and regression methods.

[0051] Specifically, in step S2, the magnification factor corresponding to the camera lens when each frame of the image is captured and the true size of each pixel in the image obtained at different magnification factors are saved in the database; based on the size of the bounding box obtained from object detection, according to the pixel data corresponding to the length and height of the bounding box, the true physical size of the corresponding object is calculated, and whether the current object is a large ship meeting the preset requirements is judged according to the calculated true physical size.

[0052] Specifically, in step S2, when the position of the object detection does not meet the preset requirements, the current tracking is cancelled, and steps S1 to S2 are repeatedly triggered until an object detection position meeting the preset requirements is obtained.

[0053] Specifically, the gradient value of each pixel is calculated, and the gradient values of each pixel are compared. When the gradient value of a pixel is higher than the threshold, it is a foreground pixel; when the gradient value of a pixel is lower than or equal to the threshold, it is a background pixel; the tracking box is determined and tracked based on the foreground pixels.

[0054] According to a semi-artificial initial tracking box determination and tracking system combining object detection provided by the present invention, it includes:

[0055] Module M1: Manually annotate the object using a tracking box of a preset size;

[0056] Module M2: Judge whether the current object is a large ship meeting the preset requirements according to the size of the object detection result. When it is a large ship meeting the preset requirements, the manually annotated tracking box of the preset size is continued to be used for annotation; when it is not a large ship meeting the preset requirements, the tracking box is corrected using the object detector to obtain the final tracking box;

[0057] Module M3: Track using the final tracking box through the Mosse algorithm;

[0058] The object detector and the Mosse algorithm are alternately performed according to a preset ratio, and the latest detection position is used as the new tracking position. The Mosse and YOLOv5 detection methods are alternately performed. That is, the YOLOv5 algorithm is used for detection in the first frame to obtain the tracking box. In the following consecutive N frames, the Mosse algorithm is used for tracking. This method is fast and consumes less resources.

[0059] Specifically, the object detector is a YOLOv5 detector.

[0060] Specifically, the correction of the tracking box using the target detector is as follows: Use the trained yolov5 detector to perform target detection on the entire image, set a distance threshold, draw a circle with the distance threshold as the radius and the position where the mouse clicks during manual annotation as the center, select all detection results whose target centers are within the circle, and use the target with the highest confidence among all detection results as the target to be tracked.

[0061] The yolov5 target monitoring network, in addition to giving the position of the bounding rectangle of the target, will also give a probability value, that is, the confidence, regarding whether the content within the box is this kind of target. This confidence is learned by the yolov5 network using deep features and regression methods.

[0062] Specifically, the module M2 adopts the following steps: Save the magnification corresponding to the camera lens when each frame of the image is taken and the true size of the target corresponding to each pixel in the image obtained at different magnifications to the database; Based on the size of the bounding box obtained from target detection, calculate the true physical size of the corresponding target according to the pixel data corresponding to the length and height of the bounding box, and determine whether the current target is a large ship that meets the preset requirements based on the calculated true physical size.

[0063] Specifically, the module M2 adopts the following steps: When the position of the target detection does not meet the preset requirements, cancel the current tracking, and repeat triggering module M1 to module M2 until a target detection position that meets the preset requirements is obtained.

[0064] Specifically, calculate the gradient value of each pixel, compare the gradient values of each pixel. When the gradient value of a pixel is higher than the threshold, it is a foreground pixel; when the gradient value of a pixel is lower than or equal to the threshold, it is a background pixel; Determine and track the tracking box based on the foreground pixels.

[0065] Example 2

[0066] Embodiment 2 is a preferred example of Embodiment 1

[0067] The present invention provides a semi-artificial initial tracking box determination and tracking method combined with target detection, as Figure 2As shown in the figure; the application scenario of the present invention is the initial position of the target, which is given manually. The specific operation method is as follows: manually click on the screen with the mouse once, and then draw a square initial box with this as the center point. The side length of the square is set in advance. Since various sizes of ships need to be taken into account, the default side length is 80 pixels. However, when facing many small boats (small sampans, small fishing boats, pedestrians in the distance), a square with a side length of 80 pixels will include a large amount of background area. When the proportion of the background area exceeds the target pixels, the main focus of the tracker becomes the background, and the target is instead ignored, resulting in tracking failure; therefore, a target detector is needed to correct the tracking box.

[0068] As Figure 4 As shown in the figure, the shapes of ships are often flat and long, with the width much larger than the height. This is even more obvious for many cargo ships and fishing boats. At this time, if a square is used as the default tracking box, more than 80% of the pixels will be background pixels. At this time, the tracking method will focus mainly on the background, resulting in ignoring the movement of the target and becoming a "background tracker".

[0069] The yolov5 deep network is used as the ship detector. By collecting a large number of ship pictures in advance (all possible ship types to be tracked), and then manually marking the outer frame positions of the ships in the pictures, the yolov5 is iteratively trained multiple times using the GPU to obtain the detector. Then this detector can be used to detect each input image to obtain the position of the target.

[0070] The initial mouse click position provided manually is information with extremely high confidence, indicating that there must be a ship around the click position (possibly due to a slight deviation in the manual click, the click position is not on the ship, but there must be a ship in the area not far from it). Therefore, the usage method of the target detector can be flexibly changed as follows: use yolov5 to perform target detection on the entire image; set a distance threshold to filter out the detection results where the distance between the target center and the mouse click position exceeds the threshold; draw a circle with the distance threshold as the radius and the mouse click position as the center, and select the target with the highest confidence among all the detection results where the target center is inside the circle as the target to be tracked;

[0071] Use the target bounding box as the corrected initial tracking box to start automatic tracking. In order to completely eliminate the impact of false detections (the probability of false detections is extremely low) brought by the target detector on tracking, the following method is adopted:

[0072] On the software interface, there is a method to set the cancellation of the tracking box and the tracking process. That is, once it is found that the position of the target detection is not ideal, only by right-clicking the mouse can the current tracking be cancelled. Then the user clicks on the target position again to re-detect the target and obtain the refined initial outer frame position of the target.

[0073] If it is a large ship, the outer frame of the hull is much larger than the size of the default tracking box. At this time, if the result of target detection is used for tracking, it may not conform to the user's intention. As Figure 4 shown, the large box corresponds to the real outer frame of the large ship. And the user's intention is to use the content in the red box as the tracking target. The following method can be used to solve this problem:

[0074] According to the size of the target detection result, judge whether it is a large ship; when each frame of image is taken, the magnification factor corresponding to the camera lens at this time will be recorded. The real size of each pixel corresponding to the target in the image obtained with different magnification factors is pre-recorded. Therefore, according to the outer frame size obtained by target detection, the real physical size can be calculated based on the number of pixels corresponding to the length and height of the outer frame, and then judge whether it is a large ship; and a large ship is a ship whose size meets the preset conditions.

[0075] If it is a large ship, the detected outer frame cannot be simply used as the tracking box, but the default tracking box should be continued to be used. (The detected outer frame refers to the circumscribed box detected by the yolov5 network. The default box refers to the tracking box with a side length of 80 pixels corresponding to the manual click.)

[0076] Although the outer frame of the target has been greatly optimized using the target detector, the interference of the background still exists. As Figure 5 (a) shows, there are still some water surface areas that will enter the target box. They need to be filtered out as much as possible to reduce their interference with the tracking process.

[0077] As Figure 5 (b) shows, on the basis of Figure 5 (a), by calculating the gradient value of each pixel and then performing binarization (setting a threshold to compare the gradient value of each pixel. Those higher than the threshold are regarded as foreground pixels, and those lower than the threshold are regarded as background pixels. In this way, the positions with larger gradient values are shown in the form of foreground pixels); in this figure, the edge positions of the hull and the fisherman are extracted, and the water surface background is filtered out. Therefore, it can be done in Figure 5(b) Based on the side gradient map, the white pixels among them are used as the tracked pixels, while the black pixels in the background are ignored. Taking the tracking method of template matching as an example, the specific approach is as follows: When using the template map to search for the new position of the target in the current frame for matching and calculating the total difference of the sub - map, only the total error corresponding to the foreground pixels is counted, without considering the black pixels. This can greatly solve the interference of background pixels. The template matching method is to compare each pixel of the current gradient map with the template gradient map to see if they are all foreground pixels or all background pixels, and calculate the total proportion of the matching pixels. The higher the total proportion, the better the matching effect.

[0078] Currently, tracking based on deep learning has become a new research trend and shows considerable potential. However, this method relies on devices such as GPUs, which limits its application scenarios. In many specific applications, the computing device running the tracking algorithm is a CPU with relatively low performance, or due to power consumption considerations, the CPU has a low main frequency and no GPU is configured. At this time, how to flexibly use the object detection deep network to achieve the best balance between resource consumption and algorithm quality becomes a key issue (it is not possible to use the object detector based on the deep network for each frame, otherwise the computing resources will not be able to keep up). The present invention uses the following method to achieve this goal:

[0079] After obtaining the optimized result of the tracking box using the detector, a conventional tracking method (such as the Mosse algorithm) is used to achieve real - time update of the target's position. The Mosse algorithm is characterized by fast speed and is very suitable for use in occasions where CPU resources are limited;

[0080] The Mosse algorithm can only perform image matching and cannot verify whether the current tracking result is correct. Therefore, after using it for a period of time (such as dozens of seconds), tracking drift may occur, and this error will accumulate. To correct this drift, the object detector can be used to detect the entire image in combination with the tracking result of the Mosse algorithm, and the latest detection position is used as the new tracking position;

[0081] The usage ratio of the Mosse algorithm to the yolov5 detector is N:1, and N can be set to 100 frames. That is, use the Mosse algorithm to track for 100 frames, then use yolov5 to perform an object detection on the entire image to correct the tracking result, and then continue to track using the Mosse algorithm again. In this way, it is possible to neither over - consume CPU resources nor prevent tracking drift.

[0082] Those skilled in the art know that in addition to implementing the systems, devices, and their respective modules provided by the present invention in the form of pure computer-readable program code, the method steps can be logically programmed to enable the systems, devices, and their respective modules provided by the present invention to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers, etc., to achieve the same program. Therefore, the systems, devices, and their respective modules provided by the present invention can be considered as a kind of hardware component, and the modules included therein for implementing various programs can also be regarded as the structures within the hardware component; the modules for implementing various functions can also be regarded as either software programs for implementing the methods or the structures within the hardware component.

[0083] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A semi-artificial initial tracking box determination and tracking method combined with object detection, characterized in that Including: Step S1: Manually annotate the target using a tracking box of a preset size; Step S2: Determine whether the current target is a large ship that meets the preset requirements based on the size of the target detection result. When it is a large ship that meets the preset requirements, continue to use the tracking box of the preset size for manual annotation to obtain the final tracking box; when it is not a large ship that meets the preset requirements, use the target detector to correct the tracking box to obtain the final tracking box; Step S3: Use the final tracking box to perform tracking through the Mosse algorithm; The target detector and the Mosse algorithm alternate according to a preset ratio, and use the latest detection position as the new tracking position; Among them, the large ship that meets the preset requirements is a ship whose outer frame is much larger than the size of the default tracking box; the default tracking box is manually set in advance.

2. The semi-artificial initial tracking box determination and tracking method combined with object detection according to claim 1, wherein The step S2 adopts: Save the magnification corresponding to the camera lens when each frame of image is captured and the true size of the target corresponding to each pixel in the image obtained at different magnifications to the database; Based on the outer frame size obtained from the target detection, calculate the true physical size of the corresponding target according to the pixel data corresponding to the length and height of the outer frame, and determine whether the current target is a large ship that meets the preset requirements according to the calculated true physical size.

3. The semi-artificial initial tracking box determination and tracking method combined with object detection according to claim 1, characterized in that The target detector is to train the yolov5 detector using the outer frame position in the manually annotated pictures to obtain the trained target detector; The method of using the target detector to correct the tracking box adopts: Use the trained yolov5 detector to perform target detection on the whole image, set a distance threshold, draw a circle with the distance threshold as the radius and the position where the mouse clicks during manual annotation as the center, select all detection results with the target center inside the circle, and use the target with the highest confidence among all detection results as the target to be tracked.

4. The semi-artificial initial tracking box determination and tracking method combined with object detection according to claim 1, characterized in that The step S2 adopts: When the position of the target detection does not meet the preset requirements, cancel the current tracking, and repeat to trigger steps S1 to S2 until a target detection position that meets the preset requirements is obtained.

5. The semi-artificial initial tracking box determination and tracking method combined with object detection according to claim 1, characterized in that Calculate the gradient value of each pixel, and compare the gradient values of each pixel. When the gradient value of a pixel is higher than the threshold, it is a foreground pixel; when the gradient value of a pixel is lower than or equal to the threshold, it is a background pixel; Determine the tracking box and perform tracking based on the foreground pixels.

6. A semi-artificial initial tracking box determination and tracking system combined with object detection, characterized in that, Including: Module M1: Manually annotate the target using a tracking box of a preset size; Module M2: Determine whether the current target is a large ship that meets the preset requirements based on the size of the target detection result. When it is a large ship that meets the preset requirements, continue to use the tracking box of the preset size for manual annotation to obtain the final tracking box; when it is not a large ship that meets the preset requirements, use the target detector to correct the tracking box to obtain the final tracking box; Module M3: Use the final tracking box to perform tracking through the Mosse algorithm; The target detector and the Mosse algorithm alternate according to a preset ratio, and use the latest detection position as the new tracking position; Among them, the large ship meeting the preset requirements has an outer frame of the hull much larger than the size of the default tracking frame; the default tracking frame refers to the one preset manually.

7. The semi-artificial initial tracking box determination and tracking system combined with object detection according to claim 6, characterized in that, The module M2 adopts the following steps: saving the magnification factor corresponding to the camera lens when each frame of image is captured and the true size of each pixel in the image obtained at different magnification factors into the database; calculating the true physical size of the corresponding target according to the pixel data corresponding to the length and height of the outer frame obtained by target detection, and judging whether the current target is a large ship meeting the preset requirements according to the calculated true physical size.

8. The semi-artificial initial tracking box determination and tracking system combined with object detection according to claim 6, characterized in that The target detector is obtained by training the yolov5 detector with the outer frame positions in the manually annotated pictures to get the trained target detector. The method of correcting the tracking frame by using the target detector is as follows: using the trained yolov5 detector to perform target detection on the whole image, setting a distance threshold, drawing a circle with the distance threshold as the radius and the position clicked by the mouse during manual annotation as the center, selecting all the detection results with the target center inside the circle, and taking the target with the highest confidence among all the detection results as the target to be tracked.

9. The semi-artificial initial tracking box determination and tracking system combined with object detection according to claim 6, characterized in that, The module M2 adopts the following steps: when the position of the target detection does not meet the preset requirements, cancel the current tracking, and repeat triggering the module M1 to the module M2 until the target detection position meeting the preset requirements is obtained.

10. The semi-artificial initial tracking box determination and tracking system combined with object detection according to claim 6, characterized in that, Calculate the gradient value of each pixel, and compare the gradient values of each pixel. When the gradient value of a pixel is higher than the threshold, it is a foreground pixel; when the gradient value of a pixel is lower than or equal to the threshold, it is a background pixel; determine and track the tracking frame based on the foreground pixels.

Citation Information

Patent Citations

  • Ship target detection method

    CN109918968A

  • Video semi-automatic target labeling method integrating target detection and tracking

    CN110929560A

  • Video image correction method, device and equipment and readable storage medium

    CN111369586A