Vladt-Tempest commited on
Commit
573077a
·
1 Parent(s): 3237a57

cambios en coordinates_CI para manejar hasta 17 líneas

Browse files
Files changed (2) hide show
  1. coordinates_CI.json +129 -35
  2. test.py +1 -1
coordinates_CI.json CHANGED
@@ -144,69 +144,163 @@
144
  "height": "46.67",
145
  "confidence": null
146
  },
 
 
147
  {
148
  "id": "H",
149
- "label": "Boxes_01",
150
- "x": "210.00",
151
- "y": "1048.33",
152
- "width": "180.00",
153
- "height": "56.67",
154
  "confidence": null
155
  },
156
  {
157
  "id": "I",
158
- "label": "Pieces_01",
159
- "x": "448.33",
160
- "y": "1050.00",
161
- "width": "256.67",
162
- "height": "53.33",
163
  "confidence": null
164
  },
165
  {
166
  "id": "J",
167
- "label": "Product_01",
168
- "x": "881.67",
169
- "y": "1048.33",
170
- "width": "536.67",
171
- "height": "56.67",
172
  "confidence": null
173
  },
174
  {
175
  "id": "K",
176
- "label": "Tariff_number_01",
177
- "x": "1318.33",
178
- "y": "1048.33",
179
- "width": "283.33",
180
- "height": "60.00",
181
  "confidence": null
182
  },
183
  {
184
  "id": "L",
185
- "label": "Stems_01",
186
- "x": "1775.00",
187
- "y": "1048.33",
188
- "width": "130.00",
189
- "height": "56.67",
190
  "confidence": null
191
  },
192
  {
193
  "id": "M",
194
- "label": "Unit_price_01",
195
- "x": "1980.00",
196
- "y": "1048.33",
197
- "width": "186.67",
198
- "height": "50.00",
199
  "confidence": null
200
  },
201
  {
202
  "id": "N",
203
- "label": "Extended_price_01",
204
- "x": "2210.00",
205
- "y": "1051.67",
206
- "width": "206.67",
207
- "height": "50.00",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  "confidence": null
209
  }
 
210
  ],
211
  "height": 3509,
212
  "width": 2480
 
144
  "height": "46.67",
145
  "confidence": null
146
  },
147
+
148
+
149
  {
150
  "id": "H",
151
+ "label": "Product_line_1",
152
+ "x": "827.0",
153
+ "y": "1049.0",
154
+ "width": "3000.0",
155
+ "height": "25.00",
156
  "confidence": null
157
  },
158
  {
159
  "id": "I",
160
+ "label": "Product_line_2",
161
+ "x": "827.50",
162
+ "y": "1091.83",
163
+ "width": "3000.00",
164
+ "height": "25.00",
165
  "confidence": null
166
  },
167
  {
168
  "id": "J",
169
+ "label": "Product_line_3",
170
+ "x": "827.00",
171
+ "y": "1130.0",
172
+ "width": "3000.0",
173
+ "height": "25.00",
174
  "confidence": null
175
  },
176
  {
177
  "id": "K",
178
+ "label": "Product_line_4",
179
+ "x": "827.00",
180
+ "y": "1169.0",
181
+ "width": "3000.0",
182
+ "height": "25.00",
183
  "confidence": null
184
  },
185
  {
186
  "id": "L",
187
+ "label": "Product_line_5",
188
+ "x": "827.00",
189
+ "y": "1214.0",
190
+ "width": "3000.00",
191
+ "height": "25.00",
192
  "confidence": null
193
  },
194
  {
195
  "id": "M",
196
+ "label": "Product_line_6",
197
+ "x": "827.00",
198
+ "y": "1254.0",
199
+ "width": "3000.0",
200
+ "height": "25.0",
201
  "confidence": null
202
  },
203
  {
204
  "id": "N",
205
+ "label": "Product_line_7",
206
+ "x": "827.00",
207
+ "y": "1300.0",
208
+ "width": "3000.0",
209
+ "height": "25.0",
210
+ "confidence": null
211
+ },
212
+ {
213
+ "id": "O",
214
+ "label": "Product_line_8",
215
+ "x": "827.0",
216
+ "y": "1342.0",
217
+ "width": "3000.0",
218
+ "height": "25.00",
219
+ "confidence": null
220
+ },
221
+ {
222
+ "id": "P",
223
+ "label": "Product_line_9",
224
+ "x": "827.0",
225
+ "y": "1384.0",
226
+ "width": "3000.0",
227
+ "height": "25.00",
228
+ "confidence": null
229
+ },
230
+ {
231
+ "id": "Q",
232
+ "label": "Product_line_10",
233
+ "x": "827.0",
234
+ "y": "1426.0",
235
+ "width": "3000.0",
236
+ "height": "25.00",
237
+ "confidence": null
238
+ },
239
+ {
240
+ "id": "R",
241
+ "label": "Product_line_11",
242
+ "x": "827.0",
243
+ "y": "1468.0",
244
+ "width": "3000.0",
245
+ "height": "25.00",
246
+ "confidence": null
247
+ },
248
+
249
+ {
250
+ "id": "S",
251
+ "label": "Product_line_12",
252
+ "x": "827.0",
253
+ "y": "1510.0",
254
+ "width": "3000.0",
255
+ "height": "25.00",
256
+ "confidence": null
257
+ },
258
+ {
259
+ "id": "T",
260
+ "label": "Product_line_13",
261
+ "x": "827.0",
262
+ "y": "1552.0",
263
+ "width": "3000.0",
264
+ "height": "25.00",
265
+ "confidence": null
266
+ },
267
+ {
268
+ "id": "U",
269
+ "label": "Product_line_14",
270
+ "x": "827.0",
271
+ "y": "1594.0",
272
+ "width": "3000.0",
273
+ "height": "25.00",
274
+ "confidence": null
275
+ },
276
+ {
277
+ "id": "V",
278
+ "label": "Product_line_15",
279
+ "x": "827.0",
280
+ "y": "1636",
281
+ "width": "3000.0",
282
+ "height": "25.00",
283
+ "confidence": null
284
+ },
285
+ {
286
+ "id": "W",
287
+ "label": "Product_line_16",
288
+ "x": "827.0",
289
+ "y": "1678.0",
290
+ "width": "3000.0",
291
+ "height": "25.00",
292
+ "confidence": null
293
+ },
294
+ {
295
+ "id": "X",
296
+ "label": "Product_line_17",
297
+ "x": "827.0",
298
+ "y": "1720.0",
299
+ "width": "3000.0",
300
+ "height": "25.00",
301
  "confidence": null
302
  }
303
+
304
  ],
305
  "height": 3509,
306
  "width": 2480
test.py CHANGED
@@ -25,7 +25,7 @@ def test_single_invoice():
25
  """Prueba la extracción de campos en una sola factura"""
26
  try:
27
  # Rutas de archivos
28
- image_path = "./invoices/pagina_1.jpg"
29
  json_path = "./coordinates_CI.json"
30
 
31
  # Cargar imagen
 
25
  """Prueba la extracción de campos en una sola factura"""
26
  try:
27
  # Rutas de archivos
28
+ image_path = "./invoices/pagina_24.jpg"
29
  json_path = "./coordinates_CI.json"
30
 
31
  # Cargar imagen