correct values

This commit is contained in:
千住柱間 2025-04-21 03:44:08 +00:00
commit e0852ccbf1

View file

@ -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