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

# +
import numpy as np 
import pandas as pd
import math as math
import random
import time

from triplet_encoding import *
from shared_module import *

from triplet_encoding import *

# +
N_ANCHORS = ANCHORS_12
ENCODING_STRATEGY = VGG19_4096
ENCODING_SIZE = 4096

INPUT_FILE_PATH = './input/labels'

labels_file_path = get_path(INPUT_FILE_PATH, N_ANCHORS, ENCODING_STRATEGY)

df_labels = pd.read_csv(labels_file_path('anchor'))

display(df_labels.head())
# -

breeds = df_labels['breed'].unique()
breeds.sort()
print(breeds)

df_test = pd.read_csv('input/labels_test_vgg19_4096.csv')
display(df_test.head())

encoding_model = input_encoding_model((1, ENCODING_SIZE))
predictions = predict_on_test_model(df_labels, df_test, breeds, model_encode(encoding_model, ENCODING_SIZE))

cols = ['id']
cols.extend(breeds)
pd.DataFrame(predictions, columns=cols)



StarcoderdataJupyterScriptsDedupFiltered