bgshih / crnn

Convolutional Recurrent Neural Network (CRNN) for image-based sequence recognition.
MIT License
2.05k stars 550 forks source link

Preprocessing of Training Images #63

Open rayush7 opened 7 years ago

rayush7 commented 7 years ago

Hi @bgshih

Is subtracting the mean and dividing by the standard deviation important preprocessing step in CRNN?

bgshih commented 7 years ago

@rayush7 I guess so. Unnormalized data will probably result in divergence at the beginning of training.

rayush7 commented 7 years ago

@bgshih Could you please explain whether you used raw images from vgg synthetic dataset as an input to the crnn model or normalized them before training crnn on them?

northeastsquare commented 6 years ago

@rayush7 input original image , no need to normalize. in config.lua: local model = nn.Sequential() model:add(nn.Copy('torch.ByteTensor', 'torch.CudaTensor', false, true)) model:add(nn.AddConstant(-128.0)) model:add(nn.MulConstant(1.0 / 128))