MCPcopy
hub / github.com/dbolya/yolact / print_maps

Function print_maps

eval.py:1034–1045  ·  view source on GitHub ↗
(all_maps)

Source from the content-addressed store, hash-verified

1032 return all_maps
1033
1034def print_maps(all_maps):
1035 # Warning: hacky
1036 make_row = lambda vals: (' %5s |' * len(vals)) % tuple(vals)
1037 make_sep = lambda n: ('-------+' * n)
1038
1039 print()
1040 print(make_row([''] + [('.%d ' % x if isinstance(x, int) else x + ' ') for x in all_maps['box'].keys()]))
1041 print(make_sep(len(all_maps['box']) + 1))
1042 for iou_type in ('box', 'mask'):
1043 print(make_row([iou_type] + ['%.2f' % x if x < 100 else '%.1f' % x for x in all_maps[iou_type].values()]))
1044 print(make_sep(len(all_maps['box']) + 1))
1045 print()
1046
1047
1048

Callers 1

calc_mapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected