MCPcopy
hub / github.com/magicleap/Atlas / load_info_json

Function load_info_json

atlas/data.py:30–39  ·  view source on GitHub ↗

Open a json info_file and do a bit of preprocessing

(json_file)

Source from the content-addressed store, hash-verified

28DEPTH_SHIFT = 1000
29
30def 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
42def map_frame(frame, frame_types=[]):

Callers 6

processFunction · 0.90
eval_sceneFunction · 0.90
fuse_sceneFunction · 0.90
label_sceneFunction · 0.90
__init__Method · 0.85
__getitem__Method · 0.85

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected