(file_path: str)
| 10 | import cv2 |
| 11 | |
| 12 | def load_json(file_path: str): |
| 13 | file_path = pathlib.Path(file_path) |
| 14 | with open(file_path, 'rb') as f: |
| 15 | content = f.read() |
| 16 | return ujson.loads(content) |
| 17 | |
| 18 | |
| 19 | def generate_mask(trans_image, im_shape, resolution, polygon, location): |