githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.99k stars 893 forks source link

variable length: resizing vs. padding #55

Closed soldierofhell closed 5 years ago

soldierofhell commented 5 years ago

Hi, Common approach to standarize cropped word images is to resize them to some predefined ratio (height&width). That's fine if the words (=images) are more or less equal length (=have equal ratio). But if length varies we are squeezing and stretching. Probably that's why @githubharald added this kind of augmentation. But I wonder would it be better to rather pad the image with "empty" backgroud to keep the original letter ratio? What do you think folks?

githubharald commented 5 years ago

for some experiments see reference [2] (see README), section 4.2.1.