@@ -127,8 +127,8 @@ def assign_anchor_fpn(self,
127127 if gt_boxes .size > 0 :
128128 # overlap between the anchors and the gt boxes
129129 # overlaps (ex, gt)
130- overlaps = bbox_overlaps (anchors .astype (np .float ),
131- gt_boxes .astype (np .float ))
130+ overlaps = bbox_overlaps (anchors .astype (np .float32 ),
131+ gt_boxes .astype (np .float32 ))
132132 argmax_overlaps = overlaps .argmax (axis = 1 )
133133 #print('AAA', argmax_overlaps.shape)
134134 max_overlaps = overlaps [np .arange (num_anchors ), argmax_overlaps ]
@@ -344,13 +344,13 @@ def forward(self, is_train, req, in_data, out_data, aux):
344344 assert anchors_t1 .shape [0 ] == self .ori_anchors .shape [0 ]
345345
346346 #for i in range(_gt_boxes.shape[0]):
347- # box = _gt_boxes[i].astype(np.int )
347+ # box = _gt_boxes[i].astype(np.int32 )
348348 # print('%d: gt%d'%(self.nbatch, i), box)
349349 # #color = (0,0,255)
350350 # #cv2.rectangle(img, (box[0], box[1]), (box[2], box[3]), color, 2)
351351 #for i in range(anchors_t1.shape[0]):
352- # box1 = self.ori_anchors[i].astype(np.int )
353- # box2 = anchors_t1[i].astype(np.int )
352+ # box1 = self.ori_anchors[i].astype(np.int32 )
353+ # box2 = anchors_t1[i].astype(np.int32 )
354354 # print('%d %d: anchorscompare %d'%(self.nbatch, self.stride, i), box1, box2)
355355 #color = (255,255,0)
356356 #cv2.rectangle(img, (box[0], box[1]), (box[2], box[3]), color, 2)
0 commit comments