Target detection algorithm based on deep learning: a common target detection algorithm for ssd--

Source: Internet
Author: User

from:73439202

Problem Introduction:

At present, the common target detection algorithm, such as faster R-CNN, has the disadvantage of slow speed. The SSD method proposed in this paper not only improves the speed, but also improves the accuracy.

SSD: The core idea of this paper:

The main contribution of this paper:

1. The SSD target detection method is proposed, which is faster than the fastest YOLO in speed, and can be comparable with faster rcnn in the detection precision.

2. The core of SSDs is the use of convolution cores on feature maps to predict the category fractions, offsets of a series of default bounding boxes

3. In order to improve the accuracy of detection, in different scales of the characteristics of the prediction, in addition, also have different aspect ratio results

4. These improved designs enable End-to-end training, and the accuracy of the detection can be ensured even when the image resolution is low

5. In different data sets, such as: PASCAL VOC, MS COCO, ILSVRC, the method of detection speed, detection accuracy was tested, and compared with other methods.

SSD Model structure:

The first layer uses the layer in the image classification model, called the Base network, on which to add some auxiliary structures:

1. Mult-scale feature map for detection

After the base network, add some convolutional layers, which are gradually decreasing in size to allow multiscale predictions

2. convolutional Predictors for Detection

Each newly added layer can be predicted using a series of convolution cores. For a feature layer of size m*n, p channel, use 3*3 convolution kernel for prediction, predict a value at a certain position, the value can be a score of a category, or the offset from the default bounding boxes, and will produce a value at each location of the image. As shown in 2.

3. Default boxes and aspect ratio

The K box is predicted at each location in the feature map. For each box, predict the C category score, and the 4 offset values relative to the default bounding box, so that (c+4) *k a predictor will be generated (C+4) *k*m*n a predictive value on the M*n feature map. Here, the default bounding box is similar to the anchors,1 shown in FASTERRCNN.

The personal feeling SSD model is very similar to the RPN in faster rcnn. The Dafault bounding box in SSD is similar to anchor in RPN, but SSDs consider different scales in different feature layers, and RPN consider different scales in a feature layer.

SSD Model Training:

1. Matching strategy

Match each Groundtruth box to the defalult box with the maximum jaccard overlap so that each Groundtruth has a corresponding default box, and each Defalut box is paired with any ground truth, as long as the Jaccard overlap is greater than a certain threshold, this article takes 0.5, so that a groundtruth box may correspond to more than one default box.

Calculation of Jaccard overlap:

2. Training Objective

Let is an indicator for matching the i-th default box to the J-th Ground Truth box of category p.

The loss function is calculated similar to the loss function in fast rcnn, and the total loss function is the weighted sum of localization loss (LOC) and Confidence Loss (conf), as follows:

Confidence loss:

Localization loss (LOC):

Among them, (GCX, Gcy, GW, GH) means Groundtruth box, (DCX, Dcy, DW, DH) represents the default box, (LCX, LCY, LW, LH) to indicate the offset of the predicted box relative to the default box.

3. Choosing scales and aspect ratios for default boxes

In order to deal with objects of different scales, some articles, such as: Overfeat, deal with images of different sizes, and then synthesize the results. In fact, using the same network, the feature map on different layers can achieve the same effect. Image segmentation algorithm FCN shows that using low-level feature maps can improve the segmentation effect, because the lower layer retains more detail information of the image. Therefore, this paper uses lower feature map, upper feature map to predict.

In general, the different layers of CNN have different feelings of the wild. However, in an SSD structure, the default box does not need to correspond to each layer of the sensing field, and a particular feature map is responsible for dealing with objects of a particular scale in the image. On each feature map, the scale of the default box is calculated as follows:


wherein, smin = 0.2,smax = 0.9

The default box's aspect ratios are: {1, 2, 3,1/2,1/3}, for aspect ratio = 1, add an additional default box, the size of the box.

For each default box, the width, height, and center points are calculated as follows:

4. Hard negative mining

After matching, many default boxes are negative samples, which will result in a positive sample, negative sample imbalance, training difficult to converge. Therefore, the paper sorts the negative samples according to the confidence level, selects the highest ones, and guarantees that the proportion of negative samples and positive samples is 3:1.

5. Data Augmentation

In order to make the model more robust to the target scale and size, the paper makes data augmentation for the training image. Each training image is randomly generated by the following methods:

1) Use the original image

2) sampling a path, with the target of the minimum Jaccard overlap 0.1, 0.3, 0.5, 0.7, 0.9 (this specific how to do??? )

3) randomly sampling a path

The sampled path, whose size is the original image of [0.1, 1],aspect ratio between 1/2 and 2. When the center of the Groundtruth Box is in the sampled path, the overlapping parts are preserved. After the above sampling, each sample is pathresize to a fixed size and flipped horizontally with a probability of 0.5.

Reference Blog: http://blog.csdn.net/smf0504/article/details/52745070

Target detection algorithm based on deep learning: a common target detection algorithm for ssd--

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.