Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to Target Detection Series 2: RCNN training course

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

> > when downloading the e-book here immediately = 0.5, it is considered to be a positive sample, and the rest are negative samples.

At this point, the second step of R-CNN feature extractor can start training, but in the training process, it should be noted that negative samples need to be sampled, because too few positive samples in the training data will lead to extreme imbalance between positive and negative samples. Finally, the feature extractor of a convolution neural network is obtained in this step, and its feature is a 4096-dimensional feature vector.

(3) training the final classifier

Here a separate SVM classifier is trained for each category. There is a trick in this. The training of SVM also needs to select positive and negative samples. The proposer of R-CNN did an experiment to select the optimal IOU threshold, and finally only chose the true rectangle as the positive sample.

Note: the selection of positive and negative samples is more fastidious. Fast R-CNN and Faster R-CNN select positive and negative samples according to the size of IOU. Section 2.2.3 is described in detail.

(4) A regression model is trained for each class to fine-tune the deviation between the position and size of the ROI and the real rectangle, as shown in figure 2-6.

Here is a piece of code that will be used to detect all problems: the calculation of IOU.

Def bboxIOU (bboxA, bboxB):

A_xmin = bboxA [0]

A_ymin = bboxA [1]

A_xmax = bboxA [2]

A_ymax = bboxA [3]

A_width = A_xmax-A_xmin

A_height = A_ymax-A_ymin

B_xmin = bboxB [0]

B_ymin = bboxB [1]

B_xmax = bboxB [2]

B_ymax = bboxB [3]

B_width = B_xmax-B_xmin

B_height = B_ymax-B_ymin

Xmin = min (A_xmin, B_xmin)

Ymin = min (A_ymin, B_ymin)

Xmax = max (A_xmax, B_xmax)

Ymax = max (A_ymax, B_ymax)

A_width_and = (A_width + B_width)-(xmax-xmin) # wide intersection

A_height_and = (A_height + B_height)-(ymax-ymin) # High intersection

If (A_width_and

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report