We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It cost me two days to solve the error and i almost try every solutions on the network. Luckily, it work.
Change the code of bbox_decode() function in bbox_transform.py as follows:
bbox_decode()
bbox_transform.py
`def bbox_decode(rois, bbox_pred, batch_size, classes, im_info, training): rois_ = rois.detach() boxes = rois_[:, :, 1:5]
if cfg.TEST.BBOX_REG: # Apply bounding-box regression deltas box_deltas = bbox_pred.data if cfg.TRAIN.BBOX_NORMALIZE_TARGETS_PRECOMPUTED: # Optionally normalize targets by a precomputed mean and stdev if training: box_deltas = box_deltas.view(-1, 4) * torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_STDS).cuda() \ + torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_MEANS).cuda() box_deltas = box_deltas.view(batch_size, -1, 4) else: box_deltas = box_deltas.view(-1, 4) * torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_STDS).cuda() \ + torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_MEANS).cuda() box_deltas = box_deltas.view(batch_size, -1, 4 * classes) pred_boxes = bbox_transform_inv(boxes, box_deltas, batch_size) pred_boxes = clip_boxes(pred_boxes, im_info, batch_size) else: # Simply repeat the boxes, once for each class pred_boxes = boxes pred_boxes = pred_boxes.view(batch_size, -1, 4) ret_boxes = pred_boxes.new(pred_boxes.size(0), pred_boxes.size(1), pred_boxes.size(2)+1) ret_boxes[:, :, 1:pred_boxes.size(2) + 1] = pred_boxes for b in range(batch_size): ret_boxes[b, :, 0] = b # if not training: # pred_boxes.view(batch_size, -1, 4 * classes) return ret_boxes`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It cost me two days to solve the error and i almost try every solutions on the network. Luckily, it work.
Change the code of
bbox_decode()
function inbbox_transform.py
as follows:`def bbox_decode(rois, bbox_pred, batch_size, classes, im_info, training):
rois_ = rois.detach()
boxes = rois_[:, :, 1:5]
The text was updated successfully, but these errors were encountered: