mahyarnajibi / fast-rcnn-torch

Fast R-CNN Torch Implementation
MIT License
136 stars 32 forks source link

bug in visualize_detections()? #16

Open askerlee opened 7 years ago

askerlee commented 7 years ago

In GeneralUtils:visualize_detections(), it is supposed to show the regressed bounding box of the most confident class, isn't it?

The actual code seems not to get the bounding box coordinates of the most confident class, but simply pick the first 4 coordinates (corresponding to the first class) in the output:

  local num_boxes = boxes_thresh:size(1)
  local widths  = boxes_thresh[{{},3}] - boxes_thresh[{{},1}]
  local heights = boxes_thresh[{{},4}] - boxes_thresh[{{},2}]

Although in practice, the first class regression results are quite close to the regression results of other classes.