Target detection and training for target detection network
Abstract
A method, apparatus and device for target detection, as well as a training method, apparatus and device for target detection network are disclosed. The method for target detection includes that: feature data of an input image is obtained; multiple candidate bounding boxes of the input image are determined according to the feature data; a foreground segmentation result of the input image is obtained according to the feature data, the foreground segmentation result including indication information for indicating whether each of the input image belongs to a foreground; and a target detection result of the input image is obtained according to the multiple candidate bounding boxes and the foreground segmentation result.
Claims
exact text as granted — not AI-modified1 . A method for target detection, comprising:
obtaining feature data of an input image; determining multiple candidate bounding boxes of the input image according to the feature data; obtaining a foreground segmentation result of the input image according to the feature data, the foreground segmentation result comprising indication information for indicating whether each of multiple pixels of the input image belongs to a foreground; and obtaining a target detection result of the input image according to the multiple candidate bounding boxes and the foreground segmentation result.
2 . The method of claim 1 , wherein obtaining the target detection result of the input image according to the multiple candidate bounding boxes and the foreground segmentation result comprises:
selecting at least one target bounding box from the multiple candidate bounding boxes according to an overlapping area between each candidate bounding box in the multiple candidate bounding boxes and a foreground image region corresponding to the foreground segmentation result; and obtaining the target detection result of the input image based on the at least one target bounding box.
3 . The method of claim 2 , wherein selecting the at least one target bounding box from the multiple candidate bounding boxes according to the overlapping area between each candidate bounding box in the multiple candidate bounding boxes and the foreground image region corresponding to the foreground segmentation result comprises:
for each candidate bounding box in the multiple candidate bounding boxes, if a ratio of an overlapping area between the candidate bounding box and the foreground image region to an area of the candidate bounding box is greater than a first threshold, taking the candidate bounding box as the target bounding box.
4 . The method of claim 2 , wherein the at least one target bounding box comprises a first bounding box and a second bounding box, and obtaining the target detection result of the input image based on the at least one target bounding box comprises:
determining an overlapping parameter between the first bounding box and the second bounding box based on an angle between the first bounding box and the second bounding box; and determining a target object position corresponding to the first bounding box and the second bounding box based on the overlapping parameter between the first bounding box and the second bounding box.
5 . The method of claim 4 , wherein determining the overlapping parameter between the first bounding box and the second bounding box based on the angle between the first bounding box and the second bounding box comprises:
obtaining an angle factor according to the angle between the first bounding box and the second bounding box; and obtaining the overlapping parameter according to an Intersection over Union (IoU) between the first bounding box and the second bounding box and to the angle factor.
6 . The method of claim 5 , wherein the overlapping parameter between the first bounding box and the second bounding box is a product of the IoU and the angle factor; and the angle factor increases with an increase of the angle between the first bounding box and the second bounding box.
7 . The method of claim 5 , wherein in a case where the IoU keeps fixed, the overlapping parameter between the first bounding box and the second bounding box increases with the increase of the angle between the first bounding box and the second bounding box.
8 . The method of claim 4 , wherein determining the target object position corresponding to the first bounding box and the second bounding box based on the overlapping parameter between the first bounding box and the second bounding box comprises:
in a case where the overlapping parameter between the first bounding box and the second bounding box is greater than a second threshold, taking one of the first bounding box and the second bounding box as the target object position.
9 . The method of claim 8 , wherein taking the one of the first bounding box and the second bounding box as the target object position comprises:
determining an overlapping parameter between the first bounding box and the foreground image region corresponding to the foreground segmentation result, and determining an overlapping parameter between the second bounding box and the foreground image region; and taking one of the first bounding box and the second bounding box, of which the overlapping parameter with the foreground image region is larger than that of another, as the target object position.
10 . The method of claim 4 , wherein determining the target object position corresponding to the first bounding box and the second bounding box based on the overlapping parameter between the first bounding box and the second bounding box comprises:
in a case where the overlapping parameter between the first bounding box and the second bounding box is smaller than or equal to a second threshold, taking each of the first bounding box and the second bounding box as a target object position.
11 . The method of claim 1 , wherein a length-width ratio of a to-be-detected target object in the input image is greater than a specific value.
12 . A training method for a target detection network, wherein the target detection network comprises a feature extraction network, a target prediction network and a foreground segmentation network, and the method comprises:
performing feature extraction processing on a sample image through the feature extraction network to obtain feature data of the sample image; obtaining, according to the feature data, multiple sample candidate bounding boxes through the target prediction network; obtaining, according to the feature data, a sample foreground segmentation result of the sample image through the foreground segmentation network, the sample foreground segmentation result comprising indication information for indicating whether each of multiple pixels of the sample image belongs to a foreground; determining a network loss value according to the multiple sample candidate bounding boxes, the sample foreground segmentation result and labeling information of the sample image; and adjusting a network parameter of the target detection network based on the network loss value.
13 . An apparatus for target detection, comprising:
a memory and a processor, wherein the memory is configured to store computer instructions capable of running on the processor, and the processor is configured to: obtain feature data of an input image; determine multiple candidate bounding boxes of the input image according to the feature data; obtain a foreground segmentation result of the input image according to the feature data, the foreground segmentation result comprising indication information for indicating whether each of multiple pixels of the input image belongs to a foreground; and a obtain a target detection result of the input image according to the multiple candidate bounding boxes and the foreground segmentation result.
14 . The apparatus of claim 13 , wherein the processor is specifically configured to:
select at least one target bounding box from the multiple candidate bounding boxes according to an overlapping area between each candidate bounding box in the multiple candidate bounding boxes and a foreground image region corresponding to the foreground segmentation result; and obtain the target detection result of the input image based on the at least one target bounding box.
15 . The apparatus of claim 14 , wherein when selecting the at least one target bounding box from the multiple candidate bounding boxes according to the overlapping area between each candidate bounding box in the multiple candidate bounding boxes and the foreground image region corresponding to the foreground segmentation result, the processor is specifically configured to:
take, for each candidate bounding box in the multiple candidate bounding boxes, if a ratio of an overlapping area between the candidate bounding box and the foreground image region to an area of the candidate bounding box is greater than a first threshold, the candidate bounding box as the target bounding box.
16 . The apparatus of claim 14 , wherein the at least one target bounding box comprises a first bounding box and a second bounding box, and when obtaining the target detection result of the input image based on the at least one target bounding box, the processor is specifically configured to:
determine an overlapping parameter between the first bounding box and the second bounding box based on an angle between the first bounding box and the second bounding box; and determine a target object position corresponding to the first bounding box and the second bounding box based on the overlapping parameter between the first bounding box and the second bounding box.
17 . The apparatus of claim 16 , wherein when determining the overlapping parameter of the first bounding box and the second bounding box based on the angle between the first bounding box and the second bounding box, the processor is specifically configured to:
obtain an angle factor according to the angle between the first bounding box and the second bounding box; and obtain the overlapping parameter according to an Intersection over Union (IoU) between the first bounding box and the second bounding box and the angle factor.
18 . The apparatus of claim 17 , wherein the overlapping parameter between the first bounding box and the second bounding box is a product of the IoU and the angle factor; and the angle factor increases with an increase of the angle between the first bounding box and the second bounding box.
19 . The apparatus of claim 17 , wherein in a case where the IoU keeps fixed, the overlapping parameter between the first bounding box and the second bounding box increases with the increase of the angle between the first bounding box and the second bounding box.
20 . A non-transitory computer-readable storage medium, storing computer programs thereon, wherein the computer programs are executed by a processor to cause the processor to implement the method of claim 1 .Join the waitlist — get patent alerts
Track US2021056708A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.