modify some code format
@@ -64,12 +64,12 @@ class DetOp(Op):
im_scale_y, im_scale_x = self.generate_scale(raw_im)
im = self.img_preprocess(raw_im)
+ im_shape = np.array(list(im.shape[1:])).reshape(-1)
+ scale_factor = np.array([im_scale_y, im_scale_x]).reshape(-1)
imgs.append({
"image": im[np.newaxis, :],
- "im_shape":
- np.array(list(im.shape[1:])).reshape(-1)[np.newaxis, :],
- "scale_factor":
- np.array([im_scale_y, im_scale_x]).reshape(-1)[np.newaxis, :],
+ "im_shape": im_shape[np.newaxis, :],
+ "scale_factor": scale_factor[np.newaxis, :],
})
self.raw_img = raw_imgs
