kaixkhazaki
commited on
Upload folder using huggingface_hub
Browse files- README.md +34 -0
- config.json +39 -0
- label_mapping.pt +3 -0
- model.safetensors +3 -0
- preprocessor_config.json +23 -0
README.md
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# ViT(google/vit-base-patch16-224-in21k) finetuned on document classifaction task over DocLayNet-base dataset
|
3 |
+
|
4 |
+
## Model description
|
5 |
+
|
6 |
+
ViT(google/vit-base-patch16-224-in21k) finetuned on document classification
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
## Training data
|
11 |
+
DocLayNet-base
|
12 |
+
https://huggingface.co/datasets/pierreguillou/DocLayNet-base
|
13 |
+
|
14 |
+
## Training procedure
|
15 |
+
|
16 |
+
|
17 |
+
hyperparameters:
|
18 |
+
|
19 |
+
{
|
20 |
+
'batch_size': 64,
|
21 |
+
'num_epochs': 20,
|
22 |
+
'learning_rate': 1e-4,
|
23 |
+
'weight_decay': 0.05,
|
24 |
+
'warmup_ratio': 0.2,
|
25 |
+
'gradient_clip': 0.1,
|
26 |
+
'dropout_rate': 0.1,
|
27 |
+
'label_smoothing': 0.1
|
28 |
+
'optmizer': 'AdamW'
|
29 |
+
}
|
30 |
+
## Evaluation results
|
31 |
+
Test Loss: 0.8622, Test Acc: 81.36%
|
32 |
+
|
33 |
+
## Usage
|
34 |
+
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "facebook/deit-base-distilled-patch16-224",
|
3 |
+
"architectures": [
|
4 |
+
"DeiTForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"encoder_stride": 16,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.0,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": "LABEL_0",
|
13 |
+
"1": "LABEL_1",
|
14 |
+
"2": "LABEL_2",
|
15 |
+
"3": "LABEL_3",
|
16 |
+
"4": "LABEL_4",
|
17 |
+
"5": "LABEL_5"
|
18 |
+
},
|
19 |
+
"image_size": 224,
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"LABEL_0": 0,
|
24 |
+
"LABEL_1": 1,
|
25 |
+
"LABEL_2": 2,
|
26 |
+
"LABEL_3": 3,
|
27 |
+
"LABEL_4": 4,
|
28 |
+
"LABEL_5": 5
|
29 |
+
},
|
30 |
+
"layer_norm_eps": 1e-12,
|
31 |
+
"model_type": "deit",
|
32 |
+
"num_attention_heads": 12,
|
33 |
+
"num_channels": 3,
|
34 |
+
"num_hidden_layers": 12,
|
35 |
+
"patch_size": 16,
|
36 |
+
"qkv_bias": true,
|
37 |
+
"torch_dtype": "float32",
|
38 |
+
"transformers_version": "4.47.1"
|
39 |
+
}
|
label_mapping.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a6201f009a26f4dc3d7b56ce2a11d57a6a6d6638f25b09c8fe0cff82d282a2a
|
3 |
+
size 1016
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7f82df7a54e6ad93368486223f48132be405e1275add362f0ae58a549b9ea75f
|
3 |
+
size 343242720
|
preprocessor_config.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_convert_rgb": null,
|
3 |
+
"do_normalize": true,
|
4 |
+
"do_rescale": true,
|
5 |
+
"do_resize": true,
|
6 |
+
"image_mean": [
|
7 |
+
0.5,
|
8 |
+
0.5,
|
9 |
+
0.5
|
10 |
+
],
|
11 |
+
"image_processor_type": "ViTImageProcessor",
|
12 |
+
"image_std": [
|
13 |
+
0.5,
|
14 |
+
0.5,
|
15 |
+
0.5
|
16 |
+
],
|
17 |
+
"resample": 2,
|
18 |
+
"rescale_factor": 0.00392156862745098,
|
19 |
+
"size": {
|
20 |
+
"height": 224,
|
21 |
+
"width": 224
|
22 |
+
}
|
23 |
+
}
|