Quillbolt / stn-crnn

ocr
2 stars 0 forks source link

兄弟,在数据集上进行了验证没?stn加与不加的性能对比 #1

Open ReverseSystem001 opened 2 years ago

ReverseSystem001 commented 2 years ago

兄弟,在数据集上进行了验证没?stn加与不加的性能对比,麻烦告诉一下吧

Quillbolt commented 2 years ago

When working on this project, I got limited by a very small dataset (around 200-300 samples) so I tried a heavy generated dataset to train the model on (70 - 85%) with varying results. The best result I got is 0.9 for text detection and 0.65 for text recognition

ReverseSystem001 commented 2 years ago

恩恩,我这边对stn进行随机初始化,crnn加载预训练模型,训练到3个epoch的时候,loss从1直接升到了74. 你训练的时候加载预训练模型了吗?

Quillbolt commented 2 years ago

I think my loss function is coded in a very bad way to fit the dataset and device I was running(GTX 960) and also try to have it similar to warp-ctc-loss. The vanilla pytorch ctc loss work better in most case. The pre-trained model from https://github.com/meijieru/crnn.pytorch is what I go for as baseline CRNN

ReverseSystem001 commented 2 years ago

I think my loss function is coded in a very bad way to fit the dataset and device I was running(GTX 960) and also try to have it similar to warp-ctc-loss. The vanilla pytorch ctc loss work better in most case. The pre-trained model from https://github.com/meijieru/crnn.pytorch is what I go for as baseline CRNN

After adding STN, the STN+CRNN+CTC training process does not converge after 2 epoch. as i said below. During the training, loss rose directly from 1 to 74. Have you ever encountered this situation during training

Quillbolt commented 2 years ago

Yes, I encounter it during training too and here is the link to the problem https://discuss.pytorch.org/t/proper-way-to-use-torch-nn-ctcloss/28909 It is easy for the model output to become the same tensor with ctc_loss