add train.py

form dataset for current date
add exception catching
This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-06-05 23:35:06 +03:00
parent 3fd726f9c7
commit 07ea67746a
7 changed files with 168 additions and 26 deletions
+13
View File
@@ -0,0 +1,13 @@
import os
from datetime import datetime
from dto.annotationClass import AnnotationClass
current_dataset_dir = os.path.join('datasets', 'zombobase-current')
current_images_dir = os.path.join(current_dataset_dir, 'images')
current_labels_dir = os.path.join(current_dataset_dir, 'labels')
annotation_classes = AnnotationClass.read_json()
prefix = 'zombobase-'
today_dataset = os.path.join('datasets', f'{prefix}{datetime.now():%Y-%m-%d}')