(vis, fname)
| 54 | metadata = MetadataCatalog.get(cfg.DATASETS.TRAIN[0]) |
| 55 | |
| 56 | def output(vis, fname): |
| 57 | if args.show: |
| 58 | print(fname) |
| 59 | cv2.imshow("window", vis.get_image()[:, :, ::-1]) |
| 60 | cv2.waitKey() |
| 61 | else: |
| 62 | filepath = os.path.join(dirname, fname) |
| 63 | print("Saving to {} ...".format(filepath)) |
| 64 | vis.save(filepath) |
| 65 | |
| 66 | scale = 2.0 if args.show else 1.0 |
| 67 | if args.source == "dataloader": |
no test coverage detected