mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 07:06:36 +00:00
add train.py
form dataset for current date add exception catching
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
from pathlib import Path
|
||||
import cv2
|
||||
import os.path
|
||||
|
||||
|
||||
from dto.annotationClass import AnnotationClass
|
||||
from dto.imageLabel import ImageLabel
|
||||
from preprocessing import read_labels
|
||||
|
||||
images_dir = '../images'
|
||||
labels_dir = '../labels'
|
||||
annotation_classes = AnnotationClass.read_json()
|
||||
|
||||
images_dir = ''
|
||||
|
||||
image = os.listdir(images_dir)[0]
|
||||
image_path = os.path.join(images_dir, image)
|
||||
labels_path = os.path.join(labels_dir, f'{Path(image_path).stem}.txt')
|
||||
image_path = 'test01.jpg'
|
||||
labels_path = 'test01.txt'
|
||||
|
||||
img = ImageLabel(
|
||||
image_path=image_path,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1 @@
|
||||
0 0.3809 0.49269 0.21636 0.39129
|
||||
Reference in New Issue
Block a user