
debug: False
v3: False
# common 
device: 'cpu'       # 'cpu' / 'cuda:0' / 'cuda:1'  / 'cuda'

#dataset
train_dir: /mnt/ssd1T/hoanglv/Projects/KIE/DATA/train_with_vnpt
val_dir: /mnt/ssd1T/hoanglv/Projects/KIE/DATA/test
slice_interval: 75
postprocess_type: invoice_postprocess
classes: [
    # id invoice
    'no_key',    # số hóa đơn
    'no_value', 
    'form_key',    # mẫu số hóa đơn
    'form_value', 
    'serial_key',     # số kí hiệu hoá đơn
    'serial_value', 
    'date', 

    # seller info
    'seller_company_name_key', 
    'seller_company_name_value', 
    'seller_tax_code_key', 
    'seller_tax_code_value', 
    'seller_address_value',
    'seller_address_key', 
    'seller_mobile_key',
    'seller_mobile_value',
    
    # buyer info
    'buyer_name_key',
    'buyer_name_value',
    'buyer_company_name_value',
    'buyer_company_name_key',
    'buyer_tax_code_key',
    'buyer_tax_code_value',
    'buyer_address_key', 
    'buyer_address_value',
    'buyer_mobile_key',
    'buyer_mobile_value',

    # money info
    'VAT_amount_key', 
    'VAT_amount_value', 
    'total_key', 
    'total_value', 
    'total_in_words_key', 
    'total_in_words_value',
    
    'other', 
]
sampling: true            # sampling window - fix long document (larger than 512 token)

#model 
img_size: 224            # fixed
max_seq_length: 512        # fixed
max_num_words: 150
tokenizer_weights: "/mnt/ssd1T/hoanglv/Projects/KIE/sdsvkie/microsoft/microsoft/layoutxlm-base"      # fixed
weights: "/mnt/ssd1T/hoanglv/Projects/KIE/sdsvkie/microsoft/microsoft/layoutxlm-base"

# opt + scheduler
batch_size: 8
epochs: 100
lr: 5.0e-6
shuffle: True
num_workers: 4
scheduler: False                        #  False or  "linear" / "cosine" / "cosine_with_restarts" /  "polynomial" / "constant" /  "constant_with_warmup" / "inverse_sqrt"
save_dir: workdirs/invoice/exp1
save_weight_interval: 10
eval_delay: 0
wandb: null 

# inference
inference_weights: null 
text_det: yolox-s-general-text-pretrain-20221226
text_reg: satrn-lite-general-pretrain-20230106

