Files
ai-training/tests/imagelabel_visualize_test.py
T
Oleksandr Bezdieniezhnykh 07ea67746a add train.py
form dataset for current date
add exception catching
2024-06-05 23:35:06 +03:00

23 lines
440 B
Python

import cv2
from dto.annotationClass import AnnotationClass
from dto.imageLabel import ImageLabel
from preprocessing import read_labels
annotation_classes = AnnotationClass.read_json()
images_dir = ''
image_path = 'test01.jpg'
labels_path = 'test01.txt'
img = ImageLabel(
image_path=image_path,
image=cv2.imread(image_path),
labels_path=labels_path,
labels=read_labels(labels_path)
)
img.visualize(annotation_classes)