diff --git a/ppdet/data/transform/operators.py b/ppdet/data/transform/operators.py index 932c7971f3551ad432b0aa893f6c398b12b7d4bb..fbb1aec954c13bb7cbc388bcd893e43de6037320 100644 --- a/ppdet/data/transform/operators.py +++ b/ppdet/data/transform/operators.py @@ -634,7 +634,7 @@ class Resize(BaseOperator): def apply_segm(self, segms, im_size, scale): def _resize_poly(poly, im_scale_x, im_scale_y): - resized_poly = np.array(poly) + resized_poly = np.array(poly).astype('float32') resized_poly[0::2] *= im_scale_x resized_poly[1::2] *= im_scale_y return resized_poly.tolist()