We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c177492 commit 889d652Copy full SHA for 889d652
models/object_detection_yolox/demo.py
@@ -33,7 +33,7 @@
33
'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush')
34
35
def letterbox(srcimg, target_size=(640, 640)):
36
- padded_img = np.ones((target_size[0], target_size[1], 3)) * 114.0
+ padded_img = np.ones((target_size[0], target_size[1], 3)).astype(np.float32) * 114.0
37
ratio = min(target_size[0] / srcimg.shape[0], target_size[1] / srcimg.shape[1])
38
resized_img = cv.resize(
39
srcimg, (int(srcimg.shape[1] * ratio), int(srcimg.shape[0] * ratio)), interpolation=cv.INTER_LINEAR
0 commit comments