Binayak Panigrahi commited on
Commit
044b0bb
·
1 Parent(s): 9f1efd3

Add application file

Browse files
Files changed (4) hide show
  1. Dockerfile +12 -0
  2. app.py +290 -0
  3. output.json +2430 -0
  4. requirements.txt +5 -0
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ COPY . .
9
+
10
+ EXPOSE 7860
11
+
12
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
app.py ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, File, UploadFile, HTTPException
2
+ from fastapi.middleware.cors import CORSMiddleware
3
+ from fastapi.staticfiles import StaticFiles
4
+ from fastapi.responses import FileResponse
5
+ from pydantic import BaseModel
6
+ import requests
7
+ import base64
8
+ import json
9
+ import re
10
+ import os
11
+
12
+ app = FastAPI(
13
+ title="Aadhaar Card OCR API",
14
+ description="Two-step RAG pipeline: nemoretriever-ocr-v1 → nvidia-nemotron-nano-9b-v2 for Aadhaar card extraction",
15
+ )
16
+
17
+ # ── CORS ──────────────────────────────────────────────────────────────────────
18
+ app.add_middleware(
19
+ CORSMiddleware,
20
+ allow_origins=["*"],
21
+ allow_credentials=True,
22
+ allow_methods=["*"],
23
+ allow_headers=["*"],
24
+ )
25
+
26
+ # ── Configuration ─────────────────────────────────────────────────────────────
27
+ # Set NVIDIA_API_KEY as a Secret in your HuggingFace Space settings
28
+ NVIDIA_API_KEY = os.environ.get("NVIDIA_API_KEY", "")
29
+
30
+ OCR_URL = "https://ai.api.nvidia.com/v1/cv/nvidia/nemoretriever-ocr-v1"
31
+ LLM_URL = "https://integrate.api.nvidia.com/v1/chat/completions"
32
+ LLM_MODEL = "nvidia/nvidia-nemotron-nano-9b-v2"
33
+
34
+ OCR_HEADERS = {
35
+ "Authorization": f"Bearer {NVIDIA_API_KEY}",
36
+ "Accept": "application/json",
37
+ }
38
+
39
+ LLM_HEADERS = {
40
+ "Authorization": f"Bearer {NVIDIA_API_KEY}",
41
+ "Content-Type": "application/json",
42
+ }
43
+
44
+ # ── System prompts ─────────────────────────────────────────────────────────────
45
+
46
+ FRONT_SYSTEM_PROMPT = """You are an Aadhaar card front-side data extraction assistant.
47
+ You will receive raw OCR text extracted from the FRONT side of an Indian Aadhaar card.
48
+ Parse it carefully and return ONLY a valid JSON object.
49
+ No markdown fences, no explanation, no preamble — just the raw JSON object.
50
+
51
+ JSON schema (return exactly this structure):
52
+ {
53
+ "name": "full name of the card holder (string)",
54
+ "dob": "date of birth in DD/MM/YYYY format (string)",
55
+ "gender": "gender Male, Female, or Other (string)",
56
+ "aadhaar_no": "12-digit Aadhaar number as a string, digits only, yes spaces"
57
+ }
58
+
59
+ Rules:
60
+ - name: the primary card holder's full name (usually in bold, after "Name:" or just prominently placed)
61
+ - dob: look for "DOB", "Date of Birth", "जन्म तिथि" — output in DD/MM/YYYY format; if already in that format keep it
62
+ - gender: look for "Male", "Female", "Other", or Hindi equivalents "पुरुष", "महिला", "अन्य"
63
+ - aadhaar_no: the 12-digit number, usually printed in groups like "XXXX XXXX XXXX" — remove all spaces and return only digits
64
+ - If a field is not found, use "" for strings
65
+ - Do NOT include address details, gender, or any other fields not in the schema"""
66
+
67
+ BACK_SYSTEM_PROMPT = """You are an Aadhaar card back-side data extraction assistant.
68
+ You will receive raw OCR text extracted from the BACK side of an Indian Aadhaar card.
69
+ Parse it carefully and return ONLY a valid JSON object.
70
+ No markdown fences, no explanation, no preamble — just the raw JSON object.
71
+
72
+ JSON schema (return exactly this structure):
73
+ {
74
+ "address": "door/flat number and street/locality/road name (string)",
75
+ "village_city": "village name or city/town name (string)",
76
+ "state": "state name (string)",
77
+ "pincode": "6-digit PIN code as a string"
78
+ }
79
+
80
+ Rules:
81
+ - address: the first line(s) of the address — house/flat number, building name, street or locality; exclude city, district, state, and PIN
82
+ - village_city: look for village name, town, or city; may also appear under "District" — prefer the more specific locality name over the district
83
+ - state: the full state name (e.g. "Maharashtra", "Tamil Nadu"); look near the end of the address block
84
+ - pincode: the 6-digit postal code; look for "PIN", "PIN Code", or a standalone 6-digit number at the end of the address
85
+ - If a field is not found, use "" for strings
86
+ - Do NOT include the card holder's name or Aadhaar number — focus only on address fields"""
87
+
88
+
89
+ # ── Helper ─────────────────────────────────────────────────────────────────────
90
+
91
+ async def run_ocr(file: UploadFile) -> str:
92
+ """Upload image to NVIDIA OCR and return concatenated plain text."""
93
+ content = await file.read()
94
+ image_b64 = base64.b64encode(content).decode()
95
+
96
+ if len(image_b64) >= 180_000:
97
+ raise HTTPException(
98
+ status_code=413,
99
+ detail="Image too large (base64 > 180 KB). Resize the image and try again.",
100
+ )
101
+
102
+ payload = {
103
+ "input": [
104
+ {
105
+ "type": "image_url",
106
+ "url": f"data:image/png;base64,{image_b64}",
107
+ }
108
+ ]
109
+ }
110
+
111
+ try:
112
+ response = requests.post(OCR_URL, headers=OCR_HEADERS, json=payload, timeout=30)
113
+ response.raise_for_status()
114
+ except requests.exceptions.RequestException as e:
115
+ raise HTTPException(status_code=502, detail=f"NVIDIA OCR API error: {str(e)}")
116
+
117
+ ocr_json = response.json()
118
+ print("OCR Response:", ocr_json)
119
+
120
+ detections = ocr_json.get("text_detections", [])
121
+ if not detections:
122
+ data = ocr_json.get("data", [])
123
+ if isinstance(data, list) and len(data) > 0:
124
+ detections = data[0].get("text_detections", [])
125
+
126
+ lines = []
127
+ for det in detections:
128
+ text = ""
129
+ if isinstance(det, dict):
130
+ if "text_prediction" in det:
131
+ text = det["text_prediction"].get("text", "").strip()
132
+ else:
133
+ text = det.get("text", "").strip()
134
+ if text:
135
+ lines.append(text)
136
+
137
+ return "\n".join(lines)
138
+
139
+
140
+ def call_llm(ocr_text: str, system_prompt: str) -> dict:
141
+ """Send OCR text to the LLM with the given system prompt and return parsed JSON dict."""
142
+ llm_payload = {
143
+ "model": LLM_MODEL,
144
+ "max_tokens": 1024,
145
+ "temperature": 0.2,
146
+ "top_p": 0.9,
147
+ "messages": [
148
+ {"role": "system", "content": system_prompt},
149
+ {
150
+ "role": "user",
151
+ "content": (
152
+ f"Here is the OCR text extracted from the Aadhaar card:\n\n"
153
+ f"{ocr_text}\n\n"
154
+ f"Extract the required data and return ONLY the JSON object."
155
+ ),
156
+ },
157
+ ],
158
+ }
159
+
160
+ try:
161
+ llm_response = requests.post(LLM_URL, headers=LLM_HEADERS, json=llm_payload, timeout=60)
162
+ llm_response.raise_for_status()
163
+ llm_json = llm_response.json()
164
+ print("LLM Response JSON:", llm_json)
165
+ except requests.exceptions.RequestException as e:
166
+ raise HTTPException(status_code=502, detail=f"NVIDIA LLM API error: {str(e)}")
167
+
168
+ raw_text: str = llm_json.get("choices", [{}])[0].get("message", {}).get("content", "")
169
+ print("LLM Raw Text:", raw_text)
170
+
171
+ if not raw_text:
172
+ raise HTTPException(status_code=502, detail="LLM returned an empty response")
173
+
174
+ cleaned = re.sub(r"```json\s*", "", raw_text, flags=re.IGNORECASE)
175
+ cleaned = re.sub(r"```\s*", "", cleaned).strip()
176
+
177
+ parsed = None
178
+ try:
179
+ parsed = json.loads(cleaned)
180
+ except json.JSONDecodeError:
181
+ match = re.search(r"\{[\s\S]*\}", cleaned)
182
+ if not match:
183
+ raise HTTPException(
184
+ status_code=502,
185
+ detail=f"LLM did not return valid JSON. Preview: {raw_text[:400]}",
186
+ )
187
+ try:
188
+ parsed = json.loads(match.group(0))
189
+ except json.JSONDecodeError as e:
190
+ raise HTTPException(status_code=502, detail=f"JSON parse error: {str(e)}")
191
+
192
+ if not isinstance(parsed, dict):
193
+ raise HTTPException(
194
+ status_code=502,
195
+ detail=f"LLM response is not a JSON object. Got: {type(parsed).__name__}",
196
+ )
197
+
198
+ print("LLM Parsed Data:", parsed)
199
+ return parsed
200
+
201
+
202
+ # ── Request / Response models ─────────────────────────────────────────────────
203
+
204
+ class AadhaarFrontData(BaseModel):
205
+ name: str
206
+ dob: str
207
+ gender: str
208
+ aadhaar_no: str
209
+
210
+
211
+ class AadhaarBackData(BaseModel):
212
+ address: str
213
+ village_city: str
214
+ state: str
215
+ pincode: str
216
+
217
+
218
+ # ── Endpoints ─────────────────────────────────────────────────────────────────
219
+
220
+ @app.post("/extract-front", response_model=AadhaarFrontData)
221
+ async def extract_front(file: UploadFile = File(...)):
222
+ """
223
+ Upload the FRONT side of an Aadhaar card image.
224
+
225
+ Pipeline:
226
+ 1. nemoretriever-ocr-v1 → raw OCR text
227
+ 2. nvidia-nemotron-nano-9b-v2 → structured JSON
228
+
229
+ Returns: name, dob, gender, aadhaar_no
230
+ """
231
+ ocr_text = await run_ocr(file)
232
+
233
+ if not ocr_text.strip():
234
+ raise HTTPException(status_code=422, detail="OCR produced no text. Check the image quality.")
235
+
236
+ parsed = call_llm(ocr_text, FRONT_SYSTEM_PROMPT)
237
+
238
+ raw_aadhaar = str(parsed.get("aadhaar_no", ""))
239
+ aadhaar_digits = re.sub(r"\D", "", raw_aadhaar)
240
+
241
+ return AadhaarFrontData(
242
+ name=str(parsed.get("name", "")).strip()[:100],
243
+ dob=str(parsed.get("dob", "")).strip()[:12],
244
+ gender=str(parsed.get("gender", "")).strip()[:20],
245
+ aadhaar_no=aadhaar_digits[:12],
246
+ )
247
+
248
+
249
+ @app.post("/extract-back", response_model=AadhaarBackData)
250
+ async def extract_back(file: UploadFile = File(...)):
251
+ """
252
+ Upload the BACK side of an Aadhaar card image.
253
+
254
+ Pipeline:
255
+ 1. nemoretriever-ocr-v1 → raw OCR text
256
+ 2. nvidia-nemotron-nano-9b-v2 → structured JSON
257
+
258
+ Returns: address, village_city, state, pincode
259
+ """
260
+ ocr_text = await run_ocr(file)
261
+
262
+ if not ocr_text.strip():
263
+ raise HTTPException(status_code=422, detail="OCR produced no text. Check the image quality.")
264
+
265
+ parsed = call_llm(ocr_text, BACK_SYSTEM_PROMPT)
266
+
267
+ raw_pin = str(parsed.get("pincode", ""))
268
+ pin_digits = re.sub(r"\D", "", raw_pin)[:6]
269
+
270
+ return AadhaarBackData(
271
+ address=str(parsed.get("address", "")).strip()[:200],
272
+ village_city=str(parsed.get("village_city", "")).strip()[:100],
273
+ state=str(parsed.get("state", "")).strip()[:60],
274
+ pincode=pin_digits,
275
+ )
276
+
277
+
278
+ @app.get("/health")
279
+ async def health_check():
280
+ return {"status": "healthy", "model": LLM_MODEL}
281
+
282
+
283
+ @app.get("/")
284
+ async def root():
285
+ return FileResponse("index.html")
286
+
287
+
288
+ if __name__ == "__main__":
289
+ import uvicorn
290
+ uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
output.json ADDED
@@ -0,0 +1,2430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [
3
+ {
4
+ "index": 0,
5
+ "text_detections": [
6
+ {
7
+ "text_prediction": {
8
+ "text": "Tax Invoice",
9
+ "confidence": 0.9748197097921061
10
+ },
11
+ "bounding_box": {
12
+ "points": [
13
+ {
14
+ "x": 0.4281061589717865,
15
+ "y": 0.026970278471708298
16
+ },
17
+ {
18
+ "x": 0.5610970854759216,
19
+ "y": 0.026970278471708298
20
+ },
21
+ {
22
+ "x": 0.5610970854759216,
23
+ "y": 0.04100232198834419
24
+ },
25
+ {
26
+ "x": 0.4281061589717865,
27
+ "y": 0.04100232198834419
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ "text_prediction": {
34
+ "text": "Ace Mobile Manufacturer Pvt Ltd B-209, Park Plaza,",
35
+ "confidence": 0.9503553236710961
36
+ },
37
+ "bounding_box": {
38
+ "points": [
39
+ {
40
+ "x": 0.15283800661563873,
41
+ "y": 0.07046565413475037
42
+ },
43
+ {
44
+ "x": 0.4736310839653015,
45
+ "y": 0.07046565413475037
46
+ },
47
+ {
48
+ "x": 0.4736310839653015,
49
+ "y": 0.09781374037265778
50
+ },
51
+ {
52
+ "x": 0.15283800661563873,
53
+ "y": 0.09781374037265778
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "text_prediction": {
60
+ "text": "Invoice No. ACMPLM/23-2",
61
+ "confidence": 0.5086731281996885
62
+ },
63
+ "bounding_box": {
64
+ "points": [
65
+ {
66
+ "x": 0.5034815669059753,
67
+ "y": 0.06732074171304703
68
+ },
69
+ {
70
+ "x": 0.6023612022399902,
71
+ "y": 0.06732074171304703
72
+ },
73
+ {
74
+ "x": 0.6023612022399902,
75
+ "y": 0.09628961980342865
76
+ },
77
+ {
78
+ "x": 0.5034815669059753,
79
+ "y": 0.09628961980342865
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ "text_prediction": {
86
+ "text": "e-Way Bill No.",
87
+ "confidence": 0.753118366159215
88
+ },
89
+ "bounding_box": {
90
+ "points": [
91
+ {
92
+ "x": 0.6380387544631958,
93
+ "y": 0.06735839694738388
94
+ },
95
+ {
96
+ "x": 0.7343797087669373,
97
+ "y": 0.06735839694738388
98
+ },
99
+ {
100
+ "x": 0.7343797087669373,
101
+ "y": 0.07988782972097397
102
+ },
103
+ {
104
+ "x": 0.6380387544631958,
105
+ "y": 0.07988782972097397
106
+ }
107
+ ]
108
+ }
109
+ },
110
+ {
111
+ "text_prediction": {
112
+ "text": "Dated",
113
+ "confidence": 0.9807570471020685
114
+ },
115
+ "bounding_box": {
116
+ "points": [
117
+ {
118
+ "x": 0.7477322220802307,
119
+ "y": 0.06691493839025497
120
+ },
121
+ {
122
+ "x": 0.7990933656692505,
123
+ "y": 0.06691493839025497
124
+ },
125
+ {
126
+ "x": 0.7990933656692505,
127
+ "y": 0.07908544689416885
128
+ },
129
+ {
130
+ "x": 0.7477322220802307,
131
+ "y": 0.07908544689416885
132
+ }
133
+ ]
134
+ }
135
+ },
136
+ {
137
+ "text_prediction": {
138
+ "text": "18-Apr-2019",
139
+ "confidence": 0.9013753213124308
140
+ },
141
+ "bounding_box": {
142
+ "points": [
143
+ {
144
+ "x": 0.7535693049430847,
145
+ "y": 0.08511585742235184
146
+ },
147
+ {
148
+ "x": 0.8546010255813599,
149
+ "y": 0.08511585742235184
150
+ },
151
+ {
152
+ "x": 0.8546010255813599,
153
+ "y": 0.09904323518276215
154
+ },
155
+ {
156
+ "x": 0.7535693049430847,
157
+ "y": 0.09904323518276215
158
+ }
159
+ ]
160
+ }
161
+ },
162
+ {
163
+ "text_prediction": {
164
+ "text": "Krishna Nagar",
165
+ "confidence": 0.9462618103555019
166
+ },
167
+ "bounding_box": {
168
+ "points": [
169
+ {
170
+ "x": 0.15382921695709229,
171
+ "y": 0.10059942305088043
172
+ },
173
+ {
174
+ "x": 0.2792307138442993,
175
+ "y": 0.10059942305088043
176
+ },
177
+ {
178
+ "x": 0.2792307138442993,
179
+ "y": 0.11339758336544037
180
+ },
181
+ {
182
+ "x": 0.15382921695709229,
183
+ "y": 0.11339758336544037
184
+ }
185
+ ]
186
+ }
187
+ },
188
+ {
189
+ "text_prediction": {
190
+ "text": "Delivery Note",
191
+ "confidence": 0.9796860206854658
192
+ },
193
+ "bounding_box": {
194
+ "points": [
195
+ {
196
+ "x": 0.5049098134040833,
197
+ "y": 0.10229111462831497
198
+ },
199
+ {
200
+ "x": 0.6149916052818298,
201
+ "y": 0.10229111462831497
202
+ },
203
+ {
204
+ "x": 0.6149916052818298,
205
+ "y": 0.1148548349738121
206
+ },
207
+ {
208
+ "x": 0.5049098134040833,
209
+ "y": 0.1148548349738121
210
+ }
211
+ ]
212
+ }
213
+ },
214
+ {
215
+ "text_prediction": {
216
+ "text": "Mode/Terms of Payment",
217
+ "confidence": 0.9528241199171568
218
+ },
219
+ "bounding_box": {
220
+ "points": [
221
+ {
222
+ "x": 0.7510144710540771,
223
+ "y": 0.1020733043551445
224
+ },
225
+ {
226
+ "x": 0.9532119035720825,
227
+ "y": 0.1020733043551445
228
+ },
229
+ {
230
+ "x": 0.9532119035720825,
231
+ "y": 0.11538157612085342
232
+ },
233
+ {
234
+ "x": 0.7510144710540771,
235
+ "y": 0.11538157612085342
236
+ }
237
+ ]
238
+ }
239
+ },
240
+ {
241
+ "text_prediction": {
242
+ "text": "Lucknow",
243
+ "confidence": 0.9842854154065773
244
+ },
245
+ "bounding_box": {
246
+ "points": [
247
+ {
248
+ "x": 0.15341368317604065,
249
+ "y": 0.11627411842346191
250
+ },
251
+ {
252
+ "x": 0.23254437744617462,
253
+ "y": 0.11627411842346191
254
+ },
255
+ {
256
+ "x": 0.23254437744617462,
257
+ "y": 0.1261703073978424
258
+ },
259
+ {
260
+ "x": 0.15341368317604065,
261
+ "y": 0.1261703073978424
262
+ }
263
+ ]
264
+ }
265
+ },
266
+ {
267
+ "text_prediction": {
268
+ "text": "State Name: Uttar Pradesh, Code 009",
269
+ "confidence": 0.8335085842638407
270
+ },
271
+ "bounding_box": {
272
+ "points": [
273
+ {
274
+ "x": 0.15377135574817657,
275
+ "y": 0.14566902816295624
276
+ },
277
+ {
278
+ "x": 0.43872737884521484,
279
+ "y": 0.14566902816295624
280
+ },
281
+ {
282
+ "x": 0.43872737884521484,
283
+ "y": 0.15648652613162994
284
+ },
285
+ {
286
+ "x": 0.15377135574817657,
287
+ "y": 0.15648652613162994
288
+ }
289
+ ]
290
+ }
291
+ },
292
+ {
293
+ "text_prediction": {
294
+ "text": "GSTIN/UIN: 09AABCS1429B12S",
295
+ "confidence": 0.6739966742007417
296
+ },
297
+ "bounding_box": {
298
+ "points": [
299
+ {
300
+ "x": 0.15627622604370117,
301
+ "y": 0.1305101364850998
302
+ },
303
+ {
304
+ "x": 0.4420973062515259,
305
+ "y": 0.1305101364850998
306
+ },
307
+ {
308
+ "x": 0.4420973062515259,
309
+ "y": 0.14196757972240448
310
+ },
311
+ {
312
+ "x": 0.15627622604370117,
313
+ "y": 0.14196757972240448
314
+ }
315
+ ]
316
+ }
317
+ },
318
+ {
319
+ "text_prediction": {
320
+ "text": "Supplier's Ref.",
321
+ "confidence": 0.9569732677103384
322
+ },
323
+ "bounding_box": {
324
+ "points": [
325
+ {
326
+ "x": 0.504898726940155,
327
+ "y": 0.1362711638212204
328
+ },
329
+ {
330
+ "x": 0.6275951862335205,
331
+ "y": 0.1362711638212204
332
+ },
333
+ {
334
+ "x": 0.6275951862335205,
335
+ "y": 0.1503659337759018
336
+ },
337
+ {
338
+ "x": 0.504898726940155,
339
+ "y": 0.1503659337759018
340
+ }
341
+ ]
342
+ }
343
+ },
344
+ {
345
+ "text_prediction": {
346
+ "text": "Other Reference(s)",
347
+ "confidence": 0.9026041319961966
348
+ },
349
+ "bounding_box": {
350
+ "points": [
351
+ {
352
+ "x": 0.7479817867279053,
353
+ "y": 0.1368047595024109
354
+ },
355
+ {
356
+ "x": 0.9088143110275269,
357
+ "y": 0.1368047595024109
358
+ },
359
+ {
360
+ "x": 0.9088143110275269,
361
+ "y": 0.15012960135936737
362
+ },
363
+ {
364
+ "x": 0.7479817867279053,
365
+ "y": 0.15012960135936737
366
+ }
367
+ ]
368
+ }
369
+ },
370
+ {
371
+ "text_prediction": {
372
+ "text": "Buyer",
373
+ "confidence": 0.9962499376180411
374
+ },
375
+ "bounding_box": {
376
+ "points": [
377
+ {
378
+ "x": 0.009164477698504925,
379
+ "y": 0.18092162907123566
380
+ },
381
+ {
382
+ "x": 0.05915549024939537,
383
+ "y": 0.18092162907123566
384
+ },
385
+ {
386
+ "x": 0.05915549024939537,
387
+ "y": 0.19374606013298035
388
+ },
389
+ {
390
+ "x": 0.009164477698504925,
391
+ "y": 0.19374606013298035
392
+ }
393
+ ]
394
+ }
395
+ },
396
+ {
397
+ "text_prediction": {
398
+ "text": "E-Mail: info@ace.com",
399
+ "confidence": 0.8351061763417369
400
+ },
401
+ "bounding_box": {
402
+ "points": [
403
+ {
404
+ "x": 0.15388941764831543,
405
+ "y": 0.15974482893943787
406
+ },
407
+ {
408
+ "x": 0.3505077660083771,
409
+ "y": 0.15974482893943787
410
+ },
411
+ {
412
+ "x": 0.3505077660083771,
413
+ "y": 0.17221148312091827
414
+ },
415
+ {
416
+ "x": 0.15388941764831543,
417
+ "y": 0.17221148312091827
418
+ }
419
+ ]
420
+ }
421
+ },
422
+ {
423
+ "text_prediction": {
424
+ "text": "Buyer's Order No.",
425
+ "confidence": 0.9494322212094759
426
+ },
427
+ "bounding_box": {
428
+ "points": [
429
+ {
430
+ "x": 0.5049461722373962,
431
+ "y": 0.17153337597846985
432
+ },
433
+ {
434
+ "x": 0.6516596078872681,
435
+ "y": 0.17153337597846985
436
+ },
437
+ {
438
+ "x": 0.6516596078872681,
439
+ "y": 0.18517036736011505
440
+ },
441
+ {
442
+ "x": 0.5049461722373962,
443
+ "y": 0.18517036736011505
444
+ }
445
+ ]
446
+ }
447
+ },
448
+ {
449
+ "text_prediction": {
450
+ "text": "Dated",
451
+ "confidence": 0.9593436230257729
452
+ },
453
+ "bounding_box": {
454
+ "points": [
455
+ {
456
+ "x": 0.7481052279472351,
457
+ "y": 0.17170295119285583
458
+ },
459
+ {
460
+ "x": 0.7997036576271057,
461
+ "y": 0.17170295119285583
462
+ },
463
+ {
464
+ "x": 0.7997036576271057,
465
+ "y": 0.18342140316963196
466
+ },
467
+ {
468
+ "x": 0.7481052279472351,
469
+ "y": 0.18342140316963196
470
+ }
471
+ ]
472
+ }
473
+ },
474
+ {
475
+ "text_prediction": {
476
+ "text": "261-1",
477
+ "confidence": 0.9707588393010937
478
+ },
479
+ "bounding_box": {
480
+ "points": [
481
+ {
482
+ "x": 0.008919171057641506,
483
+ "y": 0.21441669762134552
484
+ },
485
+ {
486
+ "x": 0.059615276753902435,
487
+ "y": 0.21441669762134552
488
+ },
489
+ {
490
+ "x": 0.059615276753902435,
491
+ "y": 0.2266169935464859
492
+ },
493
+ {
494
+ "x": 0.008919171057641506,
495
+ "y": 0.2266169935464859
496
+ }
497
+ ]
498
+ }
499
+ },
500
+ {
501
+ "text_prediction": {
502
+ "text": "The Mobile Planet",
503
+ "confidence": 0.9573466312087292
504
+ },
505
+ "bounding_box": {
506
+ "points": [
507
+ {
508
+ "x": 0.009591488167643547,
509
+ "y": 0.1985173374414444
510
+ },
511
+ {
512
+ "x": 0.19010353088378906,
513
+ "y": 0.1985173374414444
514
+ },
515
+ {
516
+ "x": 0.19010353088378906,
517
+ "y": 0.21054232120513916
518
+ },
519
+ {
520
+ "x": 0.009591488167643547,
521
+ "y": 0.21054232120513916
522
+ }
523
+ ]
524
+ }
525
+ },
526
+ {
527
+ "text_prediction": {
528
+ "text": "Despatch Document No.",
529
+ "confidence": 0.934802820080788
530
+ },
531
+ "bounding_box": {
532
+ "points": [
533
+ {
534
+ "x": 0.5048586130142212,
535
+ "y": 0.2065657079219818
536
+ },
537
+ {
538
+ "x": 0.7121360301971436,
539
+ "y": 0.2065657079219818
540
+ },
541
+ {
542
+ "x": 0.7121360301971436,
543
+ "y": 0.22001978754997253
544
+ },
545
+ {
546
+ "x": 0.5048586130142212,
547
+ "y": 0.22001978754997253
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ {
553
+ "text_prediction": {
554
+ "text": "Delivery Note Date",
555
+ "confidence": 0.9515459891351767
556
+ },
557
+ "bounding_box": {
558
+ "points": [
559
+ {
560
+ "x": 0.748521089553833,
561
+ "y": 0.20679807662963867
562
+ },
563
+ {
564
+ "x": 0.9037997722625732,
565
+ "y": 0.20679807662963867
566
+ },
567
+ {
568
+ "x": 0.9037997722625732,
569
+ "y": 0.2201414406299591
570
+ },
571
+ {
572
+ "x": 0.748521089553833,
573
+ "y": 0.2201414406299591
574
+ }
575
+ ]
576
+ }
577
+ },
578
+ {
579
+ "text_prediction": {
580
+ "text": "Krishana Palace Road",
581
+ "confidence": 0.9741241638486603
582
+ },
583
+ "bounding_box": {
584
+ "points": [
585
+ {
586
+ "x": 0.008065134286880493,
587
+ "y": 0.22956547141075134
588
+ },
589
+ {
590
+ "x": 0.209171324968338,
591
+ "y": 0.22956547141075134
592
+ },
593
+ {
594
+ "x": 0.209171324968338,
595
+ "y": 0.24273693561553955
596
+ },
597
+ {
598
+ "x": 0.008065134286880493,
599
+ "y": 0.24273693561553955
600
+ }
601
+ ]
602
+ }
603
+ },
604
+ {
605
+ "text_prediction": {
606
+ "text": "Faizabad",
607
+ "confidence": 0.9620374399141614
608
+ },
609
+ "bounding_box": {
610
+ "points": [
611
+ {
612
+ "x": 0.009245852008461952,
613
+ "y": 0.24560081958770752
614
+ },
615
+ {
616
+ "x": 0.09355217218399048,
617
+ "y": 0.24560081958770752
618
+ },
619
+ {
620
+ "x": 0.09355217218399048,
621
+ "y": 0.25867870450019836
622
+ },
623
+ {
624
+ "x": 0.009245852008461952,
625
+ "y": 0.25867870450019836
626
+ }
627
+ ]
628
+ }
629
+ },
630
+ {
631
+ "text_prediction": {
632
+ "text": "Despatched through",
633
+ "confidence": 0.9777139657113127
634
+ },
635
+ "bounding_box": {
636
+ "points": [
637
+ {
638
+ "x": 0.5043799877166748,
639
+ "y": 0.2415831834077835
640
+ },
641
+ {
642
+ "x": 0.6768060922622681,
643
+ "y": 0.2415831834077835
644
+ },
645
+ {
646
+ "x": 0.6768060922622681,
647
+ "y": 0.2552328109741211
648
+ },
649
+ {
650
+ "x": 0.5043799877166748,
651
+ "y": 0.2552328109741211
652
+ }
653
+ ]
654
+ }
655
+ },
656
+ {
657
+ "text_prediction": {
658
+ "text": "Destination",
659
+ "confidence": 0.9308768526069846
660
+ },
661
+ "bounding_box": {
662
+ "points": [
663
+ {
664
+ "x": 0.7482102513313293,
665
+ "y": 0.24142077565193176
666
+ },
667
+ {
668
+ "x": 0.8444294333457947,
669
+ "y": 0.24142077565193176
670
+ },
671
+ {
672
+ "x": 0.8444294333457947,
673
+ "y": 0.25336241722106934
674
+ },
675
+ {
676
+ "x": 0.7482102513313293,
677
+ "y": 0.25336241722106934
678
+ }
679
+ ]
680
+ }
681
+ },
682
+ {
683
+ "text_prediction": {
684
+ "text": "GSTIN/UIN",
685
+ "confidence": 0.9490432241327588
686
+ },
687
+ "bounding_box": {
688
+ "points": [
689
+ {
690
+ "x": 0.010086867958307266,
691
+ "y": 0.26133060455322266
692
+ },
693
+ {
694
+ "x": 0.10780887305736542,
695
+ "y": 0.26133060455322266
696
+ },
697
+ {
698
+ "x": 0.10780887305736542,
699
+ "y": 0.27405035495758057
700
+ },
701
+ {
702
+ "x": 0.010086867958307266,
703
+ "y": 0.27405035495758057
704
+ }
705
+ ]
706
+ }
707
+ },
708
+ {
709
+ "text_prediction": {
710
+ "text": "09AAGCA1654H120",
711
+ "confidence": 0.622093055637101
712
+ },
713
+ "bounding_box": {
714
+ "points": [
715
+ {
716
+ "x": 0.1810629665851593,
717
+ "y": 0.2611198127269745
718
+ },
719
+ {
720
+ "x": 0.3687642216682434,
721
+ "y": 0.2611198127269745
722
+ },
723
+ {
724
+ "x": 0.3687642216682434,
725
+ "y": 0.2747194468975067
726
+ },
727
+ {
728
+ "x": 0.1810629665851593,
729
+ "y": 0.2747194468975067
730
+ }
731
+ ]
732
+ }
733
+ },
734
+ {
735
+ "text_prediction": {
736
+ "text": "State Name",
737
+ "confidence": 0.9918997654387904
738
+ },
739
+ "bounding_box": {
740
+ "points": [
741
+ {
742
+ "x": 0.009276061318814754,
743
+ "y": 0.27818119525909424
744
+ },
745
+ {
746
+ "x": 0.11545407027006149,
747
+ "y": 0.27818119525909424
748
+ },
749
+ {
750
+ "x": 0.11545407027006149,
751
+ "y": 0.2901204228401184
752
+ },
753
+ {
754
+ "x": 0.009276061318814754,
755
+ "y": 0.2901204228401184
756
+ }
757
+ ]
758
+ }
759
+ },
760
+ {
761
+ "text_prediction": {
762
+ "text": "Uttar Pradesh, Code: 09",
763
+ "confidence": 0.9579911783775362
764
+ },
765
+ "bounding_box": {
766
+ "points": [
767
+ {
768
+ "x": 0.18150882422924042,
769
+ "y": 0.2778378129005432
770
+ },
771
+ {
772
+ "x": 0.4046323299407959,
773
+ "y": 0.2778378129005432
774
+ },
775
+ {
776
+ "x": 0.4046323299407959,
777
+ "y": 0.29173770546913147
778
+ },
779
+ {
780
+ "x": 0.18150882422924042,
781
+ "y": 0.29173770546913147
782
+ }
783
+ ]
784
+ }
785
+ },
786
+ {
787
+ "text_prediction": {
788
+ "text": "Terms of Delivery",
789
+ "confidence": 0.9422214567400117
790
+ },
791
+ "bounding_box": {
792
+ "points": [
793
+ {
794
+ "x": 0.5034655928611755,
795
+ "y": 0.28040874004364014
796
+ },
797
+ {
798
+ "x": 0.6519767642021179,
799
+ "y": 0.28040874004364014
800
+ },
801
+ {
802
+ "x": 0.6519767642021179,
803
+ "y": 0.29422494769096375
804
+ },
805
+ {
806
+ "x": 0.5034655928611755,
807
+ "y": 0.29422494769096375
808
+ }
809
+ ]
810
+ }
811
+ },
812
+ {
813
+ "text_prediction": {
814
+ "text": "S",
815
+ "confidence": 0.8954245240233607
816
+ },
817
+ "bounding_box": {
818
+ "points": [
819
+ {
820
+ "x": 0.008573697879910469,
821
+ "y": 0.40022698044776917
822
+ },
823
+ {
824
+ "x": 0.026032254099845886,
825
+ "y": 0.40022698044776917
826
+ },
827
+ {
828
+ "x": 0.026032254099845886,
829
+ "y": 0.4131872355937958
830
+ },
831
+ {
832
+ "x": 0.008573697879910469,
833
+ "y": 0.4131872355937958
834
+ }
835
+ ]
836
+ }
837
+ },
838
+ {
839
+ "text_prediction": {
840
+ "text": "Description of Goods",
841
+ "confidence": 0.9802522111437554
842
+ },
843
+ "bounding_box": {
844
+ "points": [
845
+ {
846
+ "x": 0.1808306872844696,
847
+ "y": 0.4004242420196533
848
+ },
849
+ {
850
+ "x": 0.3592608869075775,
851
+ "y": 0.4004242420196533
852
+ },
853
+ {
854
+ "x": 0.3592608869075775,
855
+ "y": 0.41413116455078125
856
+ },
857
+ {
858
+ "x": 0.1808306872844696,
859
+ "y": 0.41413116455078125
860
+ }
861
+ ]
862
+ }
863
+ },
864
+ {
865
+ "text_prediction": {
866
+ "text": "HSN/SAC",
867
+ "confidence": 0.9603467666002072
868
+ },
869
+ "bounding_box": {
870
+ "points": [
871
+ {
872
+ "x": 0.5271959900856018,
873
+ "y": 0.4004769027233124
874
+ },
875
+ {
876
+ "x": 0.6068354249000549,
877
+ "y": 0.4004769027233124
878
+ },
879
+ {
880
+ "x": 0.6068354249000549,
881
+ "y": 0.41194915771484375
882
+ },
883
+ {
884
+ "x": 0.5271959900856018,
885
+ "y": 0.41194915771484375
886
+ }
887
+ ]
888
+ }
889
+ },
890
+ {
891
+ "text_prediction": {
892
+ "text": "Quantity",
893
+ "confidence": 0.9575195866582796
894
+ },
895
+ "bounding_box": {
896
+ "points": [
897
+ {
898
+ "x": 0.6310424208641052,
899
+ "y": 0.4002796709537506
900
+ },
901
+ {
902
+ "x": 0.6983417272567749,
903
+ "y": 0.4002796709537506
904
+ },
905
+ {
906
+ "x": 0.6983417272567749,
907
+ "y": 0.4139189124107361
908
+ },
909
+ {
910
+ "x": 0.6310424208641052,
911
+ "y": 0.4139189124107361
912
+ }
913
+ ]
914
+ }
915
+ },
916
+ {
917
+ "text_prediction": {
918
+ "text": "Rate",
919
+ "confidence": 0.9988253311062066
920
+ },
921
+ "bounding_box": {
922
+ "points": [
923
+ {
924
+ "x": 0.741718053817749,
925
+ "y": 0.40060457587242126
926
+ },
927
+ {
928
+ "x": 0.7810059785842896,
929
+ "y": 0.40060457587242126
930
+ },
931
+ {
932
+ "x": 0.7810059785842896,
933
+ "y": 0.4120011627674103
934
+ },
935
+ {
936
+ "x": 0.741718053817749,
937
+ "y": 0.4120011627674103
938
+ }
939
+ ]
940
+ }
941
+ },
942
+ {
943
+ "text_prediction": {
944
+ "text": "per",
945
+ "confidence": 0.9437234819651084
946
+ },
947
+ "bounding_box": {
948
+ "points": [
949
+ {
950
+ "x": 0.8160820603370667,
951
+ "y": 0.40206652879714966
952
+ },
953
+ {
954
+ "x": 0.8441846370697021,
955
+ "y": 0.40206652879714966
956
+ },
957
+ {
958
+ "x": 0.8441846370697021,
959
+ "y": 0.4130713641643524
960
+ },
961
+ {
962
+ "x": 0.8160820603370667,
963
+ "y": 0.4130713641643524
964
+ }
965
+ ]
966
+ }
967
+ },
968
+ {
969
+ "text_prediction": {
970
+ "text": "Amount",
971
+ "confidence": 0.9962310057810274
972
+ },
973
+ "bounding_box": {
974
+ "points": [
975
+ {
976
+ "x": 0.8872876167297363,
977
+ "y": 0.4008324146270752
978
+ },
979
+ {
980
+ "x": 0.9537317752838135,
981
+ "y": 0.4008324146270752
982
+ },
983
+ {
984
+ "x": 0.9537317752838135,
985
+ "y": 0.41171151399612427
986
+ },
987
+ {
988
+ "x": 0.8872876167297363,
989
+ "y": 0.41171151399612427
990
+ }
991
+ ]
992
+ }
993
+ },
994
+ {
995
+ "text_prediction": {
996
+ "text": "No",
997
+ "confidence": 0.9045932781072694
998
+ },
999
+ "bounding_box": {
1000
+ "points": [
1001
+ {
1002
+ "x": 0.007989711128175259,
1003
+ "y": 0.4181329905986786
1004
+ },
1005
+ {
1006
+ "x": 0.024794697761535645,
1007
+ "y": 0.4181329905986786
1008
+ },
1009
+ {
1010
+ "x": 0.024794697761535645,
1011
+ "y": 0.43017855286598206
1012
+ },
1013
+ {
1014
+ "x": 0.007989711128175259,
1015
+ "y": 0.43017855286598206
1016
+ }
1017
+ ]
1018
+ }
1019
+ },
1020
+ {
1021
+ "text_prediction": {
1022
+ "text": "1",
1023
+ "confidence": 0.8758827706820551
1024
+ },
1025
+ "bounding_box": {
1026
+ "points": [
1027
+ {
1028
+ "x": 0.00969455111771822,
1029
+ "y": 0.44437476992607117
1030
+ },
1031
+ {
1032
+ "x": 0.021701086312532425,
1033
+ "y": 0.44437476992607117
1034
+ },
1035
+ {
1036
+ "x": 0.021701086312532425,
1037
+ "y": 0.4560118019580841
1038
+ },
1039
+ {
1040
+ "x": 0.00969455111771822,
1041
+ "y": 0.4560118019580841
1042
+ }
1043
+ ]
1044
+ }
1045
+ },
1046
+ {
1047
+ "text_prediction": {
1048
+ "text": "Ace A1-Smartphone",
1049
+ "confidence": 0.9667262151857285
1050
+ },
1051
+ "bounding_box": {
1052
+ "points": [
1053
+ {
1054
+ "x": 0.033987171947956085,
1055
+ "y": 0.44407060742378235
1056
+ },
1057
+ {
1058
+ "x": 0.2253756821155548,
1059
+ "y": 0.44407060742378235
1060
+ },
1061
+ {
1062
+ "x": 0.2253756821155548,
1063
+ "y": 0.45872068405151367
1064
+ },
1065
+ {
1066
+ "x": 0.033987171947956085,
1067
+ "y": 0.45872068405151367
1068
+ }
1069
+ ]
1070
+ }
1071
+ },
1072
+ {
1073
+ "text_prediction": {
1074
+ "text": "8517",
1075
+ "confidence": 0.989150798365331
1076
+ },
1077
+ "bounding_box": {
1078
+ "points": [
1079
+ {
1080
+ "x": 0.5227946639060974,
1081
+ "y": 0.44386643171310425
1082
+ },
1083
+ {
1084
+ "x": 0.5662984251976013,
1085
+ "y": 0.44386643171310425
1086
+ },
1087
+ {
1088
+ "x": 0.5662984251976013,
1089
+ "y": 0.4549088478088379
1090
+ },
1091
+ {
1092
+ "x": 0.5227946639060974,
1093
+ "y": 0.4549088478088379
1094
+ }
1095
+ ]
1096
+ }
1097
+ },
1098
+ {
1099
+ "text_prediction": {
1100
+ "text": "500 Nos",
1101
+ "confidence": 0.9721733206925685
1102
+ },
1103
+ "bounding_box": {
1104
+ "points": [
1105
+ {
1106
+ "x": 0.6348584890365601,
1107
+ "y": 0.4442255198955536
1108
+ },
1109
+ {
1110
+ "x": 0.7093479037284851,
1111
+ "y": 0.4442255198955536
1112
+ },
1113
+ {
1114
+ "x": 0.7093479037284851,
1115
+ "y": 0.45626717805862427
1116
+ },
1117
+ {
1118
+ "x": 0.6348584890365601,
1119
+ "y": 0.45626717805862427
1120
+ }
1121
+ ]
1122
+ }
1123
+ },
1124
+ {
1125
+ "text_prediction": {
1126
+ "text": "6,000.00 Nos",
1127
+ "confidence": 0.9764595228588815
1128
+ },
1129
+ "bounding_box": {
1130
+ "points": [
1131
+ {
1132
+ "x": 0.7324100136756897,
1133
+ "y": 0.44334039092063904
1134
+ },
1135
+ {
1136
+ "x": 0.8483666181564331,
1137
+ "y": 0.44334039092063904
1138
+ },
1139
+ {
1140
+ "x": 0.8483666181564331,
1141
+ "y": 0.45602476596832275
1142
+ },
1143
+ {
1144
+ "x": 0.7324100136756897,
1145
+ "y": 0.45602476596832275
1146
+ }
1147
+ ]
1148
+ }
1149
+ },
1150
+ {
1151
+ "text_prediction": {
1152
+ "text": "30,00,000.00",
1153
+ "confidence": 0.9811327895767481
1154
+ },
1155
+ "bounding_box": {
1156
+ "points": [
1157
+ {
1158
+ "x": 0.8712486624717712,
1159
+ "y": 0.443573534488678
1160
+ },
1161
+ {
1162
+ "x": 0.987978458404541,
1163
+ "y": 0.443573534488678
1164
+ },
1165
+ {
1166
+ "x": 0.987978458404541,
1167
+ "y": 0.4579654335975647
1168
+ },
1169
+ {
1170
+ "x": 0.8712486624717712,
1171
+ "y": 0.4579654335975647
1172
+ }
1173
+ ]
1174
+ }
1175
+ },
1176
+ {
1177
+ "text_prediction": {
1178
+ "text": "Batch Batch 1",
1179
+ "confidence": 0.8013385633420151
1180
+ },
1181
+ "bounding_box": {
1182
+ "points": [
1183
+ {
1184
+ "x": 0.052881523966789246,
1185
+ "y": 0.4605114459991455
1186
+ },
1187
+ {
1188
+ "x": 0.19192595779895782,
1189
+ "y": 0.4605114459991455
1190
+ },
1191
+ {
1192
+ "x": 0.19192595779895782,
1193
+ "y": 0.47234907746315
1194
+ },
1195
+ {
1196
+ "x": 0.052881523966789246,
1197
+ "y": 0.47234907746315
1198
+ }
1199
+ ]
1200
+ }
1201
+ },
1202
+ {
1203
+ "text_prediction": {
1204
+ "text": "500 Nos",
1205
+ "confidence": 0.9279899441267436
1206
+ },
1207
+ "bounding_box": {
1208
+ "points": [
1209
+ {
1210
+ "x": 0.6361475586891174,
1211
+ "y": 0.46036872267723083
1212
+ },
1213
+ {
1214
+ "x": 0.7087548971176147,
1215
+ "y": 0.46036872267723083
1216
+ },
1217
+ {
1218
+ "x": 0.7087548971176147,
1219
+ "y": 0.47211989760398865
1220
+ },
1221
+ {
1222
+ "x": 0.6361475586891174,
1223
+ "y": 0.47211989760398865
1224
+ }
1225
+ ]
1226
+ }
1227
+ },
1228
+ {
1229
+ "text_prediction": {
1230
+ "text": "2",
1231
+ "confidence": 0.9664679492367296
1232
+ },
1233
+ "bounding_box": {
1234
+ "points": [
1235
+ {
1236
+ "x": 0.008624888025224209,
1237
+ "y": 0.477410227060318
1238
+ },
1239
+ {
1240
+ "x": 0.022799812257289886,
1241
+ "y": 0.477410227060318
1242
+ },
1243
+ {
1244
+ "x": 0.022799812257289886,
1245
+ "y": 0.48906147480010986
1246
+ },
1247
+ {
1248
+ "x": 0.008624888025224209,
1249
+ "y": 0.48906147480010986
1250
+ }
1251
+ ]
1252
+ }
1253
+ },
1254
+ {
1255
+ "text_prediction": {
1256
+ "text": "Ace A1 Plus-Smartphone",
1257
+ "confidence": 0.9065731535430576
1258
+ },
1259
+ "bounding_box": {
1260
+ "points": [
1261
+ {
1262
+ "x": 0.033814530819654465,
1263
+ "y": 0.47642216086387634
1264
+ },
1265
+ {
1266
+ "x": 0.2715057134628296,
1267
+ "y": 0.47642216086387634
1268
+ },
1269
+ {
1270
+ "x": 0.2715057134628296,
1271
+ "y": 0.4918469786643982
1272
+ },
1273
+ {
1274
+ "x": 0.033814530819654465,
1275
+ "y": 0.4918469786643982
1276
+ }
1277
+ ]
1278
+ }
1279
+ },
1280
+ {
1281
+ "text_prediction": {
1282
+ "text": "8517",
1283
+ "confidence": 0.9725580197853879
1284
+ },
1285
+ "bounding_box": {
1286
+ "points": [
1287
+ {
1288
+ "x": 0.5223215818405151,
1289
+ "y": 0.47646161913871765
1290
+ },
1291
+ {
1292
+ "x": 0.5661333799362183,
1293
+ "y": 0.47646161913871765
1294
+ },
1295
+ {
1296
+ "x": 0.5661333799362183,
1297
+ "y": 0.4880504906177521
1298
+ },
1299
+ {
1300
+ "x": 0.5223215818405151,
1301
+ "y": 0.4880504906177521
1302
+ }
1303
+ ]
1304
+ }
1305
+ },
1306
+ {
1307
+ "text_prediction": {
1308
+ "text": "800 Nos",
1309
+ "confidence": 0.9594074433049907
1310
+ },
1311
+ "bounding_box": {
1312
+ "points": [
1313
+ {
1314
+ "x": 0.6346733570098877,
1315
+ "y": 0.4767352342605591
1316
+ },
1317
+ {
1318
+ "x": 0.7093831896781921,
1319
+ "y": 0.4767352342605591
1320
+ },
1321
+ {
1322
+ "x": 0.7093831896781921,
1323
+ "y": 0.489123672246933
1324
+ },
1325
+ {
1326
+ "x": 0.6346733570098877,
1327
+ "y": 0.489123672246933
1328
+ }
1329
+ ]
1330
+ }
1331
+ },
1332
+ {
1333
+ "text_prediction": {
1334
+ "text": "7,000.00 Nos",
1335
+ "confidence": 0.9584527258248451
1336
+ },
1337
+ "bounding_box": {
1338
+ "points": [
1339
+ {
1340
+ "x": 0.7318836450576782,
1341
+ "y": 0.4758611023426056
1342
+ },
1343
+ {
1344
+ "x": 0.8478441834449768,
1345
+ "y": 0.4758611023426056
1346
+ },
1347
+ {
1348
+ "x": 0.8478441834449768,
1349
+ "y": 0.4886285960674286
1350
+ },
1351
+ {
1352
+ "x": 0.7318836450576782,
1353
+ "y": 0.4886285960674286
1354
+ }
1355
+ ]
1356
+ }
1357
+ },
1358
+ {
1359
+ "text_prediction": {
1360
+ "text": "56,00,000.00",
1361
+ "confidence": 0.9667432010924752
1362
+ },
1363
+ "bounding_box": {
1364
+ "points": [
1365
+ {
1366
+ "x": 0.8713945150375366,
1367
+ "y": 0.4759562611579895
1368
+ },
1369
+ {
1370
+ "x": 0.9882799983024597,
1371
+ "y": 0.4759562611579895
1372
+ },
1373
+ {
1374
+ "x": 0.9882799983024597,
1375
+ "y": 0.4906408488750458
1376
+ },
1377
+ {
1378
+ "x": 0.8713945150375366,
1379
+ "y": 0.4906408488750458
1380
+ }
1381
+ ]
1382
+ }
1383
+ },
1384
+ {
1385
+ "text_prediction": {
1386
+ "text": "Batch Batch 01",
1387
+ "confidence": 0.9563061088001586
1388
+ },
1389
+ "bounding_box": {
1390
+ "points": [
1391
+ {
1392
+ "x": 0.052566081285476685,
1393
+ "y": 0.49364960193634033
1394
+ },
1395
+ {
1396
+ "x": 0.2010248452425003,
1397
+ "y": 0.49364960193634033
1398
+ },
1399
+ {
1400
+ "x": 0.2010248452425003,
1401
+ "y": 0.5049353837966919
1402
+ },
1403
+ {
1404
+ "x": 0.052566081285476685,
1405
+ "y": 0.5049353837966919
1406
+ }
1407
+ ]
1408
+ }
1409
+ },
1410
+ {
1411
+ "text_prediction": {
1412
+ "text": "800 Nos",
1413
+ "confidence": 0.9919929115369415
1414
+ },
1415
+ "bounding_box": {
1416
+ "points": [
1417
+ {
1418
+ "x": 0.6361280679702759,
1419
+ "y": 0.4936043322086334
1420
+ },
1421
+ {
1422
+ "x": 0.7088934183120728,
1423
+ "y": 0.4936043322086334
1424
+ },
1425
+ {
1426
+ "x": 0.7088934183120728,
1427
+ "y": 0.5049224495887756
1428
+ },
1429
+ {
1430
+ "x": 0.6361280679702759,
1431
+ "y": 0.5049224495887756
1432
+ }
1433
+ ]
1434
+ }
1435
+ },
1436
+ {
1437
+ "text_prediction": {
1438
+ "text": "86,00,000.00",
1439
+ "confidence": 0.9842838132991243
1440
+ },
1441
+ "bounding_box": {
1442
+ "points": [
1443
+ {
1444
+ "x": 0.8738434314727783,
1445
+ "y": 0.5180920958518982
1446
+ },
1447
+ {
1448
+ "x": 0.9862013459205627,
1449
+ "y": 0.5180920958518982
1450
+ },
1451
+ {
1452
+ "x": 0.9862013459205627,
1453
+ "y": 0.5329083204269409
1454
+ },
1455
+ {
1456
+ "x": 0.8738434314727783,
1457
+ "y": 0.5329083204269409
1458
+ }
1459
+ ]
1460
+ }
1461
+ },
1462
+ {
1463
+ "text_prediction": {
1464
+ "text": "Output CGST",
1465
+ "confidence": 0.9934323494471806
1466
+ },
1467
+ "bounding_box": {
1468
+ "points": [
1469
+ {
1470
+ "x": 0.3893723487854004,
1471
+ "y": 0.5444347858428955
1472
+ },
1473
+ {
1474
+ "x": 0.5159149765968323,
1475
+ "y": 0.5444347858428955
1476
+ },
1477
+ {
1478
+ "x": 0.5159149765968323,
1479
+ "y": 0.559859037399292
1480
+ },
1481
+ {
1482
+ "x": 0.3893723487854004,
1483
+ "y": 0.559859037399292
1484
+ }
1485
+ ]
1486
+ }
1487
+ },
1488
+ {
1489
+ "text_prediction": {
1490
+ "text": "5,16,000.00",
1491
+ "confidence": 0.948471019052513
1492
+ },
1493
+ "bounding_box": {
1494
+ "points": [
1495
+ {
1496
+ "x": 0.882830023765564,
1497
+ "y": 0.544172465801239
1498
+ },
1499
+ {
1500
+ "x": 0.9874396324157715,
1501
+ "y": 0.544172465801239
1502
+ },
1503
+ {
1504
+ "x": 0.9874396324157715,
1505
+ "y": 0.5583594441413879
1506
+ },
1507
+ {
1508
+ "x": 0.882830023765564,
1509
+ "y": 0.5583594441413879
1510
+ }
1511
+ ]
1512
+ }
1513
+ },
1514
+ {
1515
+ "text_prediction": {
1516
+ "text": "Output SGST",
1517
+ "confidence": 0.9673777637723977
1518
+ },
1519
+ "bounding_box": {
1520
+ "points": [
1521
+ {
1522
+ "x": 0.38919341564178467,
1523
+ "y": 0.5605734586715698
1524
+ },
1525
+ {
1526
+ "x": 0.5163915753364563,
1527
+ "y": 0.5605734586715698
1528
+ },
1529
+ {
1530
+ "x": 0.5163915753364563,
1531
+ "y": 0.5765719413757324
1532
+ },
1533
+ {
1534
+ "x": 0.38919341564178467,
1535
+ "y": 0.5765719413757324
1536
+ }
1537
+ ]
1538
+ }
1539
+ },
1540
+ {
1541
+ "text_prediction": {
1542
+ "text": "5,16,000.00",
1543
+ "confidence": 0.980095423116826
1544
+ },
1545
+ "bounding_box": {
1546
+ "points": [
1547
+ {
1548
+ "x": 0.8826514482498169,
1549
+ "y": 0.5595930218696594
1550
+ },
1551
+ {
1552
+ "x": 0.9880829453468323,
1553
+ "y": 0.5595930218696594
1554
+ },
1555
+ {
1556
+ "x": 0.9880829453468323,
1557
+ "y": 0.5761078000068665
1558
+ },
1559
+ {
1560
+ "x": 0.8826514482498169,
1561
+ "y": 0.5761078000068665
1562
+ }
1563
+ ]
1564
+ }
1565
+ },
1566
+ {
1567
+ "text_prediction": {
1568
+ "text": "Total",
1569
+ "confidence": 0.980284336818268
1570
+ },
1571
+ "bounding_box": {
1572
+ "points": [
1573
+ {
1574
+ "x": 0.47304680943489075,
1575
+ "y": 0.635934054851532
1576
+ },
1577
+ {
1578
+ "x": 0.5145511627197266,
1579
+ "y": 0.635934054851532
1580
+ },
1581
+ {
1582
+ "x": 0.5145511627197266,
1583
+ "y": 0.647700846195221
1584
+ },
1585
+ {
1586
+ "x": 0.47304680943489075,
1587
+ "y": 0.647700846195221
1588
+ }
1589
+ ]
1590
+ }
1591
+ },
1592
+ {
1593
+ "text_prediction": {
1594
+ "text": "1,300 Nos",
1595
+ "confidence": 0.9665856699530035
1596
+ },
1597
+ "bounding_box": {
1598
+ "points": [
1599
+ {
1600
+ "x": 0.6211447715759277,
1601
+ "y": 0.6362693905830383
1602
+ },
1603
+ {
1604
+ "x": 0.7112120389938354,
1605
+ "y": 0.6362693905830383
1606
+ },
1607
+ {
1608
+ "x": 0.7112120389938354,
1609
+ "y": 0.6496726870536804
1610
+ },
1611
+ {
1612
+ "x": 0.6211447715759277,
1613
+ "y": 0.6496726870536804
1614
+ }
1615
+ ]
1616
+ }
1617
+ },
1618
+ {
1619
+ "text_prediction": {
1620
+ "text": "& 96,32,000.00",
1621
+ "confidence": 0.7178395556659476
1622
+ },
1623
+ "bounding_box": {
1624
+ "points": [
1625
+ {
1626
+ "x": 0.8559603095054626,
1627
+ "y": 0.6357296109199524
1628
+ },
1629
+ {
1630
+ "x": 0.9889612793922424,
1631
+ "y": 0.6357296109199524
1632
+ },
1633
+ {
1634
+ "x": 0.9889612793922424,
1635
+ "y": 0.6526599526405334
1636
+ },
1637
+ {
1638
+ "x": 0.8559603095054626,
1639
+ "y": 0.6526599526405334
1640
+ }
1641
+ ]
1642
+ }
1643
+ },
1644
+ {
1645
+ "text_prediction": {
1646
+ "text": "Amount Chargeabb (in words)",
1647
+ "confidence": 0.7458904090016844
1648
+ },
1649
+ "bounding_box": {
1650
+ "points": [
1651
+ {
1652
+ "x": 0.00908560398966074,
1653
+ "y": 0.658886730670929
1654
+ },
1655
+ {
1656
+ "x": 0.23737633228302002,
1657
+ "y": 0.658886730670929
1658
+ },
1659
+ {
1660
+ "x": 0.23737633228302002,
1661
+ "y": 0.6715340614318848
1662
+ },
1663
+ {
1664
+ "x": 0.00908560398966074,
1665
+ "y": 0.6715340614318848
1666
+ }
1667
+ ]
1668
+ }
1669
+ },
1670
+ {
1671
+ "text_prediction": {
1672
+ "text": "E. OOE",
1673
+ "confidence": 0.6488621460480712
1674
+ },
1675
+ "bounding_box": {
1676
+ "points": [
1677
+ {
1678
+ "x": 0.9189229607582092,
1679
+ "y": 0.6583255529403687
1680
+ },
1681
+ {
1682
+ "x": 0.986831545829773,
1683
+ "y": 0.6583255529403687
1684
+ },
1685
+ {
1686
+ "x": 0.986831545829773,
1687
+ "y": 0.6695170998573303
1688
+ },
1689
+ {
1690
+ "x": 0.9189229607582092,
1691
+ "y": 0.6695170998573303
1692
+ }
1693
+ ]
1694
+ }
1695
+ },
1696
+ {
1697
+ "text_prediction": {
1698
+ "text": "INR Ninety Six Lakh Thirty Two Thousand Only",
1699
+ "confidence": 0.9691060759554155
1700
+ },
1701
+ "bounding_box": {
1702
+ "points": [
1703
+ {
1704
+ "x": 0.0098143694922328,
1705
+ "y": 0.6784484386444092
1706
+ },
1707
+ {
1708
+ "x": 0.4665473997592926,
1709
+ "y": 0.6784484386444092
1710
+ },
1711
+ {
1712
+ "x": 0.4665473997592926,
1713
+ "y": 0.6940909624099731
1714
+ },
1715
+ {
1716
+ "x": 0.0098143694922328,
1717
+ "y": 0.6940909624099731
1718
+ }
1719
+ ]
1720
+ }
1721
+ },
1722
+ {
1723
+ "text_prediction": {
1724
+ "text": "HSN/SAC",
1725
+ "confidence": 0.9810419788027331
1726
+ },
1727
+ "bounding_box": {
1728
+ "points": [
1729
+ {
1730
+ "x": 0.16349056363105774,
1731
+ "y": 0.7012380361557007
1732
+ },
1733
+ {
1734
+ "x": 0.24529074132442474,
1735
+ "y": 0.7012380361557007
1736
+ },
1737
+ {
1738
+ "x": 0.24529074132442474,
1739
+ "y": 0.7121337652206421
1740
+ },
1741
+ {
1742
+ "x": 0.16349056363105774,
1743
+ "y": 0.7121337652206421
1744
+ }
1745
+ ]
1746
+ }
1747
+ },
1748
+ {
1749
+ "text_prediction": {
1750
+ "text": "Taxable",
1751
+ "confidence": 0.9920273776814073
1752
+ },
1753
+ "bounding_box": {
1754
+ "points": [
1755
+ {
1756
+ "x": 0.44165319204330444,
1757
+ "y": 0.7013511657714844
1758
+ },
1759
+ {
1760
+ "x": 0.5068534016609192,
1761
+ "y": 0.7013511657714844
1762
+ },
1763
+ {
1764
+ "x": 0.5068534016609192,
1765
+ "y": 0.7120434641838074
1766
+ },
1767
+ {
1768
+ "x": 0.44165319204330444,
1769
+ "y": 0.7120434641838074
1770
+ }
1771
+ ]
1772
+ }
1773
+ },
1774
+ {
1775
+ "text_prediction": {
1776
+ "text": "Central Tax",
1777
+ "confidence": 0.9962700188729676
1778
+ },
1779
+ "bounding_box": {
1780
+ "points": [
1781
+ {
1782
+ "x": 0.5753797888755798,
1783
+ "y": 0.7011809349060059
1784
+ },
1785
+ {
1786
+ "x": 0.6723806262016296,
1787
+ "y": 0.7011809349060059
1788
+ },
1789
+ {
1790
+ "x": 0.6723806262016296,
1791
+ "y": 0.7118165493011475
1792
+ },
1793
+ {
1794
+ "x": 0.5753797888755798,
1795
+ "y": 0.7118165493011475
1796
+ }
1797
+ ]
1798
+ }
1799
+ },
1800
+ {
1801
+ "text_prediction": {
1802
+ "text": "State Tax",
1803
+ "confidence": 0.9868139611132721
1804
+ },
1805
+ "bounding_box": {
1806
+ "points": [
1807
+ {
1808
+ "x": 0.7587119936943054,
1809
+ "y": 0.7012291550636292
1810
+ },
1811
+ {
1812
+ "x": 0.8375822901725769,
1813
+ "y": 0.7012291550636292
1814
+ },
1815
+ {
1816
+ "x": 0.8375822901725769,
1817
+ "y": 0.7122592926025391
1818
+ },
1819
+ {
1820
+ "x": 0.7587119936943054,
1821
+ "y": 0.7122592926025391
1822
+ }
1823
+ ]
1824
+ }
1825
+ },
1826
+ {
1827
+ "text_prediction": {
1828
+ "text": "Total Tax Amount",
1829
+ "confidence": 0.9661923967019032
1830
+ },
1831
+ "bounding_box": {
1832
+ "points": [
1833
+ {
1834
+ "x": 0.8894091844558716,
1835
+ "y": 0.7013366222381592
1836
+ },
1837
+ {
1838
+ "x": 0.9872844815254211,
1839
+ "y": 0.7013366222381592
1840
+ },
1841
+ {
1842
+ "x": 0.9872844815254211,
1843
+ "y": 0.7289761900901794
1844
+ },
1845
+ {
1846
+ "x": 0.8894091844558716,
1847
+ "y": 0.7289761900901794
1848
+ }
1849
+ ]
1850
+ }
1851
+ },
1852
+ {
1853
+ "text_prediction": {
1854
+ "text": "Value",
1855
+ "confidence": 0.9865012394682803
1856
+ },
1857
+ "bounding_box": {
1858
+ "points": [
1859
+ {
1860
+ "x": 0.45505058765411377,
1861
+ "y": 0.7177771925926208
1862
+ },
1863
+ {
1864
+ "x": 0.5036299228668213,
1865
+ "y": 0.7177771925926208
1866
+ },
1867
+ {
1868
+ "x": 0.5036299228668213,
1869
+ "y": 0.7290788292884827
1870
+ },
1871
+ {
1872
+ "x": 0.45505058765411377,
1873
+ "y": 0.7290788292884827
1874
+ }
1875
+ ]
1876
+ }
1877
+ },
1878
+ {
1879
+ "text_prediction": {
1880
+ "text": "Rate",
1881
+ "confidence": 0.9943114966730643
1882
+ },
1883
+ "bounding_box": {
1884
+ "points": [
1885
+ {
1886
+ "x": 0.5533093810081482,
1887
+ "y": 0.7182002067565918
1888
+ },
1889
+ {
1890
+ "x": 0.5943268537521362,
1891
+ "y": 0.7182002067565918
1892
+ },
1893
+ {
1894
+ "x": 0.5943268537521362,
1895
+ "y": 0.7289373278617859
1896
+ },
1897
+ {
1898
+ "x": 0.5533093810081482,
1899
+ "y": 0.7289373278617859
1900
+ }
1901
+ ]
1902
+ }
1903
+ },
1904
+ {
1905
+ "text_prediction": {
1906
+ "text": "Amount",
1907
+ "confidence": 0.984620929436248
1908
+ },
1909
+ "bounding_box": {
1910
+ "points": [
1911
+ {
1912
+ "x": 0.6246328949928284,
1913
+ "y": 0.7184435129165649
1914
+ },
1915
+ {
1916
+ "x": 0.6924370527267456,
1917
+ "y": 0.7184435129165649
1918
+ },
1919
+ {
1920
+ "x": 0.6924370527267456,
1921
+ "y": 0.7288172245025635
1922
+ },
1923
+ {
1924
+ "x": 0.6246328949928284,
1925
+ "y": 0.7288172245025635
1926
+ }
1927
+ ]
1928
+ }
1929
+ },
1930
+ {
1931
+ "text_prediction": {
1932
+ "text": "Rate",
1933
+ "confidence": 0.9943974986516536
1934
+ },
1935
+ "bounding_box": {
1936
+ "points": [
1937
+ {
1938
+ "x": 0.724798858165741,
1939
+ "y": 0.7182520627975464
1940
+ },
1941
+ {
1942
+ "x": 0.765420138835907,
1943
+ "y": 0.7182520627975464
1944
+ },
1945
+ {
1946
+ "x": 0.765420138835907,
1947
+ "y": 0.7287726402282715
1948
+ },
1949
+ {
1950
+ "x": 0.724798858165741,
1951
+ "y": 0.7287726402282715
1952
+ }
1953
+ ]
1954
+ }
1955
+ },
1956
+ {
1957
+ "text_prediction": {
1958
+ "text": "Amount",
1959
+ "confidence": 0.9689141602727022
1960
+ },
1961
+ "bounding_box": {
1962
+ "points": [
1963
+ {
1964
+ "x": 0.7954637408256531,
1965
+ "y": 0.7183884978294373
1966
+ },
1967
+ {
1968
+ "x": 0.8636573553085327,
1969
+ "y": 0.7183884978294373
1970
+ },
1971
+ {
1972
+ "x": 0.8636573553085327,
1973
+ "y": 0.729090690612793
1974
+ },
1975
+ {
1976
+ "x": 0.7954637408256531,
1977
+ "y": 0.729090690612793
1978
+ }
1979
+ ]
1980
+ }
1981
+ },
1982
+ {
1983
+ "text_prediction": {
1984
+ "text": "8517",
1985
+ "confidence": 0.9958695765638759
1986
+ },
1987
+ "bounding_box": {
1988
+ "points": [
1989
+ {
1990
+ "x": 0.00888804066926241,
1991
+ "y": 0.7360969185829163
1992
+ },
1993
+ {
1994
+ "x": 0.053674690425395966,
1995
+ "y": 0.7360969185829163
1996
+ },
1997
+ {
1998
+ "x": 0.053674690425395966,
1999
+ "y": 0.7476891875267029
2000
+ },
2001
+ {
2002
+ "x": 0.00888804066926241,
2003
+ "y": 0.7476891875267029
2004
+ }
2005
+ ]
2006
+ }
2007
+ },
2008
+ {
2009
+ "text_prediction": {
2010
+ "text": "6%",
2011
+ "confidence": 0.9898573544000208
2012
+ },
2013
+ "bounding_box": {
2014
+ "points": [
2015
+ {
2016
+ "x": 0.5734968781471252,
2017
+ "y": 0.7361181378364563
2018
+ },
2019
+ {
2020
+ "x": 0.5999295711517334,
2021
+ "y": 0.7361181378364563
2022
+ },
2023
+ {
2024
+ "x": 0.5999295711517334,
2025
+ "y": 0.7472519278526306
2026
+ },
2027
+ {
2028
+ "x": 0.5734968781471252,
2029
+ "y": 0.7472519278526306
2030
+ }
2031
+ ]
2032
+ }
2033
+ },
2034
+ {
2035
+ "text_prediction": {
2036
+ "text": "16,000.00",
2037
+ "confidence": 0.8294777895263811
2038
+ },
2039
+ "bounding_box": {
2040
+ "points": [
2041
+ {
2042
+ "x": 0.6250989437103271,
2043
+ "y": 0.7361930012702942
2044
+ },
2045
+ {
2046
+ "x": 0.7050309181213379,
2047
+ "y": 0.7361930012702942
2048
+ },
2049
+ {
2050
+ "x": 0.7050309181213379,
2051
+ "y": 0.7478489279747009
2052
+ },
2053
+ {
2054
+ "x": 0.6250989437103271,
2055
+ "y": 0.7478489279747009
2056
+ }
2057
+ ]
2058
+ }
2059
+ },
2060
+ {
2061
+ "text_prediction": {
2062
+ "text": "6%",
2063
+ "confidence": 0.9313682929883089
2064
+ },
2065
+ "bounding_box": {
2066
+ "points": [
2067
+ {
2068
+ "x": 0.744483470916748,
2069
+ "y": 0.7360386252403259
2070
+ },
2071
+ {
2072
+ "x": 0.7708390355110168,
2073
+ "y": 0.7360386252403259
2074
+ },
2075
+ {
2076
+ "x": 0.7708390355110168,
2077
+ "y": 0.7472990155220032
2078
+ },
2079
+ {
2080
+ "x": 0.744483470916748,
2081
+ "y": 0.7472990155220032
2082
+ }
2083
+ ]
2084
+ }
2085
+ },
2086
+ {
2087
+ "text_prediction": {
2088
+ "text": "5. 16.000.00",
2089
+ "confidence": 0.6134680752426893
2090
+ },
2091
+ "bounding_box": {
2092
+ "points": [
2093
+ {
2094
+ "x": 0.7796189188957214,
2095
+ "y": 0.7359803318977356
2096
+ },
2097
+ {
2098
+ "x": 0.8791829347610474,
2099
+ "y": 0.7359803318977356
2100
+ },
2101
+ {
2102
+ "x": 0.8791829347610474,
2103
+ "y": 0.7479314208030701
2104
+ },
2105
+ {
2106
+ "x": 0.7796189188957214,
2107
+ "y": 0.7479314208030701
2108
+ }
2109
+ ]
2110
+ }
2111
+ },
2112
+ {
2113
+ "text_prediction": {
2114
+ "text": "10,32,000 00",
2115
+ "confidence": 0.7740012535843581
2116
+ },
2117
+ "bounding_box": {
2118
+ "points": [
2119
+ {
2120
+ "x": 0.8940484523773193,
2121
+ "y": 0.736034095287323
2122
+ },
2123
+ {
2124
+ "x": 0.986663281917572,
2125
+ "y": 0.736034095287323
2126
+ },
2127
+ {
2128
+ "x": 0.986663281917572,
2129
+ "y": 0.7475752234458923
2130
+ },
2131
+ {
2132
+ "x": 0.8940484523773193,
2133
+ "y": 0.7475752234458923
2134
+ }
2135
+ ]
2136
+ }
2137
+ },
2138
+ {
2139
+ "text_prediction": {
2140
+ "text": "Total",
2141
+ "confidence": 0.8811698785987037
2142
+ },
2143
+ "bounding_box": {
2144
+ "points": [
2145
+ {
2146
+ "x": 0.37188735604286194,
2147
+ "y": 0.7539958357810974
2148
+ },
2149
+ {
2150
+ "x": 0.41571375727653503,
2151
+ "y": 0.7539958357810974
2152
+ },
2153
+ {
2154
+ "x": 0.41571375727653503,
2155
+ "y": 0.7648097276687622
2156
+ },
2157
+ {
2158
+ "x": 0.37188735604286194,
2159
+ "y": 0.7648097276687622
2160
+ }
2161
+ ]
2162
+ }
2163
+ },
2164
+ {
2165
+ "text_prediction": {
2166
+ "text": "5,16,000.00",
2167
+ "confidence": 0.888774013856752
2168
+ },
2169
+ "bounding_box": {
2170
+ "points": [
2171
+ {
2172
+ "x": 0.60999596118927,
2173
+ "y": 0.7534650564193726
2174
+ },
2175
+ {
2176
+ "x": 0.7077035903930664,
2177
+ "y": 0.7534650564193726
2178
+ },
2179
+ {
2180
+ "x": 0.7077035903930664,
2181
+ "y": 0.7659627199172974
2182
+ },
2183
+ {
2184
+ "x": 0.60999596118927,
2185
+ "y": 0.7659627199172974
2186
+ }
2187
+ ]
2188
+ }
2189
+ },
2190
+ {
2191
+ "text_prediction": {
2192
+ "text": "5,16,000.00",
2193
+ "confidence": 0.9167779457246009
2194
+ },
2195
+ "bounding_box": {
2196
+ "points": [
2197
+ {
2198
+ "x": 0.7810338735580444,
2199
+ "y": 0.7537510395050049
2200
+ },
2201
+ {
2202
+ "x": 0.8799002766609192,
2203
+ "y": 0.7537510395050049
2204
+ },
2205
+ {
2206
+ "x": 0.8799002766609192,
2207
+ "y": 0.7657599449157715
2208
+ },
2209
+ {
2210
+ "x": 0.7810338735580444,
2211
+ "y": 0.7657599449157715
2212
+ }
2213
+ ]
2214
+ }
2215
+ },
2216
+ {
2217
+ "text_prediction": {
2218
+ "text": "10,32,000 00",
2219
+ "confidence": 0.6380294830123889
2220
+ },
2221
+ "bounding_box": {
2222
+ "points": [
2223
+ {
2224
+ "x": 0.8920122385025024,
2225
+ "y": 0.753795325756073
2226
+ },
2227
+ {
2228
+ "x": 0.9874867796897888,
2229
+ "y": 0.753795325756073
2230
+ },
2231
+ {
2232
+ "x": 0.9874867796897888,
2233
+ "y": 0.7648268342018127
2234
+ },
2235
+ {
2236
+ "x": 0.8920122385025024,
2237
+ "y": 0.7648268342018127
2238
+ }
2239
+ ]
2240
+ }
2241
+ },
2242
+ {
2243
+ "text_prediction": {
2244
+ "text": "TaxAmount (in words) INR Ten Lakh Thirty Two Thousand Only",
2245
+ "confidence": 0.9471898371843542
2246
+ },
2247
+ "bounding_box": {
2248
+ "points": [
2249
+ {
2250
+ "x": 0.01474696770310402,
2251
+ "y": 0.7791135311126709
2252
+ },
2253
+ {
2254
+ "x": 0.5943865776062012,
2255
+ "y": 0.7791135311126709
2256
+ },
2257
+ {
2258
+ "x": 0.5943865776062012,
2259
+ "y": 0.7946128249168396
2260
+ },
2261
+ {
2262
+ "x": 0.01474696770310402,
2263
+ "y": 0.7946128249168396
2264
+ }
2265
+ ]
2266
+ }
2267
+ },
2268
+ {
2269
+ "text_prediction": {
2270
+ "text": "We declare that this invoice shows the actual price of the goods described and that all particulars are true and",
2271
+ "confidence": 0.8817335803698501
2272
+ },
2273
+ "bounding_box": {
2274
+ "points": [
2275
+ {
2276
+ "x": 0.009751131758093834,
2277
+ "y": 0.9216299653053284
2278
+ },
2279
+ {
2280
+ "x": 0.44464147090911865,
2281
+ "y": 0.9216299653053284
2282
+ },
2283
+ {
2284
+ "x": 0.44464147090911865,
2285
+ "y": 0.9466809034347534
2286
+ },
2287
+ {
2288
+ "x": 0.009751131758093834,
2289
+ "y": 0.9466809034347534
2290
+ }
2291
+ ]
2292
+ }
2293
+ },
2294
+ {
2295
+ "text_prediction": {
2296
+ "text": "Declrrati on",
2297
+ "confidence": 0.4428644013810705
2298
+ },
2299
+ "bounding_box": {
2300
+ "points": [
2301
+ {
2302
+ "x": 0.00984328892081976,
2303
+ "y": 0.9073731899261475
2304
+ },
2305
+ {
2306
+ "x": 0.09447497874498367,
2307
+ "y": 0.9073731899261475
2308
+ },
2309
+ {
2310
+ "x": 0.09447497874498367,
2311
+ "y": 0.9169482588768005
2312
+ },
2313
+ {
2314
+ "x": 0.00984328892081976,
2315
+ "y": 0.9169482588768005
2316
+ }
2317
+ ]
2318
+ }
2319
+ },
2320
+ {
2321
+ "text_prediction": {
2322
+ "text": "for Ace Mobile Manufacturer Pvt Ltd",
2323
+ "confidence": 0.9459464049877715
2324
+ },
2325
+ "bounding_box": {
2326
+ "points": [
2327
+ {
2328
+ "x": 0.7023715376853943,
2329
+ "y": 0.9086831212043762
2330
+ },
2331
+ {
2332
+ "x": 0.9591567516326904,
2333
+ "y": 0.9086831212043762
2334
+ },
2335
+ {
2336
+ "x": 0.9591567516326904,
2337
+ "y": 0.9185181260108948
2338
+ },
2339
+ {
2340
+ "x": 0.7023715376853943,
2341
+ "y": 0.9185181260108948
2342
+ }
2343
+ ]
2344
+ }
2345
+ },
2346
+ {
2347
+ "text_prediction": {
2348
+ "text": "correct.",
2349
+ "confidence": 0.9110010391122708
2350
+ },
2351
+ "bounding_box": {
2352
+ "points": [
2353
+ {
2354
+ "x": 0.00944944005459547,
2355
+ "y": 0.9503763318061829
2356
+ },
2357
+ {
2358
+ "x": 0.06745915114879608,
2359
+ "y": 0.9503763318061829
2360
+ },
2361
+ {
2362
+ "x": 0.06745915114879608,
2363
+ "y": 0.9595006704330444
2364
+ },
2365
+ {
2366
+ "x": 0.00944944005459547,
2367
+ "y": 0.9595006704330444
2368
+ }
2369
+ ]
2370
+ }
2371
+ },
2372
+ {
2373
+ "text_prediction": {
2374
+ "text": "Authorised Signatory",
2375
+ "confidence": 0.7263097932748992
2376
+ },
2377
+ "bounding_box": {
2378
+ "points": [
2379
+ {
2380
+ "x": 0.8293008804321289,
2381
+ "y": 0.9506232142448425
2382
+ },
2383
+ {
2384
+ "x": 0.983968198299408,
2385
+ "y": 0.9506232142448425
2386
+ },
2387
+ {
2388
+ "x": 0.983968198299408,
2389
+ "y": 0.9630130529403687
2390
+ },
2391
+ {
2392
+ "x": 0.8293008804321289,
2393
+ "y": 0.9630130529403687
2394
+ }
2395
+ ]
2396
+ }
2397
+ },
2398
+ {
2399
+ "text_prediction": {
2400
+ "text": "This is a Computer Generated Invoice",
2401
+ "confidence": 0.9350738720344235
2402
+ },
2403
+ "bounding_box": {
2404
+ "points": [
2405
+ {
2406
+ "x": 0.3336789011955261,
2407
+ "y": 0.9751470685005188
2408
+ },
2409
+ {
2410
+ "x": 0.6538276076316833,
2411
+ "y": 0.9751470685005188
2412
+ },
2413
+ {
2414
+ "x": 0.6538276076316833,
2415
+ "y": 0.9885896444320679
2416
+ },
2417
+ {
2418
+ "x": 0.3336789011955261,
2419
+ "y": 0.9885896444320679
2420
+ }
2421
+ ]
2422
+ }
2423
+ }
2424
+ ]
2425
+ }
2426
+ ],
2427
+ "usage": {
2428
+ "images_size_mb": 0.08258438110351562
2429
+ }
2430
+ }
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ fastapi
2
+ uvicorn
3
+ requests
4
+ pydantic
5
+ python-multipart