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

Function main

evaluate.py:173–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171
172
173def main():
174 parser = argparse.ArgumentParser(description="Atlas Testing")
175 parser.add_argument("--model", required=True, metavar="FILE",
176 help="path to checkpoint")
177 parser.add_argument("--scenes", default="data/scannet_test.txt",
178 help="which scene(s) to run on")
179 args = parser.parse_args()
180
181 # get all the info_file.json's from the command line
182 # .txt files contain a list of info_file.json's
183 info_files = parse_splits_list(args.scenes)
184 # info_files=[info_files[0]]
185
186 metrics = {}
187 for i, info_file in enumerate(info_files):
188 # run model on each scene
189 scene, temp = process(info_file, args.model, i, len(info_files))
190 metrics[scene] = temp
191
192 rslt_file = os.path.join(args.model, 'metrics.json')
193 json.dump(metrics, open(rslt_file, 'w'))
194
195 # display results
196 visualize(rslt_file)
197
198if __name__ == "__main__":
199 main()

Callers 1

evaluate.pyFile · 0.70

Calls 3

parse_splits_listFunction · 0.90
visualizeFunction · 0.90
processFunction · 0.70

Tested by

no test coverage detected