def getdata(self): indices = self.getindex() im_tensor, im_info = [], [] for index in indices: roi_rec = self._roidb[index] b_im_tensor, b_im_info, _ = get_image(roi_rec, self._short, self._max_size, self._mean, self._std) im_tensor.append(b_im_tensor) im_info.append(b_im_info) im_tensor = mx.nd.array(tensor_vstack(im_tensor, pad=0)) im_info = mx.nd.array(tensor_vstack(im_info, pad=0)) self._data = im_tensor, im_info return self._data
def getdata(self): indices = self.getindex() im_tensor, im_info = [], [] for index in indices: roi_rec = self._roidb[index] b_im_tensor, b_im_info, b_gt_boxes, b_seg = get_image(roi_rec, self._short, self._max_size, self._mean, self._std) im_tensor.append(b_im_tensor) im_info.append(b_im_info) im_tensor = mx.nd.array(tensor_vstack(im_tensor, pad=0)) im_info = mx.nd.array(tensor_vstack(im_info, pad=0)) self._data = im_tensor, im_info return self._data
def getdata(self): indices = self.getindex() im_tensor, im_info, gt_boxes = [], [], [] for index in indices: roi_rec = self._roidb[index] b_im_tensor, b_im_info, b_gt_boxes = get_image( roi_rec, self._short, self._max_size, self._mean, self._std) im_tensor.append(b_im_tensor) im_info.append(b_im_info) gt_boxes.append(b_gt_boxes) im_tensor = mx.nd.array(tensor_vstack(im_tensor, pad=0)) im_info = mx.nd.array(tensor_vstack(im_info, pad=0)) gt_boxes = mx.nd.array(tensor_vstack(gt_boxes, pad=-1)) #print ("gt_boxes_shape=",gt_boxes.shape) self._data = im_tensor, im_info, gt_boxes return self._data
def getdata(self): indices = self.getindex() # short_side = np.floor(np.random.uniform(800, 1025)) im_tensor, im_info, gt_boxes, seg = [], [], [], [] for index in indices: roi_rec = self._roidb[index] b_im_tensor, b_im_info, b_gt_boxes, b_seg = get_image(roi_rec, self._short, self._max_size, self._mean, self._std) im_tensor.append(b_im_tensor) im_info.append(b_im_info) gt_boxes.append(b_gt_boxes) seg.append(b_seg) # print(b_seg) im_tensor = mx.nd.array(tensor_vstack(im_tensor, pad=0)) im_info = mx.nd.array(tensor_vstack(im_info, pad=0)) gt_boxes = mx.nd.array(tensor_vstack(gt_boxes, pad=-1)) seg = mx.nd.array(tensor_vstack(seg, pad=0)) self._data = im_tensor, im_info, gt_boxes, seg return self._data