@@ -45,24 +45,24 @@ def mock_detection_response():
4545 "name" : "117319856-fc35bf00-ae8b-11eb-9b51-ca5aba673466.jpg" ,
4646 "geometries" : [
4747 [
48+ 0.8203927977629988 ,
49+ 0.2021484375 ,
4850 0.8203927977629988 ,
4951 0.181640625 ,
5052 0.906015010958283 ,
5153 0.181640625 ,
5254 0.906015010958283 ,
5355 0.2021484375 ,
54- 0.8203927977629988 ,
55- 0.2021484375 ,
5656 ],
5757 [
58+ 0.7467381290758103 ,
59+ 0.20086261630058289 ,
5860 0.7482568619833604 ,
5961 0.17938309907913208 ,
6062 0.8208542842026056 ,
6163 0.1819499135017395 ,
6264 0.8193355512950555 ,
6365 0.2034294307231903 ,
64- 0.7467381290758103 ,
65- 0.20086261630058289 ,
6666 ],
6767 ],
6868 },
@@ -82,18 +82,18 @@ def mock_kie_response():
8282 "class_name" : "words" ,
8383 "items" : [
8484 {
85- "value" : "world!" ,
85+ "confidence" : 0.99 ,
86+ "crop_orientation" : {"confidence" : None , "value" : 0 },
8687 "geometry" : [0.8203927977629988 , 0.181640625 , 0.9087770178355502 , 0.2041015625 ],
8788 "objectness_score" : 0.46 ,
88- "confidence" : 0.94 ,
89- "crop_orientation" : {"value" : 0 , "confidence" : None },
89+ "value" : "world!" ,
9090 },
9191 {
92- "value" : "Hello" ,
92+ "confidence" : 0.99 ,
93+ "crop_orientation" : {"confidence" : None , "value" : 0 },
9394 "geometry" : [0.7471996155154171 , 0.1806640625 , 0.8245358080788996 , 0.2060546875 ],
9495 "objectness_score" : 0.46 ,
95- "confidence" : 0.66 ,
96- "crop_orientation" : {"value" : 0 , "confidence" : None },
96+ "value" : "Hello" ,
9797 },
9898 ],
9999 }
@@ -109,7 +109,8 @@ def mock_kie_response():
109109 "class_name" : "words" ,
110110 "items" : [
111111 {
112- "value" : "world!" ,
112+ "confidence" : 1.0 ,
113+ "crop_orientation" : {"confidence" : 1.0 , "value" : 90 },
113114 "geometry" : [
114115 0.8203927977629988 ,
115116 0.181640625 ,
@@ -121,11 +122,11 @@ def mock_kie_response():
121122 0.2021484375 ,
122123 ],
123124 "objectness_score" : 0.52 ,
124- "confidence" : 1 ,
125- "crop_orientation" : {"value" : 0 , "confidence" : 1 },
125+ "value" : "world!" ,
126126 },
127127 {
128- "value" : "Hello" ,
128+ "confidence" : 0.9 ,
129+ "crop_orientation" : {"confidence" : 1.0 , "value" : 90 },
129130 "geometry" : [
130131 0.7482568619833604 ,
131132 0.17938309907913208 ,
@@ -137,8 +138,7 @@ def mock_kie_response():
137138 0.20086261630058289 ,
138139 ],
139140 "objectness_score" : 0.57 ,
140- "confidence" : 0.65 ,
141- "crop_orientation" : {"value" : 0 , "confidence" : 1 },
141+ "value" : "Hello" ,
142142 },
143143 ],
144144 }
@@ -160,39 +160,39 @@ def mock_ocr_response():
160160 "blocks" : [
161161 {
162162 "geometry" : [0.7471996155154171 , 0.1806640625 , 0.9087770178355502 , 0.2060546875 ],
163- "objectness_score" : 0.46 ,
164163 "lines" : [
165164 {
166165 "geometry" : [0.7471996155154171 , 0.1806640625 , 0.9087770178355502 , 0.2060546875 ],
167166 "objectness_score" : 0.46 ,
168167 "words" : [
169168 {
170- "value" : "Hello" ,
169+ "confidence" : 0.99 ,
170+ "crop_orientation" : {"confidence" : None , "value" : 0 },
171171 "geometry" : [
172172 0.7471996155154171 ,
173173 0.1806640625 ,
174174 0.8245358080788996 ,
175175 0.2060546875 ,
176176 ],
177177 "objectness_score" : 0.46 ,
178- "confidence" : 0.66 ,
179- "crop_orientation" : {"value" : 0 , "confidence" : None },
178+ "value" : "Hello" ,
180179 },
181180 {
182- "value" : "world!" ,
181+ "confidence" : 0.99 ,
182+ "crop_orientation" : {"confidence" : None , "value" : 0 },
183183 "geometry" : [
184184 0.8203927977629988 ,
185185 0.181640625 ,
186186 0.9087770178355502 ,
187187 0.2041015625 ,
188188 ],
189189 "objectness_score" : 0.46 ,
190- "confidence" : 0.94 ,
191- "crop_orientation" : {"value" : 0 , "confidence" : None },
190+ "value" : "world!" ,
192191 },
193192 ],
194193 }
195194 ],
195+ "objectness_score" : 0.46 ,
196196 }
197197 ]
198198 }
@@ -208,32 +208,32 @@ def mock_ocr_response():
208208 "blocks" : [
209209 {
210210 "geometry" : [
211+ 0.9052250981330872 ,
212+ 0.20474359393119812 ,
211213 0.7460642457008362 ,
212214 0.2017778754234314 ,
213215 0.7464945912361145 ,
214216 0.17868199944496155 ,
215217 0.9056554436683655 ,
216218 0.18164771795272827 ,
217- 0.9052250981330872 ,
218- 0.20474359393119812 ,
219219 ],
220- "objectness_score" : 0.54 ,
221220 "lines" : [
222221 {
223222 "geometry" : [
223+ 0.9052250981330872 ,
224+ 0.20474359393119812 ,
224225 0.7460642457008362 ,
225226 0.2017778754234314 ,
226227 0.7464945912361145 ,
227228 0.17868199944496155 ,
228229 0.9056554436683655 ,
229230 0.18164771795272827 ,
230- 0.9052250981330872 ,
231- 0.20474359393119812 ,
232231 ],
233232 "objectness_score" : 0.54 ,
234233 "words" : [
235234 {
236- "value" : "Hello" ,
235+ "confidence" : 0.9 ,
236+ "crop_orientation" : {"confidence" : 1.0 , "value" : 90 },
237237 "geometry" : [
238238 0.7482568619833604 ,
239239 0.17938309907913208 ,
@@ -245,11 +245,11 @@ def mock_ocr_response():
245245 0.20086261630058289 ,
246246 ],
247247 "objectness_score" : 0.57 ,
248- "confidence" : 0.65 ,
249- "crop_orientation" : {"value" : 0 , "confidence" : 1 },
248+ "value" : "Hello" ,
250249 },
251250 {
252- "value" : "world!" ,
251+ "confidence" : 1.0 ,
252+ "crop_orientation" : {"confidence" : 1.0 , "value" : 90 },
253253 "geometry" : [
254254 0.8203927977629988 ,
255255 0.181640625 ,
@@ -261,12 +261,12 @@ def mock_ocr_response():
261261 0.2021484375 ,
262262 ],
263263 "objectness_score" : 0.52 ,
264- "confidence" : 1 ,
265- "crop_orientation" : {"value" : 0 , "confidence" : 1 },
264+ "value" : "world!" ,
266265 },
267266 ],
268267 }
269268 ],
269+ "objectness_score" : 0.54 ,
270270 }
271271 ]
272272 }
0 commit comments