Niv Sardi commited on
Commit
1f73e71
1 Parent(s): cd1bbe4

update reqs

Browse files

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>

Files changed (1) hide show
  1. python/write_data.py +7 -1
python/write_data.py CHANGED
@@ -1,5 +1,7 @@
1
  import csv
2
  import entity
 
 
3
  from common import defaults
4
 
5
  def gen_data_yaml(bcos):
@@ -13,5 +15,9 @@ names: [{names}]
13
  '''
14
 
15
  if __name__ == '__main__':
16
- bcos = entity.read_entities(defaults.MAIN_CSV_PATH)
 
 
 
 
17
  print(gen_data_yaml(bcos))
 
1
  import csv
2
  import entity
3
+ import argparse
4
+
5
  from common import defaults
6
 
7
  def gen_data_yaml(bcos):
 
15
  '''
16
 
17
  if __name__ == '__main__':
18
+ parser = argparse.ArgumentParser(description='creates a YOLOv5 data.yaml')
19
+ parser.add_argument('csv', metavar='csv', type=str,
20
+ help='csv file')
21
+ args = parser.parse_args()
22
+ bcos = entity.read_entities(args.csv)
23
  print(gen_data_yaml(bcos))