correct values
This commit is contained in:
parent
1456280e28
commit
e0852ccbf1
1 changed files with 2 additions and 1 deletions
|
|
@ -113,7 +113,8 @@ def preprocess_image(image_path):
|
|||
mat_in = ncnn.Mat.from_pixels_resize(
|
||||
img, ncnn.Mat.PixelType.PIXEL_RGB, img.shape[1], img.shape[0], 224, 224
|
||||
)
|
||||
mean_vals, norm_vals = [0.5] * 4, [1 / 255.0] * 4
|
||||
mean_vals = [0.5, 0.5, 0.5] * 2
|
||||
norm_vals = [1/255, 1/255, 1/255] * 2
|
||||
mat_in.substract_mean_normalize(mean_vals, norm_vals)
|
||||
return mat_in
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue