File size: 905 Bytes
4c64705
 
 
 
 
 
 
 
bc39774
4c64705
 
 
7b7f574
4c64705
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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