-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
In vit.cpp, within the function vit_image_preprocess_bicubic, he normalization values are currently set to:
const float m3[3] = {123.675f, 116.280f, 103.530f};
const float s3[3] = {58.395f, 57.120f, 57.375f};However, for the model vit_tiny_patch16_384.augreg_in21k_ft_in1k (the one referenced in the README), the expected normalization is mean = (0.5, 0.5, 0.5) and std = (0.5, 0.5, 0.5). When operating on a 0–255 scale, this corresponds to:
const float m3[3] = {127.5f, 127.5f, 127.5f};
const float s3[3] = {127.5f, 127.5f, 127.5f};After changing these values, accuracy improved. I recommend changing it
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels