add weather modes

add exports
This commit is contained in:
zxsanny
2025-03-13 16:39:57 +02:00
parent 948d4f1425
commit 3113d59a3a
4 changed files with 70 additions and 68 deletions
+8 -7
View File
@@ -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)