| 68 | |
| 69 | |
| 70 | def parse_args(): |
| 71 | parser = argparse.ArgumentParser(description='COCO Folder to LMDB.') |
| 72 | parser.add_argument('-j', '--json-dir', type=str, |
| 73 | default='', |
| 74 | help='the name of json file.') |
| 75 | parser.add_argument('-i', '--img-dir', type=str, |
| 76 | default='refcoco+', |
| 77 | help='the folder of images.') |
| 78 | parser.add_argument('-m', '--mask-dir', type=str, |
| 79 | default='refcoco+', |
| 80 | help='the folder of masks.') |
| 81 | parser.add_argument('-o', '--output-dir', type=str, |
| 82 | default='refcoco+', |
| 83 | help='the folder of output lmdb file.') |
| 84 | parser.add_argument('-s', '--split', type=str, |
| 85 | default='train', |
| 86 | help='the split type.') |
| 87 | args = parser.parse_args() |
| 88 | return args |
| 89 | |
| 90 | |
| 91 | if __name__ == '__main__': |