Open a json info_file and do a bit of preprocessing
(json_file)
| 28 | DEPTH_SHIFT = 1000 |
| 29 | |
| 30 | def load_info_json(json_file): |
| 31 | """ Open a json info_file and do a bit of preprocessing""" |
| 32 | |
| 33 | info = json.load(open(json_file,'r')) |
| 34 | if 'instances' in info and info['instances'] is not None: |
| 35 | # json doesn't store keys as ints so we cast here |
| 36 | info['instances'] = {int(k):v for k,v in info['instances'].items()} |
| 37 | else: |
| 38 | info['instances'] = None |
| 39 | return info |
| 40 | |
| 41 | |
| 42 | def map_frame(frame, frame_types=[]): |
no test coverage detected