# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

import sys
import os
from pathlib import Path
curr_dir = os.path.abspath('')
project_dir = Path(curr_dir).parent
sys.path.append(f"{project_dir}")
sys.path.append(f"{project_dir}/src")
sys.path

from JetRecognizer.JetRecognizerPreprocessing import create_train_validation_test_split

# +
# create_train_validation_test_split()
# -

from ImagePreprocessing.TrainTestSeparator import copy_images_to_train_validation_test
from Common.DL_FilePaths import FIGHTER_JET, IMG_SIZE, get_fighter_jet_dir


# +
def get_all_fighter_img_dirs(size=IMG_SIZE.IS_1920):
    img_directories = []
    for fighter in FIGHTER_JET:
        fdir = get_fighter_jet_dir(fighter, size=size)
        img_directories.append(fdir)
    return img_directories


def create_train_validation_test_split():
    train_valid_test_dirs = []
    img_dirs = get_all_fighter_img_dirs()
    for img_dir in img_dirs:
        train_dir, valid_dir, test_dir = copy_images_to_train_validation_test(base_dir=img_dir,
                                                                              source_dir=img_dir)
        train_valid_test_dirs.append((train_dir, valid_dir, test_dir))
    return train_valid_test_dirs


# -

create_train_validation_test_split()



StarcoderdataJupyterScriptsDedupFiltered