<jupyter_start><jupyter_text>Notebook made to test the model with the gray scaled pics.  imports<jupyter_code>import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tensorflow.keras.models import load_model
from sklearn.metrics import accuracy_score
# loading the norwegian gray scale test data
path = os.getcwd()

X = np.load( path + "/processed_data/data_nor_test_gray.npy")
y = np.load( path + "/processed_data/labels_nor_test_gray.npy")

print(f"shape of data_nor_test: {X.shape}")
print(f"shape of labels_nor_test: {y.shape}")
# loading the CNN model
model = load_model(path + "/models/CNN_Traffic_gen_gray.h5")

model.summary()
# getting the model predictions
y_pred = np.argmax(model.predict(X), axis=1)

# testing and getting accuracy score
print(accuracy_score(y ,y_pred))<jupyter_output>0.30434782608695654<jupyter_text>testing the norwegian meta sign pics<jupyter_code># loading the norwegian test data
path = os.getcwd()

X = np.load( path + "/processed_data/data_nor_meta_gray.npy")
y = np.load( path + "/processed_data/labels_nor_meta_gray.npy")

print(f"shape of data_nor_meta: {X.shape}")
print(f"shape of labels_nor_meta: {y.shape}")
# getting the model predictions
y_pred = np.argmax(model.predict(X), axis=1)

# testing and getting accuracy score
print(accuracy_score(y ,y_pred))<jupyter_output>0.6388888888888888<jupyter_text>testing the norwegian cropped greyscaled test pics the cropped pics are made to be more inline with what the German test set is like.<jupyter_code># loading the norwegian test data
path = os.getcwd()

X = np.load( path + "/processed_data/data_nor_test_cropped_gray.npy")
y = np.load( path + "/processed_data/labels_nor_test_cropped_gray.npy")

print(f"shape of data_nor_meta: {X.shape}")
print(f"shape of labels_nor_meta: {y.shape}")
# getting the model predictions
y_pred = np.argmax(model.predict(X), axis=1)

# testing and getting accuracy score
print(accuracy_score(y ,y_pred))<jupyter_output>0.6521739130434783
{'fraction_non_alphanumeric': 0.10692771084337349, 'fraction_numerical': 0.028112449799196786, 'mean_word_length': 6.3003663003663, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '327607', 'license': 'MIT', 'n_tokens_mistral': 750, 'n_tokens_neox': 712, 'n_words': 182, 'path': 'Test_models_gray.ipynb', 'repo_name': 'mh-8man/Traffic_Sign_Recognition', 'size': '1992'}