jpuigcerver/Laia

A Problem about image distortion

Marcovaldong opened this issue · 2 comments

Hi, @jpuigcerver

I am reproducing your work by PyTorch (it is more scalable for me to do more base on your work).

In my experiment, without BN and image distortion, the cer on validation set is 5.45% and the cer on test set is 8.66%. This result is near your baseline result. Now I am trying to add BN into the model and add image distortion to image preprocessing.

My problem is how can I use the same parameter of image distortion. In my opinion, I can implment the affine transformation and morphological operation by opencv-python. But I don't know how to use your parameters. Can you help me?

First of all, apologies for the late reply.

You can find the newer version of Laia, ported to PyTorch, in http://github.com/jpuigcerver/PyLaia.

In fact, you can find scripts to reproduce the results from my paper (IAM database, no language model): https://github.com/jpuigcerver/PyLaia/tree/refactor_kws_egs_master/egs/iam-htr

The parameterisation that I used was a little bit tricky, and I actually changed it in PyLaia, for something simpler. In any case, I'm happy to explain any detail if you have a more concrete question.

@jpuigcerver Thanks for your reply, I have rewrite your distortion code by numpy and opencv, the cer of my experiment is 6.48%, which higher than your result. I'll check the difference of my reproduction and your PyLaia. Thank you again.