import sys
import os
import torch
import numpy as np

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from imagedatasetanalyzer.datasets.imagelabeldataset import ImageLabelDataset

if __name__ == "__main__":

    img_dir = r"C:\Users\joortif\Desktop\datasets\Completos\CamVid\images"
    labels_dir = r"C:\Users\joortif\Desktop\datasets\Completos\CamVid\labels_reduced"
    output_dir = r"C:\Users\joortif\Desktop\datasets\results\results_camvid_reduced"

    imagelabel_dataset = ImageLabelDataset(img_dir=img_dir, label_dir=labels_dir, class_map={0: "sky",
    1: "obstacle",
    2: "road",
    3: "sidewalk",
    4: "vegetation",
    5: "vehicle",
    6: "person"})
    imagelabel_dataset.analyze(verbose=True, similarity_index=None, output=output_dir)

    #image_dataset = ImageDataset(img_dir=img_dir)
    #image_dataset.analyze(similarity_index=None, verbose=False)