-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson_read.py
33 lines (28 loc) · 1.71 KB
/
json_read.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from operator import itemgetter
# print(lst1,lst2)
#
# for i in img_list:
#
# res = performDetect(imagePath=i,\
# thresh=0.05,\
# configPath='/net/store/ni/users/fkhalil/TF/InvRecog/darknet/data/custom_data/yolo-obj.cfg',\
# weightPath='./backup/yolo-obj_best.weights',\
# metaPath='./data/custom_data/obj.data',\
# showImage=True)
# res=list([('col_head', 0.782261312007904, (20.399738311767578, 12.201090812683105, 22.087156295776367, 10.5056734085083)),\
# ('cell', 0.7683567404747009, (24.096752166748047, 51.644474029541016, 10.314186096191406, 10.887340545654297)), \
# ('cell', 0.7427547574043274, (22.41269302368164, 29.27391815185547, 8.568817138671875, 10.383925437927246))])
# a= sorted(res,key=lambda x:x[2][0])
# print(a)
#print(res[0][2][0])
# result=[('receiver_add', 0.999560534954071, (806.5712280273438, 1579.184814453125, 1067.317626953125, 579.9492797851562)), \
# ('des_table', 0.9980347156524658, (2530.698974609375, 3279.13671875, 4566.5556640625, 1477.3072509765625))]
# print(result[0][2])
# if res[0][0]= 'reciver_addd':
# coor= res[0][2]
# col_list=[(3519.455078125, 292.5462646484375, 837.1055297851562, 562.5169677734375), (1309.7215576171875, 292.2952880859375, 1223.720458984375, 580.8318481445312), (2842.430419921875, 299.1073913574219, 409.482177734375, 539.3680419921875), (306.1327819824219, 326.8313293457031, 485.25701904296875, 574.6454467773438), (2316.4072265625, 324.6714172363281, 374.2842102050781, 555.0231323242188), \
# (4290.1611328125, 286.68585205078125, 463.01806640625, 590.701171875)]
# sorted_list= sorted(col_list,key=lambda x:x[0])
# print(sorted_list[0][0])
lst=[]
print(len(lst))