logo
Browse Source

remove unused ipdb dependencies.

Signed-off-by: wxywb <xy.wang@zilliz.com>
main
wxywb 2 years ago
parent
commit
1c89a8d930
  1. 13
      detector/faster_rcnn.py
  2. 16
      detector/rpn.py

13
detector/faster_rcnn.py

@ -1,5 +1,4 @@
import pickle import pickle
import ipdb
import torch import torch
import numpy as np import numpy as np
import cv2 import cv2
@ -464,15 +463,3 @@ def process_img(img):
im = cv2.resize(img, None, None, fx=im_scale, fy=im_scale, interpolation=cv2.INTER_LINEAR) im = cv2.resize(img, None, None, fx=im_scale, fy=im_scale, interpolation=cv2.INTER_LINEAR)
return im, np.array([im.shape[0], im.shape[1], im_scale]) return im, np.array([im.shape[0], im.shape[1], im_scale])
#img = cv2.imread('img2.jpg')
##print(img)
#ipdb.set_trace()
#shape = process_img(img)
#
#net = Net()
#net.load_weights_from_pkl(data2)
#net.eval()
#with torch.no_grad():
# output = net(img)
#ipdb.set_trace()
#print(residual)

16
detector/rpn.py

@ -118,19 +118,3 @@ def _filter_boxes(boxes, min_size):
keep = np.where((ws >= min_size) & (hs >= min_size))[0] keep = np.where((ws >= min_size) & (hs >= min_size))[0]
return keep return keep
#if __name__ == '__main__':
# rpn_cls_prob_reshape = data_kv['rpn_cls_prob_reshape']
# rpn_bbox_pred = data_kv['rpn_bbox_pred']
#
# rpn = RegionProposalNetwork(pre_nms_topN = 6000, post_nms_topN = 300, nms_thresh = 0.7, min_size = 16, anchor_scales = (4, 8, 16, 32), feat_stride=16)
# im_size = np.array([600. , 600. , 2.6785715])
# ipdb.set_trace()
# rois = rpn.forward(rpn_cls_prob_reshape, rpn_bbox_pred, im_size)
#
# outputs = data_kv['res4b22']
# feats = torchvision.ops.roi_pool(outputs,rois, output_size=[14,14], spatial_scale=0.0625)
#
# print(rpn_cls_prob_reshape.shape, rpn_bbox_pred.shape)
# print(rpn)
# print('main')
#

Loading…
Cancel
Save