mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 09:06:35 +00:00
add weather modes
add exports
This commit is contained in:
@@ -119,11 +119,11 @@ def check_label(label_path):
|
||||
def create_yaml():
|
||||
print('creating yaml...')
|
||||
lines = ['names:']
|
||||
for c in annotation_classes:
|
||||
lines.append(f'- {annotation_classes[c].name}')
|
||||
classes_count = len(annotation_classes)
|
||||
for c in range(DEFAULT_CLASS_NUM - classes_count):
|
||||
lines.append(f'- Class-{c + classes_count + 1}')
|
||||
for i in range(DEFAULT_CLASS_NUM):
|
||||
if i in annotation_classes:
|
||||
lines.append(f'- {annotation_classes[i].name}')
|
||||
else:
|
||||
lines.append(f'- Class-{i + 1}')
|
||||
lines.append(f'nc: {DEFAULT_CLASS_NUM}')
|
||||
|
||||
lines.append(f'test: test/images')
|
||||
@@ -175,7 +175,8 @@ def train_dataset(existing_date=None, from_scratch=False):
|
||||
cur_folder = f'{prefix}{existing_date}'
|
||||
cur_dataset = path.join(datasets_dir, f'{prefix}{existing_date}')
|
||||
else:
|
||||
form_dataset(latest_date)
|
||||
# form_dataset(latest_date)
|
||||
# create_yaml()
|
||||
cur_folder = today_folder
|
||||
cur_dataset = today_dataset
|
||||
|
||||
@@ -186,7 +187,7 @@ def train_dataset(existing_date=None, from_scratch=False):
|
||||
yaml = abspath(path.join(cur_dataset, 'data.yaml'))
|
||||
results = model.train(data=yaml,
|
||||
epochs=120,
|
||||
batch=14,
|
||||
batch=11,
|
||||
imgsz=1280,
|
||||
save_period=1,
|
||||
workers=24)
|
||||
|
||||
Reference in New Issue
Block a user