Skip to content

training the CRNNImage2Text model #149

Answered by arxyzan
kghezelbash asked this question in Q&A
Discussion options

You must be logged in to vote

@kghezelbash Got it, you're only creating a dataset from raw inputs. But the correct way to do it is to firstly, transform the images in the dataset which includes resizing, normalization, scaling, etc and converting to torch.tensor and that is your pixel_values. Secondly, you have to also construct your label tensors which would be your labels. You can take a look at the code starting from below:

path, text = self.data[index].values()

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@kghezelbash
Comment options

@kghezelbash
Comment options

@arxyzan
Comment options

Answer selected by kghezelbash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants