Detect Text and Entities in Business Cards

To return text for a business card, specify a modelId of OCRModel and task parameter of contact. In addition to the text, the model returns the entity type for each text element that it detects.

BusinessCardOriginal

The cURL call looks like this.

1curl -X POST -H "Authorization: Bearer <TOKEN>" -F sampleLocation="https://www.asianbusinesscards.com/wp-content/uploads/2019/03/chinese-business-card-translation-samples-walmart-890-eng.jpg" -F task="contact" -F modelId="OCRModel" https://api.einstein.ai/v2/vision/ocr

BusinessCardOCRWithCallouts

The response looks like this JSON.

1"tag": "OTHER"
2      }
3    },
4    {
5      "probability": 0.9989197,
6      "label": "Director Operations and Logistics",
7      "boundingBox": {
8        "minX": 53,
9        "minY": 105,
10        "maxX": 466,
11        "maxY": 134
12      },
13      "attributes": {
14        "tag": "OTHER",
15        "pageNumber": "1"
16      }
17    },
18    {
19      "probability": 0.9978701,
20      "label": "Randy E. Cornwell",
21      "boundingBox": {
22        "minX": 53,
23        "minY": 73,
24        "maxX": 297,
25        "maxY": 103
26      },
27      "attributes": {
28        "tag": "PERSON",
29        "pageNumber": "1"
30      }
31    },
32    {
33      "probability": 0.99883646,
34      "label": "S-1050-06 Headquarters Building",
35      "boundingBox": {
36        "minX": 55,
37        "minY": 384,
38        "maxX": 467,
39        "maxY": 413
40      },
41      "attributes": {
42        "tag": "OTHER",
43        "pageNumber": "1"
44      }
45    },
46    {
47      "probability": 0.9981871,
48      "label": "Houston TX 77042 USA 2881 CityWest Blvd.",
49      "boundingBox": {
50        "minX": 53,
51        "minY": 416,
52        "maxX": 350,
53        "maxY": 472
54      },
55      "attributes": {
56        "tag": "ADDRESS",
57        "pageNumber": "1"
58      }
59    },
60    {
61      "probability": 0.9984518,
62      "label": "284.575.2884",
63      "boundingBox": {
64        "minX": 547,
65        "minY": 384,
66        "maxX": 820,
67        "maxY": 412
68      },
69      "attributes": {
70        "tag": "PHONE",
71        "pageNumber": "1"
72      }
73    },
74    {
75      "probability": 0.9984518,
76      "label": "phone ",
77      "boundingBox": {
78        "minX": 547,
79        "minY": 384,
80        "maxX": 820,
81        "maxY": 412
82      },
83      "attributes": {
84        "tag": "OTHER",
85        "pageNumber": "1"
86      }
87    },
88    {
89      "probability": 0.9973475,
90      "label": "281.889.0997",
91      "boundingBox": {
92        "minX": 541,
93        "minY": 415,
94        "maxX": 825,
95        "maxY": 439
96      },
97      "attributes": {
98        "tag": "MOBILE_PHONE",
99        "pageNumber": "1"
100      }
101    },
102    {
103      "probability": 0.9973475,
104      "label": "mobile ",
105      "boundingBox": {
106        "minX": 541,
107        "minY": 415,
108        "maxX": 825,
109        "maxY": 439
110      },
111      "attributes": {
112        "tag": "OTHER",
113        "pageNumber": "1"
114      }
115    },
116    {
117      "probability": 0.89205074,
118      "label": "re.comwell@phillips86.com",
119      "boundingBox": {
120        "minX": 478,
121        "minY": 444,
122        "maxX": 782,
123        "maxY": 476
124      },
125      "attributes": {
126        "tag": "EMAIL",
127        "pageNumber": "1"
128      }
129    },
130    {
131      "probability": 0.992919,
132      "label": "Phillips",
133      "boundingBox": {
134        "minX": 692,
135        "minY": 79,
136        "maxX": 780,
137        "maxY": 100
138      },
139      "attributes": {
140        "tag": "OTHER",
141        "pageNumber": "1"
142      }
143    },
144    {
145      "probability": 0.90038645,
146      "label": "66",
147      "boundingBox": {
148        "minX": 693,
149        "minY": 113,
150        "maxX": 777,
151        "maxY": 162
152      },
153      "attributes": {
154        "tag": "OTHER",
155        "pageNumber": "1"
156      }
157    },
158    {
159      "probability": 0.9908977,
160      "label": "Phillips66.com",
161      "boundingBox": {
162        "minX": 53,
163        "minY": 198,
164        "maxX": 238,
165        "maxY": 226
166      },
167      "attributes": {
168        "tag": "WEBSITE",
169        "pageNumber": "1"
170      }
171    },
172    {
173      "probability": 0.89205074,
174      "label": "phillips86",
175      "boundingBox": {
176        "minX": 630,
177        "minY": 444,
178        "maxX": 782,
179        "maxY": 476
180      },
181      "attributes": {
182        "tag": "ORG",
183        "pageNumber": "1"
184      }
185    }
186  ],
187  "object": "predictresponse"
188}