found perfect parameters 3/3
This commit is contained in:
parent
3f35d90a0b
commit
31bb1eb722
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ def preprocess_image(image_path):
|
|||
gray = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)
|
||||
|
||||
# Convert grayscale to 3-channel RGB by duplicating the gray channel
|
||||
img = adjust_gamma(cv2.cvtColor(gray, cv2.COLOR_GRAY2RGB),gamma=2,alpha=1.5,beta=-0.5) # perfect tunning
|
||||
img = adjust_gamma(cv2.cvtColor(gray, cv2.COLOR_GRAY2RGB),gamma=1.67,alpha=1.67,beta=-6) # perfect tunning
|
||||
mat_in = ncnn.Mat.from_pixels_resize(
|
||||
img, ncnn.Mat.PixelType.PIXEL_RGB, img.shape[1], img.shape[0], 224, 224
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue