Spaces:
Runtime error
Runtime error
Niv Sardi
commited on
Commit
Β·
bbaa3e0
1
Parent(s):
e04a33d
train
Browse filesSigned-off-by: Niv Sardi <[email protected]>
- python/write_data.py +2 -2
- run.sh +5 -1
python/write_data.py
CHANGED
@@ -19,9 +19,9 @@ names: {names}
|
|
19 |
if __name__ == '__main__':
|
20 |
parser = argparse.ArgumentParser(description='creates a YOLOv5 data.yaml')
|
21 |
parser.add_argument('csv', metavar='csv', type=str,
|
22 |
-
|
23 |
parser.add_argument('--data', metavar='data', type=str,
|
24 |
-
help='data path', default=
|
25 |
args = parser.parse_args()
|
26 |
bcos = entity.read_entities(args.csv)
|
27 |
print(gen_data_yaml(bcos, args.data))
|
|
|
19 |
if __name__ == '__main__':
|
20 |
parser = argparse.ArgumentParser(description='creates a YOLOv5 data.yaml')
|
21 |
parser.add_argument('csv', metavar='csv', type=str,
|
22 |
+
help='csv file', default=defaults.MAIN_CSV_PATH)
|
23 |
parser.add_argument('--data', metavar='data', type=str,
|
24 |
+
help='data path', default=defaults.DATA_PATH)
|
25 |
args = parser.parse_args()
|
26 |
bcos = entity.read_entities(args.csv)
|
27 |
print(gen_data_yaml(bcos, args.data))
|
run.sh
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
#!/bin/sh
|
2 |
|
|
|
|
|
3 |
PY=python3
|
|
|
4 |
echo "π fetching entities"
|
5 |
${PY} ./python/get_entities.py
|
6 |
echo "π getting vendor data"
|
@@ -9,4 +12,5 @@ echo "β¨ augmenting data"
|
|
9 |
${PY} ./python/augment.py
|
10 |
echo "πΌ croping augmented data"
|
11 |
${PY} ./python/crop.py ./data/augmented/images
|
12 |
-
echo "
|
|
|
|
1 |
#!/bin/sh
|
2 |
|
3 |
+
set -e
|
4 |
+
|
5 |
PY=python3
|
6 |
+
|
7 |
echo "π fetching entities"
|
8 |
${PY} ./python/get_entities.py
|
9 |
echo "π getting vendor data"
|
|
|
12 |
${PY} ./python/augment.py
|
13 |
echo "πΌ croping augmented data"
|
14 |
${PY} ./python/crop.py ./data/augmented/images
|
15 |
+
echo "π§ train model"
|
16 |
+
sh train.sh
|