File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
src/dataset_image_annotator Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+
3
+ async def upload_raw_file (address : str , raw_file ):
4
+ pass
Original file line number Diff line number Diff line change
1
+ import argparse
2
+ import asyncio
3
+ from pathlib import Path
4
+
5
+ from dataset_image_annotator .api .client import annotator
6
+
7
+
8
+ def get_parsed_args ():
9
+ parser = argparse .ArgumentParser (add_help = False )
10
+ parser .add_argument ('-a' , '--annotator-server-address' , type = str )
11
+ parser .add_argument ('-d' , '--data-root' , type = str )
12
+
13
+ args , args_other = parser .parse_known_args ()
14
+
15
+ return args
16
+
17
+
18
+ async def main ():
19
+ args = get_parsed_args ()
20
+ annotator_server_address = args .annotator_server_address
21
+ data_root_path = Path (args .data_root ).expanduser ()
22
+
23
+ for raw_image in data_root_path :
24
+ await annotator .upload_raw_file (annotator_server_address , raw_image )
25
+
26
+ return True
27
+
28
+
29
+ if __name__ == '__main__' :
30
+ asyncio .run (main ())
You can’t perform that action at this time.
0 commit comments