-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
45 lines (38 loc) · 1.15 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ---------------
# Author: Jash Shah
# Project: OID v4
# ---------------
"""
OID v4 Downloader
Download specific classes of the huge online dataset Open Image Dataset.
Licensed under the MIT License (see LICENSE for details)
------------------------------------------------------------
Usage:
refer to README.md file
"""
from sys import exit
from textwrap import dedent
from modules.parser import *
from modules.utils import *
from modules.downloader import *
from modules.show import *
from modules.csv_downloader import *
from modules.bounding_boxes import *
from modules.image_level import *
from modules.resumer import *
ROOT_DIR = ''
DEFAULT_OID_DIR = os.path.join(ROOT_DIR, 'OID')
if __name__ == '__main__':
args = parser_arguments()
if(args.resume):
args = resume_last_state()
bounding_boxes_images(args, DEFAULT_OID_DIR)
else:
num = len(args.classes)
for i in range(num):
args = resume(args)
if args.command == 'downloader_ill':
image_level(args, DEFAULT_OID_DIR)
else:
bounding_boxes_images(args, DEFAULT_OID_DIR)
print("\n Done \n")