()
| 171 | |
| 172 | |
| 173 | def 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 | |
| 198 | if __name__ == "__main__": |
| 199 | main() |
no test coverage detected