improve accuracy
we dont need 3 channels for manga, and in my tests the accuracy was greatly improved by lowering the number of channels to only two (maybe B&W) this can be related to the fact that some files in the model folder do mention that only two channels are supposed to be used.
This commit is contained in:
parent
6ac9d6e8d7
commit
f956324616
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ 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] * 3, [1 / 255.0] * 3
|
||||
mean_vals, norm_vals = [0.5] * 2, [1 / 255.0] * 2
|
||||
mat_in.substract_mean_normalize(mean_vals, norm_vals)
|
||||
return mat_in
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue