zhaoweicai / mscnn

Caffe implementation of our multi-scale object detection framework
405 stars 211 forks source link

why `width_ / spatial_scale_` in roi_pooling layer? #9

Open zimenglan-sysu-512 opened 8 years ago

zimenglan-sysu-512 commented 8 years ago

```

// clipping roi_start_w = max(roi_start_w,0); roi_start_h = max(roi_start_h,0); int imgwidth = round(width/spatialscale); int imgheight = round(height/spatialscale); roi_end_w = min(img_width-1,roi_end_w); roi_end_h = min(img_height-1,roi_end_h);

here, why `width_ / spatial_scale_`?
zhaoweicai commented 8 years ago

It is a bug. It should be roi_end_w = min(width, roi_end_w). It is identical to the case without clipping. But there is another clipping constraint in lines 67-70. To make sure the others can achieve exactly the same results with the pre-trained models, we just leave this bug unfixed for now.