Skip to content

trouble using OCRDataset #151

Answered by arxyzan
kghezelbash asked this question in Q&A
Feb 17, 2024 · 5 comments · 20 replies
Discussion options

You must be logged in to vote

Hello @kghezelbash,
To make it more clear, if you want to have your own class to be able to train your model using Hezar, you have to provide a regular PyTorch Dataset subclass. Hezar has its own dataset classes for casual tasks like OCR, image captioning, text classification, etc. There is no force to only use those classes, they're just there to make it easier for you. If your dataset is so different or need a lot of customizations, you can easily write your own dataset class.

You can use this template as an example:

from hezar.models import CRNNImage2TextConfig, CRNNImage2Text
from hezar.preprocessors import ImageProcessor
from hezar.trainer import Trainer, TrainerConfig

from hezar.data 

Replies: 5 comments 20 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by kghezelbash
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kghezelbash
Comment options

Comment options

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

@arxyzan
Comment options

@kghezelbash
Comment options

@arxyzan
Comment options

@arxyzan
Comment options

Comment options

You must be logged in to vote
14 replies
@arxyzan
Comment options

@kghezelbash
Comment options

@arxyzan
Comment options

@kghezelbash
Comment options

@arxyzan
Comment options

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