models icon indicating copy to clipboard operation
models copied to clipboard

Preprocessing for Age and Gender Classification

Open korney3 opened this issue 2 years ago • 0 comments

Ask a Question

What preprocessing should be done with model input?

Question

In README for GoogleNet input image's "mean values are 104, 117, 123" and input tensor "converted to BGR format". However in example code the image is converted to RGB format and mean values array is substracted from input tensor (like image should initially have such mean value and for model input it should have zero mean value).

I couldn't find the step-by-step preprocessing description in original article, so the question is how exactly input should be processed?

Further information

Data Preprocessing

Is this issue related to a specific model?
GoogleNet

Notes

First of all thank you for the work!

I tried different preprocessing ways of example images:

  1. Like in code example
  2. In order to really create image with mean 104, 117, 123 I performed following operation image_mean_new = np.array([104, 117, 123]); image_mean = np.mean(image, axis = (0,1)); image = image - image_mean + image_mean_new

However in both case model demonstrated poor performance :( Will be happy to find the right way to process model inputs.

korney3 avatar Jan 02 '22 23:01 korney3