Raphaël Bournhonesque
commited on
Commit
•
dea426b
1
Parent(s):
b85ef44
add ONNX exports and eval results
Browse files- README.md +137 -16
- eval_results.json +136 -0
- eval_results_agg.json +12 -0
- onnx/config.json +186 -0
- onnx/merges.txt +0 -0
- onnx/model.onnx +3 -0
- onnx/preprocessor_config.json +26 -0
- onnx/special_tokens_map.json +51 -0
- onnx/tokenizer.json +0 -0
- onnx/tokenizer_config.json +87 -0
- onnx/vocab.json +0 -0
README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
---
|
2 |
license: cc-by-nc-sa-4.0
|
|
|
3 |
base_model: microsoft/layoutlmv3-large
|
4 |
tags:
|
5 |
- generated_from_trainer
|
@@ -8,6 +9,8 @@ metrics:
|
|
8 |
- recall
|
9 |
- f1
|
10 |
- accuracy
|
|
|
|
|
11 |
model-index:
|
12 |
- name: nutrition-extractor
|
13 |
results: []
|
@@ -18,23 +21,141 @@ model-index:
|
|
18 |
This model is a fine-tuned version of [microsoft/layoutlmv3-large](https://huggingface.co/microsoft/layoutlmv3-large) on the
|
19 |
[v5 of the nutrient extraction dataset](https://huggingface.co/datasets/openfoodfacts/nutrient-detection-layout).
|
20 |
It achieves the following results on the evaluation set:
|
21 |
-
-
|
22 |
-
-
|
23 |
-
-
|
24 |
-
-
|
25 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
More information needed
|
30 |
-
|
31 |
-
## Intended uses & limitations
|
32 |
-
|
33 |
-
More information needed
|
34 |
-
|
35 |
-
## Training and evaluation data
|
36 |
-
|
37 |
-
More information needed
|
38 |
|
39 |
## Training procedure
|
40 |
|
|
|
1 |
---
|
2 |
license: cc-by-nc-sa-4.0
|
3 |
+
library_name: transformers
|
4 |
base_model: microsoft/layoutlmv3-large
|
5 |
tags:
|
6 |
- generated_from_trainer
|
|
|
9 |
- recall
|
10 |
- f1
|
11 |
- accuracy
|
12 |
+
datasets:
|
13 |
+
- openfoodfacts/nutrient-detection-layout
|
14 |
model-index:
|
15 |
- name: nutrition-extractor
|
16 |
results: []
|
|
|
21 |
This model is a fine-tuned version of [microsoft/layoutlmv3-large](https://huggingface.co/microsoft/layoutlmv3-large) on the
|
22 |
[v5 of the nutrient extraction dataset](https://huggingface.co/datasets/openfoodfacts/nutrient-detection-layout).
|
23 |
It achieves the following results on the evaluation set:
|
24 |
+
- eval_loss: 0.0819
|
25 |
+
- eval_model_preparation_time: 0.0054
|
26 |
+
- eval_ADDED_SUGARS_SERVING_precision: 0.5
|
27 |
+
- eval_ADDED_SUGARS_SERVING_recall: 0.5
|
28 |
+
- eval_ADDED_SUGARS_SERVING_f1: 0.5
|
29 |
+
- eval_ADDED_SUGARS_SERVING_number: 4
|
30 |
+
- eval_CALCIUM_100G_precision: 1.0
|
31 |
+
- eval_CALCIUM_100G_recall: 1.0
|
32 |
+
- eval_CALCIUM_100G_f1: 1.0
|
33 |
+
- eval_CALCIUM_100G_number: 5
|
34 |
+
- eval_CALCIUM_SERVING_precision: 0.75
|
35 |
+
- eval_CALCIUM_SERVING_recall: 0.75
|
36 |
+
- eval_CALCIUM_SERVING_f1: 0.75
|
37 |
+
- eval_CALCIUM_SERVING_number: 4
|
38 |
+
- eval_CARBOHYDRATES_100G_precision: 0.9448
|
39 |
+
- eval_CARBOHYDRATES_100G_recall: 0.9716
|
40 |
+
- eval_CARBOHYDRATES_100G_f1: 0.9580
|
41 |
+
- eval_CARBOHYDRATES_100G_number: 176
|
42 |
+
- eval_CARBOHYDRATES_SERVING_precision: 0.9242
|
43 |
+
- eval_CARBOHYDRATES_SERVING_recall: 0.8841
|
44 |
+
- eval_CARBOHYDRATES_SERVING_f1: 0.9037
|
45 |
+
- eval_CARBOHYDRATES_SERVING_number: 69
|
46 |
+
- eval_CHOLESTEROL_SERVING_precision: 1.0
|
47 |
+
- eval_CHOLESTEROL_SERVING_recall: 1.0
|
48 |
+
- eval_CHOLESTEROL_SERVING_f1: 1.0
|
49 |
+
- eval_CHOLESTEROL_SERVING_number: 7
|
50 |
+
- eval_ENERGY_KCAL_100G_precision: 0.9771
|
51 |
+
- eval_ENERGY_KCAL_100G_recall: 0.9884
|
52 |
+
- eval_ENERGY_KCAL_100G_f1: 0.9828
|
53 |
+
- eval_ENERGY_KCAL_100G_number: 173
|
54 |
+
- eval_ENERGY_KCAL_SERVING_precision: 0.8971
|
55 |
+
- eval_ENERGY_KCAL_SERVING_recall: 0.9385
|
56 |
+
- eval_ENERGY_KCAL_SERVING_f1: 0.9173
|
57 |
+
- eval_ENERGY_KCAL_SERVING_number: 65
|
58 |
+
- eval_ENERGY_KJ_100G_precision: 0.9670
|
59 |
+
- eval_ENERGY_KJ_100G_recall: 0.9617
|
60 |
+
- eval_ENERGY_KJ_100G_f1: 0.9644
|
61 |
+
- eval_ENERGY_KJ_100G_number: 183
|
62 |
+
- eval_ENERGY_KJ_SERVING_precision: 0.9194
|
63 |
+
- eval_ENERGY_KJ_SERVING_recall: 1.0
|
64 |
+
- eval_ENERGY_KJ_SERVING_f1: 0.9580
|
65 |
+
- eval_ENERGY_KJ_SERVING_number: 57
|
66 |
+
- eval_FAT_100G_precision: 0.9611
|
67 |
+
- eval_FAT_100G_recall: 0.9505
|
68 |
+
- eval_FAT_100G_f1: 0.9558
|
69 |
+
- eval_FAT_100G_number: 182
|
70 |
+
- eval_FAT_SERVING_precision: 0.9403
|
71 |
+
- eval_FAT_SERVING_recall: 0.9545
|
72 |
+
- eval_FAT_SERVING_f1: 0.9474
|
73 |
+
- eval_FAT_SERVING_number: 66
|
74 |
+
- eval_FIBER_100G_precision: 0.8966
|
75 |
+
- eval_FIBER_100G_recall: 0.9286
|
76 |
+
- eval_FIBER_100G_f1: 0.9123
|
77 |
+
- eval_FIBER_100G_number: 84
|
78 |
+
- eval_FIBER_SERVING_precision: 0.8654
|
79 |
+
- eval_FIBER_SERVING_recall: 0.9
|
80 |
+
- eval_FIBER_SERVING_f1: 0.8824
|
81 |
+
- eval_FIBER_SERVING_number: 50
|
82 |
+
- eval_IRON_SERVING_precision: 0.0
|
83 |
+
- eval_IRON_SERVING_recall: 0.0
|
84 |
+
- eval_IRON_SERVING_f1: 0.0
|
85 |
+
- eval_IRON_SERVING_number: 2
|
86 |
+
- eval_POTASSIUM_SERVING_precision: 0.8333
|
87 |
+
- eval_POTASSIUM_SERVING_recall: 1.0
|
88 |
+
- eval_POTASSIUM_SERVING_f1: 0.9091
|
89 |
+
- eval_POTASSIUM_SERVING_number: 5
|
90 |
+
- eval_PROTEINS_100G_precision: 0.9492
|
91 |
+
- eval_PROTEINS_100G_recall: 0.96
|
92 |
+
- eval_PROTEINS_100G_f1: 0.9545
|
93 |
+
- eval_PROTEINS_100G_number: 175
|
94 |
+
- eval_PROTEINS_SERVING_precision: 0.9375
|
95 |
+
- eval_PROTEINS_SERVING_recall: 0.9375
|
96 |
+
- eval_PROTEINS_SERVING_f1: 0.9375
|
97 |
+
- eval_PROTEINS_SERVING_number: 64
|
98 |
+
- eval_SALT_100G_precision: 0.9709
|
99 |
+
- eval_SALT_100G_recall: 0.9709
|
100 |
+
- eval_SALT_100G_f1: 0.9709
|
101 |
+
- eval_SALT_100G_number: 172
|
102 |
+
- eval_SALT_SERVING_precision: 0.9057
|
103 |
+
- eval_SALT_SERVING_recall: 0.96
|
104 |
+
- eval_SALT_SERVING_f1: 0.9320
|
105 |
+
- eval_SALT_SERVING_number: 50
|
106 |
+
- eval_SATURATED_FAT_100G_precision: 0.9497
|
107 |
+
- eval_SATURATED_FAT_100G_recall: 0.9659
|
108 |
+
- eval_SATURATED_FAT_100G_f1: 0.9577
|
109 |
+
- eval_SATURATED_FAT_100G_number: 176
|
110 |
+
- eval_SATURATED_FAT_SERVING_precision: 0.9672
|
111 |
+
- eval_SATURATED_FAT_SERVING_recall: 0.9516
|
112 |
+
- eval_SATURATED_FAT_SERVING_f1: 0.9593
|
113 |
+
- eval_SATURATED_FAT_SERVING_number: 62
|
114 |
+
- eval_SERVING_SIZE_precision: 0.9104
|
115 |
+
- eval_SERVING_SIZE_recall: 0.8841
|
116 |
+
- eval_SERVING_SIZE_f1: 0.8971
|
117 |
+
- eval_SERVING_SIZE_number: 69
|
118 |
+
- eval_SODIUM_100G_precision: 0.6667
|
119 |
+
- eval_SODIUM_100G_recall: 0.6667
|
120 |
+
- eval_SODIUM_100G_f1: 0.6667
|
121 |
+
- eval_SODIUM_100G_number: 3
|
122 |
+
- eval_SODIUM_SERVING_precision: 0.9286
|
123 |
+
- eval_SODIUM_SERVING_recall: 0.9286
|
124 |
+
- eval_SODIUM_SERVING_f1: 0.9286
|
125 |
+
- eval_SODIUM_SERVING_number: 14
|
126 |
+
- eval_SUGARS_100G_precision: 0.9368
|
127 |
+
- eval_SUGARS_100G_recall: 0.9477
|
128 |
+
- eval_SUGARS_100G_f1: 0.9422
|
129 |
+
- eval_SUGARS_100G_number: 172
|
130 |
+
- eval_SUGARS_SERVING_precision: 0.8730
|
131 |
+
- eval_SUGARS_SERVING_recall: 0.8594
|
132 |
+
- eval_SUGARS_SERVING_f1: 0.8661
|
133 |
+
- eval_SUGARS_SERVING_number: 64
|
134 |
+
- eval_TRANS_FAT_100G_precision: 0.0
|
135 |
+
- eval_TRANS_FAT_100G_recall: 0.0
|
136 |
+
- eval_TRANS_FAT_100G_f1: 0.0
|
137 |
+
- eval_TRANS_FAT_100G_number: 2
|
138 |
+
- eval_TRANS_FAT_SERVING_precision: 0.7143
|
139 |
+
- eval_TRANS_FAT_SERVING_recall: 1.0
|
140 |
+
- eval_TRANS_FAT_SERVING_f1: 0.8333
|
141 |
+
- eval_TRANS_FAT_SERVING_number: 5
|
142 |
+
- eval_VITAMIN_D_100G_precision: 0.0
|
143 |
+
- eval_VITAMIN_D_100G_recall: 0.0
|
144 |
+
- eval_VITAMIN_D_100G_f1: 0.0
|
145 |
+
- eval_VITAMIN_D_100G_number: 2
|
146 |
+
- eval_VITAMIN_D_SERVING_precision: 1.0
|
147 |
+
- eval_VITAMIN_D_SERVING_recall: 1.0
|
148 |
+
- eval_VITAMIN_D_SERVING_f1: 1.0
|
149 |
+
- eval_VITAMIN_D_SERVING_number: 2
|
150 |
+
- eval_overall_precision: 0.9400
|
151 |
+
- eval_overall_recall: 0.9478
|
152 |
+
- eval_overall_f1: 0.9439
|
153 |
+
- eval_overall_accuracy: 0.9892
|
154 |
+
- eval_runtime: 2159.9991
|
155 |
+
- eval_samples_per_second: 0.093
|
156 |
+
- eval_steps_per_second: 0.012
|
157 |
|
158 |
+
ONNX export can be found in the [onnx](onnx) directory (ONNX opset 19).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
## Training procedure
|
161 |
|
eval_results.json
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eval_ADDED_SUGARS_SERVING_f1": 0.5,
|
3 |
+
"eval_ADDED_SUGARS_SERVING_number": 4,
|
4 |
+
"eval_ADDED_SUGARS_SERVING_precision": 0.5,
|
5 |
+
"eval_ADDED_SUGARS_SERVING_recall": 0.5,
|
6 |
+
"eval_CALCIUM_100G_f1": 1.0,
|
7 |
+
"eval_CALCIUM_100G_number": 5,
|
8 |
+
"eval_CALCIUM_100G_precision": 1.0,
|
9 |
+
"eval_CALCIUM_100G_recall": 1.0,
|
10 |
+
"eval_CALCIUM_SERVING_f1": 0.75,
|
11 |
+
"eval_CALCIUM_SERVING_number": 4,
|
12 |
+
"eval_CALCIUM_SERVING_precision": 0.75,
|
13 |
+
"eval_CALCIUM_SERVING_recall": 0.75,
|
14 |
+
"eval_CARBOHYDRATES_100G_f1": 0.9579831932773109,
|
15 |
+
"eval_CARBOHYDRATES_100G_number": 176,
|
16 |
+
"eval_CARBOHYDRATES_100G_precision": 0.9447513812154696,
|
17 |
+
"eval_CARBOHYDRATES_100G_recall": 0.9715909090909091,
|
18 |
+
"eval_CARBOHYDRATES_SERVING_f1": 0.9037037037037037,
|
19 |
+
"eval_CARBOHYDRATES_SERVING_number": 69,
|
20 |
+
"eval_CARBOHYDRATES_SERVING_precision": 0.9242424242424242,
|
21 |
+
"eval_CARBOHYDRATES_SERVING_recall": 0.8840579710144928,
|
22 |
+
"eval_CHOLESTEROL_SERVING_f1": 1.0,
|
23 |
+
"eval_CHOLESTEROL_SERVING_number": 7,
|
24 |
+
"eval_CHOLESTEROL_SERVING_precision": 1.0,
|
25 |
+
"eval_CHOLESTEROL_SERVING_recall": 1.0,
|
26 |
+
"eval_ENERGY_KCAL_100G_f1": 0.9827586206896551,
|
27 |
+
"eval_ENERGY_KCAL_100G_number": 173,
|
28 |
+
"eval_ENERGY_KCAL_100G_precision": 0.9771428571428571,
|
29 |
+
"eval_ENERGY_KCAL_100G_recall": 0.9884393063583815,
|
30 |
+
"eval_ENERGY_KCAL_SERVING_f1": 0.9172932330827067,
|
31 |
+
"eval_ENERGY_KCAL_SERVING_number": 65,
|
32 |
+
"eval_ENERGY_KCAL_SERVING_precision": 0.8970588235294118,
|
33 |
+
"eval_ENERGY_KCAL_SERVING_recall": 0.9384615384615385,
|
34 |
+
"eval_ENERGY_KJ_100G_f1": 0.9643835616438357,
|
35 |
+
"eval_ENERGY_KJ_100G_number": 183,
|
36 |
+
"eval_ENERGY_KJ_100G_precision": 0.967032967032967,
|
37 |
+
"eval_ENERGY_KJ_100G_recall": 0.9617486338797814,
|
38 |
+
"eval_ENERGY_KJ_SERVING_f1": 0.9579831932773109,
|
39 |
+
"eval_ENERGY_KJ_SERVING_number": 57,
|
40 |
+
"eval_ENERGY_KJ_SERVING_precision": 0.9193548387096774,
|
41 |
+
"eval_ENERGY_KJ_SERVING_recall": 1.0,
|
42 |
+
"eval_FAT_100G_f1": 0.9558011049723757,
|
43 |
+
"eval_FAT_100G_number": 182,
|
44 |
+
"eval_FAT_100G_precision": 0.9611111111111111,
|
45 |
+
"eval_FAT_100G_recall": 0.9505494505494505,
|
46 |
+
"eval_FAT_SERVING_f1": 0.9473684210526316,
|
47 |
+
"eval_FAT_SERVING_number": 66,
|
48 |
+
"eval_FAT_SERVING_precision": 0.9402985074626866,
|
49 |
+
"eval_FAT_SERVING_recall": 0.9545454545454546,
|
50 |
+
"eval_FIBER_100G_f1": 0.912280701754386,
|
51 |
+
"eval_FIBER_100G_number": 84,
|
52 |
+
"eval_FIBER_100G_precision": 0.896551724137931,
|
53 |
+
"eval_FIBER_100G_recall": 0.9285714285714286,
|
54 |
+
"eval_FIBER_SERVING_f1": 0.8823529411764707,
|
55 |
+
"eval_FIBER_SERVING_number": 50,
|
56 |
+
"eval_FIBER_SERVING_precision": 0.8653846153846154,
|
57 |
+
"eval_FIBER_SERVING_recall": 0.9,
|
58 |
+
"eval_IRON_SERVING_f1": 0.0,
|
59 |
+
"eval_IRON_SERVING_number": 2,
|
60 |
+
"eval_IRON_SERVING_precision": 0.0,
|
61 |
+
"eval_IRON_SERVING_recall": 0.0,
|
62 |
+
"eval_POTASSIUM_SERVING_f1": 0.9090909090909091,
|
63 |
+
"eval_POTASSIUM_SERVING_number": 5,
|
64 |
+
"eval_POTASSIUM_SERVING_precision": 0.8333333333333334,
|
65 |
+
"eval_POTASSIUM_SERVING_recall": 1.0,
|
66 |
+
"eval_PROTEINS_100G_f1": 0.9545454545454545,
|
67 |
+
"eval_PROTEINS_100G_number": 175,
|
68 |
+
"eval_PROTEINS_100G_precision": 0.9491525423728814,
|
69 |
+
"eval_PROTEINS_100G_recall": 0.96,
|
70 |
+
"eval_PROTEINS_SERVING_f1": 0.9375,
|
71 |
+
"eval_PROTEINS_SERVING_number": 64,
|
72 |
+
"eval_PROTEINS_SERVING_precision": 0.9375,
|
73 |
+
"eval_PROTEINS_SERVING_recall": 0.9375,
|
74 |
+
"eval_SALT_100G_f1": 0.9709302325581395,
|
75 |
+
"eval_SALT_100G_number": 172,
|
76 |
+
"eval_SALT_100G_precision": 0.9709302325581395,
|
77 |
+
"eval_SALT_100G_recall": 0.9709302325581395,
|
78 |
+
"eval_SALT_SERVING_f1": 0.9320388349514563,
|
79 |
+
"eval_SALT_SERVING_number": 50,
|
80 |
+
"eval_SALT_SERVING_precision": 0.9056603773584906,
|
81 |
+
"eval_SALT_SERVING_recall": 0.96,
|
82 |
+
"eval_SATURATED_FAT_100G_f1": 0.9577464788732395,
|
83 |
+
"eval_SATURATED_FAT_100G_number": 176,
|
84 |
+
"eval_SATURATED_FAT_100G_precision": 0.9497206703910615,
|
85 |
+
"eval_SATURATED_FAT_100G_recall": 0.9659090909090909,
|
86 |
+
"eval_SATURATED_FAT_SERVING_f1": 0.959349593495935,
|
87 |
+
"eval_SATURATED_FAT_SERVING_number": 62,
|
88 |
+
"eval_SATURATED_FAT_SERVING_precision": 0.9672131147540983,
|
89 |
+
"eval_SATURATED_FAT_SERVING_recall": 0.9516129032258065,
|
90 |
+
"eval_SERVING_SIZE_f1": 0.8970588235294118,
|
91 |
+
"eval_SERVING_SIZE_number": 69,
|
92 |
+
"eval_SERVING_SIZE_precision": 0.9104477611940298,
|
93 |
+
"eval_SERVING_SIZE_recall": 0.8840579710144928,
|
94 |
+
"eval_SODIUM_100G_f1": 0.6666666666666666,
|
95 |
+
"eval_SODIUM_100G_number": 3,
|
96 |
+
"eval_SODIUM_100G_precision": 0.6666666666666666,
|
97 |
+
"eval_SODIUM_100G_recall": 0.6666666666666666,
|
98 |
+
"eval_SODIUM_SERVING_f1": 0.9285714285714286,
|
99 |
+
"eval_SODIUM_SERVING_number": 14,
|
100 |
+
"eval_SODIUM_SERVING_precision": 0.9285714285714286,
|
101 |
+
"eval_SODIUM_SERVING_recall": 0.9285714285714286,
|
102 |
+
"eval_SUGARS_100G_f1": 0.9421965317919075,
|
103 |
+
"eval_SUGARS_100G_number": 172,
|
104 |
+
"eval_SUGARS_100G_precision": 0.9367816091954023,
|
105 |
+
"eval_SUGARS_100G_recall": 0.9476744186046512,
|
106 |
+
"eval_SUGARS_SERVING_f1": 0.8661417322834646,
|
107 |
+
"eval_SUGARS_SERVING_number": 64,
|
108 |
+
"eval_SUGARS_SERVING_precision": 0.873015873015873,
|
109 |
+
"eval_SUGARS_SERVING_recall": 0.859375,
|
110 |
+
"eval_TRANS_FAT_100G_f1": 0.0,
|
111 |
+
"eval_TRANS_FAT_100G_number": 2,
|
112 |
+
"eval_TRANS_FAT_100G_precision": 0.0,
|
113 |
+
"eval_TRANS_FAT_100G_recall": 0.0,
|
114 |
+
"eval_TRANS_FAT_SERVING_f1": 0.8333333333333333,
|
115 |
+
"eval_TRANS_FAT_SERVING_number": 5,
|
116 |
+
"eval_TRANS_FAT_SERVING_precision": 0.7142857142857143,
|
117 |
+
"eval_TRANS_FAT_SERVING_recall": 1.0,
|
118 |
+
"eval_VITAMIN_D_100G_f1": 0.0,
|
119 |
+
"eval_VITAMIN_D_100G_number": 2,
|
120 |
+
"eval_VITAMIN_D_100G_precision": 0.0,
|
121 |
+
"eval_VITAMIN_D_100G_recall": 0.0,
|
122 |
+
"eval_VITAMIN_D_SERVING_f1": 1.0,
|
123 |
+
"eval_VITAMIN_D_SERVING_number": 2,
|
124 |
+
"eval_VITAMIN_D_SERVING_precision": 1.0,
|
125 |
+
"eval_VITAMIN_D_SERVING_recall": 1.0,
|
126 |
+
"eval_loss": 0.08192184567451477,
|
127 |
+
"eval_model_preparation_time": 0.0054,
|
128 |
+
"eval_overall_accuracy": 0.9891778387982555,
|
129 |
+
"eval_overall_f1": 0.9438564196962724,
|
130 |
+
"eval_overall_precision": 0.9399633363886343,
|
131 |
+
"eval_overall_recall": 0.9477818853974121,
|
132 |
+
"eval_runtime": 2159.9991,
|
133 |
+
"eval_samples": 200,
|
134 |
+
"eval_samples_per_second": 0.093,
|
135 |
+
"eval_steps_per_second": 0.012
|
136 |
+
}
|
eval_results_agg.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eval_accuracy": 0.9891778387982555,
|
3 |
+
"eval_f1": 0.9438564196962724,
|
4 |
+
"eval_loss": 0.08192184567451477,
|
5 |
+
"eval_model_preparation_time": 0.0031,
|
6 |
+
"eval_precision": 0.9399633363886343,
|
7 |
+
"eval_recall": 0.9477818853974121,
|
8 |
+
"eval_runtime": 2022.0363,
|
9 |
+
"eval_samples": 200,
|
10 |
+
"eval_samples_per_second": 0.099,
|
11 |
+
"eval_steps_per_second": 0.012
|
12 |
+
}
|
onnx/config.json
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "openfoodfacts/nutrition-extractor",
|
3 |
+
"architectures": [
|
4 |
+
"LayoutLMv3ForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"coordinate_size": 171,
|
10 |
+
"eos_token_id": 2,
|
11 |
+
"finetuning_task": "ner",
|
12 |
+
"has_relative_attention_bias": true,
|
13 |
+
"has_spatial_attention_bias": true,
|
14 |
+
"hidden_act": "gelu",
|
15 |
+
"hidden_dropout_prob": 0.1,
|
16 |
+
"hidden_size": 1024,
|
17 |
+
"id2label": {
|
18 |
+
"0": "O",
|
19 |
+
"1": "B-ENERGY_KJ_SERVING",
|
20 |
+
"2": "I-ENERGY_KJ_SERVING",
|
21 |
+
"3": "B-CARBOHYDRATES_100G",
|
22 |
+
"4": "I-CARBOHYDRATES_100G",
|
23 |
+
"5": "B-CHOLESTEROL_SERVING",
|
24 |
+
"6": "I-CHOLESTEROL_SERVING",
|
25 |
+
"7": "B-ENERGY_KCAL_100G",
|
26 |
+
"8": "I-ENERGY_KCAL_100G",
|
27 |
+
"9": "B-SALT_SERVING",
|
28 |
+
"10": "I-SALT_SERVING",
|
29 |
+
"11": "B-SALT_100G",
|
30 |
+
"12": "I-SALT_100G",
|
31 |
+
"13": "B-SERVING_SIZE",
|
32 |
+
"14": "I-SERVING_SIZE",
|
33 |
+
"15": "B-CALCIUM_100G",
|
34 |
+
"16": "I-CALCIUM_100G",
|
35 |
+
"17": "B-SODIUM_SERVING",
|
36 |
+
"18": "I-SODIUM_SERVING",
|
37 |
+
"19": "B-FIBER_100G",
|
38 |
+
"20": "I-FIBER_100G",
|
39 |
+
"21": "B-IRON_SERVING",
|
40 |
+
"22": "I-IRON_SERVING",
|
41 |
+
"23": "B-IRON_100G",
|
42 |
+
"24": "I-IRON_100G",
|
43 |
+
"25": "B-POTASSIUM_100G",
|
44 |
+
"26": "I-POTASSIUM_100G",
|
45 |
+
"27": "B-CALCIUM_SERVING",
|
46 |
+
"28": "I-CALCIUM_SERVING",
|
47 |
+
"29": "B-TRANS_FAT_100G",
|
48 |
+
"30": "I-TRANS_FAT_100G",
|
49 |
+
"31": "B-SATURATED_FAT_100G",
|
50 |
+
"32": "I-SATURATED_FAT_100G",
|
51 |
+
"33": "B-PROTEINS_SERVING",
|
52 |
+
"34": "I-PROTEINS_SERVING",
|
53 |
+
"35": "B-SATURATED_FAT_SERVING",
|
54 |
+
"36": "I-SATURATED_FAT_SERVING",
|
55 |
+
"37": "B-VITAMIN_D_100G",
|
56 |
+
"38": "I-VITAMIN_D_100G",
|
57 |
+
"39": "B-ENERGY_KJ_100G",
|
58 |
+
"40": "I-ENERGY_KJ_100G",
|
59 |
+
"41": "B-FAT_100G",
|
60 |
+
"42": "I-FAT_100G",
|
61 |
+
"43": "B-PROTEINS_100G",
|
62 |
+
"44": "I-PROTEINS_100G",
|
63 |
+
"45": "B-VITAMIN_D_SERVING",
|
64 |
+
"46": "I-VITAMIN_D_SERVING",
|
65 |
+
"47": "B-ADDED_SUGARS_SERVING",
|
66 |
+
"48": "I-ADDED_SUGARS_SERVING",
|
67 |
+
"49": "B-CHOLESTEROL_100G",
|
68 |
+
"50": "I-CHOLESTEROL_100G",
|
69 |
+
"51": "B-SUGARS_100G",
|
70 |
+
"52": "I-SUGARS_100G",
|
71 |
+
"53": "B-CARBOHYDRATES_SERVING",
|
72 |
+
"54": "I-CARBOHYDRATES_SERVING",
|
73 |
+
"55": "B-ADDED_SUGARS_100G",
|
74 |
+
"56": "I-ADDED_SUGARS_100G",
|
75 |
+
"57": "B-SODIUM_100G",
|
76 |
+
"58": "I-SODIUM_100G",
|
77 |
+
"59": "B-FIBER_SERVING",
|
78 |
+
"60": "I-FIBER_SERVING",
|
79 |
+
"61": "B-SUGARS_SERVING",
|
80 |
+
"62": "I-SUGARS_SERVING",
|
81 |
+
"63": "B-ENERGY_KCAL_SERVING",
|
82 |
+
"64": "I-ENERGY_KCAL_SERVING",
|
83 |
+
"65": "B-FAT_SERVING",
|
84 |
+
"66": "I-FAT_SERVING",
|
85 |
+
"67": "B-TRANS_FAT_SERVING",
|
86 |
+
"68": "I-TRANS_FAT_SERVING",
|
87 |
+
"69": "B-POTASSIUM_SERVING",
|
88 |
+
"70": "I-POTASSIUM_SERVING"
|
89 |
+
},
|
90 |
+
"initializer_range": 0.02,
|
91 |
+
"input_size": 224,
|
92 |
+
"intermediate_size": 4096,
|
93 |
+
"label2id": {
|
94 |
+
"B-ADDED_SUGARS_100G": 55,
|
95 |
+
"B-ADDED_SUGARS_SERVING": 47,
|
96 |
+
"B-CALCIUM_100G": 15,
|
97 |
+
"B-CALCIUM_SERVING": 27,
|
98 |
+
"B-CARBOHYDRATES_100G": 3,
|
99 |
+
"B-CARBOHYDRATES_SERVING": 53,
|
100 |
+
"B-CHOLESTEROL_100G": 49,
|
101 |
+
"B-CHOLESTEROL_SERVING": 5,
|
102 |
+
"B-ENERGY_KCAL_100G": 7,
|
103 |
+
"B-ENERGY_KCAL_SERVING": 63,
|
104 |
+
"B-ENERGY_KJ_100G": 39,
|
105 |
+
"B-ENERGY_KJ_SERVING": 1,
|
106 |
+
"B-FAT_100G": 41,
|
107 |
+
"B-FAT_SERVING": 65,
|
108 |
+
"B-FIBER_100G": 19,
|
109 |
+
"B-FIBER_SERVING": 59,
|
110 |
+
"B-IRON_100G": 23,
|
111 |
+
"B-IRON_SERVING": 21,
|
112 |
+
"B-POTASSIUM_100G": 25,
|
113 |
+
"B-POTASSIUM_SERVING": 69,
|
114 |
+
"B-PROTEINS_100G": 43,
|
115 |
+
"B-PROTEINS_SERVING": 33,
|
116 |
+
"B-SALT_100G": 11,
|
117 |
+
"B-SALT_SERVING": 9,
|
118 |
+
"B-SATURATED_FAT_100G": 31,
|
119 |
+
"B-SATURATED_FAT_SERVING": 35,
|
120 |
+
"B-SERVING_SIZE": 13,
|
121 |
+
"B-SODIUM_100G": 57,
|
122 |
+
"B-SODIUM_SERVING": 17,
|
123 |
+
"B-SUGARS_100G": 51,
|
124 |
+
"B-SUGARS_SERVING": 61,
|
125 |
+
"B-TRANS_FAT_100G": 29,
|
126 |
+
"B-TRANS_FAT_SERVING": 67,
|
127 |
+
"B-VITAMIN_D_100G": 37,
|
128 |
+
"B-VITAMIN_D_SERVING": 45,
|
129 |
+
"I-ADDED_SUGARS_100G": 56,
|
130 |
+
"I-ADDED_SUGARS_SERVING": 48,
|
131 |
+
"I-CALCIUM_100G": 16,
|
132 |
+
"I-CALCIUM_SERVING": 28,
|
133 |
+
"I-CARBOHYDRATES_100G": 4,
|
134 |
+
"I-CARBOHYDRATES_SERVING": 54,
|
135 |
+
"I-CHOLESTEROL_100G": 50,
|
136 |
+
"I-CHOLESTEROL_SERVING": 6,
|
137 |
+
"I-ENERGY_KCAL_100G": 8,
|
138 |
+
"I-ENERGY_KCAL_SERVING": 64,
|
139 |
+
"I-ENERGY_KJ_100G": 40,
|
140 |
+
"I-ENERGY_KJ_SERVING": 2,
|
141 |
+
"I-FAT_100G": 42,
|
142 |
+
"I-FAT_SERVING": 66,
|
143 |
+
"I-FIBER_100G": 20,
|
144 |
+
"I-FIBER_SERVING": 60,
|
145 |
+
"I-IRON_100G": 24,
|
146 |
+
"I-IRON_SERVING": 22,
|
147 |
+
"I-POTASSIUM_100G": 26,
|
148 |
+
"I-POTASSIUM_SERVING": 70,
|
149 |
+
"I-PROTEINS_100G": 44,
|
150 |
+
"I-PROTEINS_SERVING": 34,
|
151 |
+
"I-SALT_100G": 12,
|
152 |
+
"I-SALT_SERVING": 10,
|
153 |
+
"I-SATURATED_FAT_100G": 32,
|
154 |
+
"I-SATURATED_FAT_SERVING": 36,
|
155 |
+
"I-SERVING_SIZE": 14,
|
156 |
+
"I-SODIUM_100G": 58,
|
157 |
+
"I-SODIUM_SERVING": 18,
|
158 |
+
"I-SUGARS_100G": 52,
|
159 |
+
"I-SUGARS_SERVING": 62,
|
160 |
+
"I-TRANS_FAT_100G": 30,
|
161 |
+
"I-TRANS_FAT_SERVING": 68,
|
162 |
+
"I-VITAMIN_D_100G": 38,
|
163 |
+
"I-VITAMIN_D_SERVING": 46,
|
164 |
+
"O": 0
|
165 |
+
},
|
166 |
+
"layer_norm_eps": 1e-05,
|
167 |
+
"max_2d_position_embeddings": 1024,
|
168 |
+
"max_position_embeddings": 514,
|
169 |
+
"max_rel_2d_pos": 256,
|
170 |
+
"max_rel_pos": 128,
|
171 |
+
"model_type": "layoutlmv3",
|
172 |
+
"num_attention_heads": 16,
|
173 |
+
"num_channels": 3,
|
174 |
+
"num_hidden_layers": 24,
|
175 |
+
"pad_token_id": 1,
|
176 |
+
"patch_size": 16,
|
177 |
+
"rel_2d_pos_bins": 64,
|
178 |
+
"rel_pos_bins": 32,
|
179 |
+
"second_input_size": 112,
|
180 |
+
"shape_size": 170,
|
181 |
+
"text_embed": true,
|
182 |
+
"transformers_version": "4.44.2",
|
183 |
+
"type_vocab_size": 1,
|
184 |
+
"visual_embed": true,
|
185 |
+
"vocab_size": 50265
|
186 |
+
}
|
onnx/merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
onnx/model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1040867c75862a4343dcb6edcb5941ee3497a4029ee4df15e5d26cf993308ab3
|
3 |
+
size 1429090779
|
onnx/preprocessor_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"apply_ocr": false,
|
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": "LayoutLMv3FeatureExtractor",
|
12 |
+
"image_std": [
|
13 |
+
0.5,
|
14 |
+
0.5,
|
15 |
+
0.5
|
16 |
+
],
|
17 |
+
"ocr_lang": null,
|
18 |
+
"processor_class": "LayoutLMv3Processor",
|
19 |
+
"resample": 2,
|
20 |
+
"rescale_factor": 0.00392156862745098,
|
21 |
+
"size": {
|
22 |
+
"height": 224,
|
23 |
+
"width": 224
|
24 |
+
},
|
25 |
+
"tesseract_config": ""
|
26 |
+
}
|
onnx/special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": true,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
onnx/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
onnx/tokenizer_config.json
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": true,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": true,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"apply_ocr": false,
|
46 |
+
"bos_token": "<s>",
|
47 |
+
"clean_up_tokenization_spaces": true,
|
48 |
+
"cls_token": "<s>",
|
49 |
+
"cls_token_box": [
|
50 |
+
0,
|
51 |
+
0,
|
52 |
+
0,
|
53 |
+
0
|
54 |
+
],
|
55 |
+
"eos_token": "</s>",
|
56 |
+
"errors": "replace",
|
57 |
+
"mask_token": "<mask>",
|
58 |
+
"max_length": 512,
|
59 |
+
"model_max_length": 512,
|
60 |
+
"only_label_first_subword": true,
|
61 |
+
"pad_to_multiple_of": null,
|
62 |
+
"pad_token": "<pad>",
|
63 |
+
"pad_token_box": [
|
64 |
+
0,
|
65 |
+
0,
|
66 |
+
0,
|
67 |
+
0
|
68 |
+
],
|
69 |
+
"pad_token_label": -100,
|
70 |
+
"pad_token_type_id": 0,
|
71 |
+
"padding_side": "right",
|
72 |
+
"processor_class": "LayoutLMv3Processor",
|
73 |
+
"sep_token": "</s>",
|
74 |
+
"sep_token_box": [
|
75 |
+
0,
|
76 |
+
0,
|
77 |
+
0,
|
78 |
+
0
|
79 |
+
],
|
80 |
+
"stride": 0,
|
81 |
+
"tokenizer_class": "LayoutLMv3Tokenizer",
|
82 |
+
"trim_offsets": true,
|
83 |
+
"truncation_side": "right",
|
84 |
+
"truncation_strategy": "longest_first",
|
85 |
+
"unk_token": "<unk>",
|
86 |
+
"use_fast": true
|
87 |
+
}
|
onnx/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|