From 1c89a8d9307f6ee5c7ce712ef4137c0aede75dc4 Mon Sep 17 00:00:00 2001 From: wxywb Date: Mon, 20 Jun 2022 16:07:07 +0800 Subject: [PATCH] remove unused ipdb dependencies. Signed-off-by: wxywb --- detector/faster_rcnn.py | 13 ------------- detector/rpn.py | 16 ---------------- 2 files changed, 29 deletions(-) diff --git a/detector/faster_rcnn.py b/detector/faster_rcnn.py index dbfc060..ecdbcb5 100644 --- a/detector/faster_rcnn.py +++ b/detector/faster_rcnn.py @@ -1,5 +1,4 @@ import pickle -import ipdb import torch import numpy as np 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) 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) diff --git a/detector/rpn.py b/detector/rpn.py index cc46bca..428e7c3 100644 --- a/detector/rpn.py +++ b/detector/rpn.py @@ -118,19 +118,3 @@ def _filter_boxes(boxes, min_size): keep = np.where((ws >= min_size) & (hs >= min_size))[0] 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') -#