Closed anofryev closed 2 years ago
did you check that all your images have the same height?
did you check that all your images have the same height?
Yes, i resized all my images to 128 pixels height
can't see your notebook, did you set fixed_input_height: 128
in the config
can't see your notebook, did you set
fixed_input_height: 128
in the config
model config:
syms: /content/kzh/syms_ctc.txt
save_model: true
adaptive_pooling: avgpool-16
fixed_input_height: 128
common:
model_filename: model_h128
crnn:
cnn_activation: [LeakyReLU,LeakyReLU,LeakyReLU,LeakyReLU,LeakyReLU]
cnn_batchnorm: [false,false,false,false,false]
cnn_dilation: [1,1,1,1,1]
cnn_dropout: [0,0,0,0,0]
cnn_kernel_size: [3,3,3,3,3]
cnn_num_features: [16,32,48,64,80]
cnn_poolsize: [2,2,2,0,0]
cnn_stride: [1,1,1,1,1]
rnn_layers: 5
logging:
filepath: /content/kzh/model.log
overwrite: true
to_stderr_level: INFO
train config:
img_dirs: [/content/kzh/imgs/PYLAIA_PREPARED]
syms: /content/kzh/syms_ctc.txt
tr_txt_table: /content/kzh/tr.txt
va_txt_table: /content/kzh/va.txt
common:
model_filename: model_h128
logging:
filepath: train.log
to_stderr_level: INFO
overwrite: true
optimizer:
learning_rate: 0.0003
name: RMSProp
scheduler:
active: false
monitor: va_cer
patience: 10
data:
batch_size: 10
train:
early_stopping_patience: 20
trainer:
accelerator: null
gpus: 1
weights_summary: full
I opened colab notebook
hey that looks like my notebook from here :) https://github.com/DIGI-VUB/HTR-tests
I would doublecheck your image dimensions with following R code and see if all images have the provided dimensions of height 128
library(magick)
x <- list.files("/content/kzh/imgs/PYLAIA_PREPARED", recursive = TRUE, full.names = TRUE)
lapply(x, FUN = function(path) image_info(image_read(path)))
error is coming from https://github.com/jpuigcerver/PyLaia/blob/1b2e864247f1bfb8d95ac1910de9c52df71c017a/laia/nn/image_pooling_sequencer.py#L53 clearly you have 2 images which do not have 128 pixels height
error is coming from
clearly you have 2 images which do not have 128 pixels height
Yes, that was the problem, thanks. There were several imgs with height of 127 pixels.. Sorry for stupid issue, guys.
I get an error while running script "pylaia-htr-train-ctc ". Here is log:
Whole script in colab notebook: https://colab.research.google.com/drive/1Pxd_rzZ50LQhm0ZWrHwfiNcnqnXYdvC1?usp=sharing Please, help!