awslabs / handwritten-text-recognition-for-apache-mxnet

This repository lets you train neural networks models for performing end-to-end full-page handwriting recognition using the Apache MXNet deep learning frameworks on the IAM Dataset.
Apache License 2.0
488 stars 189 forks source link

Number of samples equals zero #56

Closed sambbhavgarg closed 3 years ago

sambbhavgarg commented 3 years ago

Hi @jonomon The number of training and testing samples comes out to be zero on running the following code in _2_line_wordsegmentation.ipynb -

train_ds = IAMDataset("form_bb", output_data="bb", output_parse_method=detection_box, train=True)
print("Number of training samples: {}".format(len(train_ds)))

Im working on colab, have included the extracted as well as the .tgz files in dataset/iamdataset. I can't seem to figure out the issue here, could you point me in the right direction?

Thanks, Sambbhav

TRokieG commented 3 years ago

I have the same issue here. I follow #52 and successfully solved the gzip problem, but the length of my data is also 0. Hope somebody could help out here.

sambbhavgarg commented 3 years ago

Hi So I resolved it by putting all the .png files from formsA-D and the other 2 folders in datasets/iamdataset/form.

Idk why this is not mentioned anywhere in the project, though.

Just another note, the SSD model (the block of code right after this one) crashes google colab.

Regards Sambbhav

On Wed, 17 Feb 2021 at 21:24, TRokieG notifications@github.com wrote:

I have the same issue here. I follow #52 https://github.com/awslabs/handwritten-text-recognition-for-apache-mxnet/issues/52 and successfully solved the gzip problem, but the length of my data is also

  1. Hope somebody could help out here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/awslabs/handwritten-text-recognition-for-apache-mxnet/issues/56#issuecomment-780654717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVTEVFWT6NEOYCXD4J7V7LS7PRCRANCNFSM4XUOZ75Q .

jonomon commented 3 years ago

Hi @sambbhavgarg

Could you please raise a PR for the instructions?

Thanks

sambbhavgarg commented 3 years ago

Hi @jonomon For sure.

Also, I don't think training an SSD on the IAM dataset would be a very generalized approach towards Line Seg. In my case, the data looks nothing like the IAM dataset; training an SSD did not give satisfactory results also because the dataset is really small.

At this point, I've completely moved off Machine Learning for the line segmentation problem. I feel this, and HTR, can be done without using NNs if the feature engineering is given more attention.

Any thoughts?

Regards, Sambbhav

sambbhavgarg commented 3 years ago

I have the same issue here. I follow #52 and successfully solved the gzip problem, but the length of my data is also 0. Hope somebody could help out here.

Give me a little while to make a PR and for it to get approved. I'll have to clone the repo and write it again because I kinda deleted it. 😛

jonomon commented 3 years ago

Hi @sambbhavgarg

If you haven't seen it, you can check out the blog posts here and here to describe the word/line segmentation components.