Skip to content

Commit 28b1c9d

Browse files
committed
replace np.math with math
1 parent c5893b1 commit 28b1c9d

File tree

1 file changed

+4
-3
lines changed
  • tools/accuracy_checker/accuracy_checker/preprocessor

1 file changed

+4
-3
lines changed

tools/accuracy_checker/accuracy_checker/preprocessor/crop.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""
1616

1717
import cv2
18+
import math
1819
import numpy as np
1920
from PIL import Image
2021

@@ -741,9 +742,9 @@ def crop(self, img, center, scale):
741742
height, width = img.shape[:2]
742743
sf = scale * 200.0 / self.dst_width
743744
if sf >= 2:
744-
new_size = int(np.math.floor(max(height, width) / sf))
745-
new_height = int(np.math.floor(height / sf))
746-
new_width = int(np.math.floor(width / sf))
745+
new_size = int(math.floor(max(height, width) / sf))
746+
new_height = int(math.floor(height / sf))
747+
new_width = int(math.floor(width / sf))
747748
if new_size < 2:
748749
return (
749750
np.zeros((self.dst_width, self.dst_height, img.shape[2]), dtype=np.float32) if len(img.shape) > 2

0 commit comments

Comments
 (0)