From 6943e6eea0eee1ccf3ee9034699b6a94f334b003 Mon Sep 17 00:00:00 2001
From: Constantin Wenger <constantin.wenger@googlemail.com>
Date: Tue, 01 Feb 2022 11:38:21 +0000
Subject: [PATCH] added option to load from streams added option to set crop x and crop y added option to set percentage a card must take up added ability to scroll detected cards list with o and p added ability to remove topmost shown detected card with u
---
setup_train.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/setup_train.py b/setup_train.py
index 18c83ee..27005c5 100644
--- a/setup_train.py
+++ b/setup_train.py
@@ -1,13 +1,14 @@
-import os
from glob import glob
+import os
import random
-from transform_data import data_dir, darknet_dir
+
+from config import Config
def main():
random.seed()
data_list = []
- for subdir in glob('%s/train/*' % data_dir):
+ for subdir in glob('%s/train/*_update' % Config.data_dir):
for data in glob(subdir + "/*.jpg"):
data_list.append(os.path.abspath(data))
random.shuffle(data_list)
@@ -15,10 +16,10 @@
test_ratio = 0.1
test_list = data_list[:int(test_ratio * len(data_list))]
train_list = data_list[int(test_ratio * len(data_list)):]
- with open('%s/train.txt' % darknet_dir, 'w') as train_txt:
+ with open('%s/train.txt' % Config.darknet_dir, 'w') as train_txt:
for data in train_list:
train_txt.write(data + '\n')
- with open('%s/test.txt' % darknet_dir, 'w') as test_txt:
+ with open('%s/test.txt' % Config.darknet_dir, 'w') as test_txt:
for data in test_list:
test_txt.write(data + '\n')
return
--
Gitblit v1.10.0