widness commited on
Commit
0f8b731
1 Parent(s): 58a3f69

Update ctrnet_infer.py

Browse files
Files changed (1) hide show
  1. ctrnet_infer.py +2 -4
ctrnet_infer.py CHANGED
@@ -148,14 +148,12 @@ class CTRNetInfer():
148
 
149
  def __call__(self, ori_img):
150
  ori_img_shape = ori_img.shape[:2]
151
- bboxes = self.text_det(ori_img)[0].astype(np.int64)
152
 
153
  # resize img 到512x512
154
  resize_img = cv2.resize(ori_img, self.input_shape,
155
  interpolation=cv2.INTER_LINEAR)
156
- resize_bboxes = self.get_resized_points(bboxes,
157
- ori_img_shape,
158
- self.input_shape)
159
 
160
  img, structure_im, gt_text, soft_mask = self.dataset(
161
  resize_img, resize_bboxes)
 
148
 
149
  def __call__(self, ori_img):
150
  ori_img_shape = ori_img.shape[:2]
151
+ # bboxes = self.text_det(ori_img)[0].astype(np.int64)
152
 
153
  # resize img 到512x512
154
  resize_img = cv2.resize(ori_img, self.input_shape,
155
  interpolation=cv2.INTER_LINEAR)
156
+ resize_bboxes = self.text_det(resize_img)[0].astype(np.int64)
 
 
157
 
158
  img, structure_im, gt_text, soft_mask = self.dataset(
159
  resize_img, resize_bboxes)