| class Config: | |
| FeatureExtraction = 'HRNet' # or any other feature extraction method | |
| SequenceModeling = 'DBiLSTM' # or any other sequential model | |
| Prediction = 'CTC' # or 'Attn' | |
| input_channel = 1 # e.g., RGB image has 3 channels | |
| output_channel = 32 # Adjust based on your architecture | |
| hidden_size = 256 # Adjust based on your architecture | |
| num_class = 182 # Number of output classes | |
| device = 'cpu' # or 'cuda' for GPU | |
| batch_max_length = 8 # Maximum sequence length for prediction | |
| # Adam optimizer | |
| adam = False | |
| lr = 0.1 | |
| batch_size = 4 | |
| beta1 = 0.9 | |
| workers = 4 | |
| num_epochs = 5 | |
| rho = 0.95 | |
| eps = 1e-8 | |
| imgH = 32 | |
| imgW = 400 | |
| train_data = 'result/train/' # path to train data | |
| valid_data = 'result/validate/' # path to validation data | |
| saved_model = 'model/' | |
| character ='' | |
| rgb = False | |
| grad_clip = 5 | |