diff --git a/load_test_data.py b/load_test_data.py new file mode 100644 index 0000000..b5a635b --- /dev/null +++ b/load_test_data.py @@ -0,0 +1,41 @@ +import numpy as np +import os +from skimage.io import imread +import cv2 as cv +from pathlib import Path + + +def load_data(input_dir, newSize=(64,64)): + image_path = Path(input_dir) + file_names = os.listdir(image_path) + categories_name = [] + categories_count = [] + count = 0 + n = file_names[0] + for name in file_names: + if name != n: + categories_count.append(count) + n = name + count = 1 + else: + count += 1 + if not name in categories_name: + categories_name.append(name) + categories_count.append(count) + test_img = [] + labels = [] + + for n in file_names: + p = image_path / n + img = imread(p) # zwraca ndarry postaci xSize x ySize x colorDepth + img = cv.resize(img, newSize, interpolation=cv.INTER_AREA) # zwraca ndarray + img = img / 255 # type: ignore #normalizacja + test_img.append(img) + labels.append(n) + + X = {} + X["values"] = np.array(test_img) + X["name"] = categories_name + X["names_count"] = categories_count + X["labels"] = labels + return X \ No newline at end of file diff --git a/test_set/Ackerman, Mikasa.jpg b/test_set/Ackerman, Mikasa.jpg new file mode 100644 index 0000000..f937afe Binary files /dev/null and b/test_set/Ackerman, Mikasa.jpg differ diff --git a/test_set/Aisaka, Taiga.jpg b/test_set/Aisaka, Taiga.jpg new file mode 100644 index 0000000..77b6978 Binary files /dev/null and b/test_set/Aisaka, Taiga.jpg differ diff --git a/test_set/Alucard.jpg b/test_set/Alucard.jpg new file mode 100644 index 0000000..6cdc03e Binary files /dev/null and b/test_set/Alucard.jpg differ diff --git a/test_set/Araragi, Koyomi.jpg b/test_set/Araragi, Koyomi.jpg new file mode 100644 index 0000000..390b0d5 Binary files /dev/null and b/test_set/Araragi, Koyomi.jpg differ diff --git a/test_set/Ayanokouji, Kiyotaka.jpg b/test_set/Ayanokouji, Kiyotaka.jpg new file mode 100644 index 0000000..b447217 Binary files /dev/null and b/test_set/Ayanokouji, Kiyotaka.jpg differ diff --git a/test_set/Dazai, Osamu.jpg b/test_set/Dazai, Osamu.jpg new file mode 100644 index 0000000..aa876ba Binary files /dev/null and b/test_set/Dazai, Osamu.jpg differ diff --git a/test_set/Elric, Edward.jpg b/test_set/Elric, Edward.jpg new file mode 100644 index 0000000..3d13d5f Binary files /dev/null and b/test_set/Elric, Edward.jpg differ diff --git a/test_set/Emilia.jpg b/test_set/Emilia.jpg new file mode 100644 index 0000000..2b06766 Binary files /dev/null and b/test_set/Emilia.jpg differ diff --git a/test_set/Evergarden, Violet.jpg b/test_set/Evergarden, Violet.jpg new file mode 100644 index 0000000..9706d46 Binary files /dev/null and b/test_set/Evergarden, Violet.jpg differ diff --git a/test_set/Gasai, Yuno.jpg b/test_set/Gasai, Yuno.jpg new file mode 100644 index 0000000..ce0c5f8 Binary files /dev/null and b/test_set/Gasai, Yuno.jpg differ diff --git a/test_set/Gojou, Satoru.jpg b/test_set/Gojou, Satoru.jpg new file mode 100644 index 0000000..4055d28 Binary files /dev/null and b/test_set/Gojou, Satoru.jpg differ diff --git a/test_set/Guts.jpg b/test_set/Guts.jpg new file mode 100644 index 0000000..e0831d0 Binary files /dev/null and b/test_set/Guts.jpg differ diff --git a/test_set/Hatake, Kakashi.jpg b/test_set/Hatake, Kakashi.jpg new file mode 100644 index 0000000..a44cb9e Binary files /dev/null and b/test_set/Hatake, Kakashi.jpg differ diff --git a/test_set/Hikigaya, Hachiman.jpg b/test_set/Hikigaya, Hachiman.jpg new file mode 100644 index 0000000..905463a Binary files /dev/null and b/test_set/Hikigaya, Hachiman.jpg differ diff --git a/test_set/Joestar, Joseph.jpg b/test_set/Joestar, Joseph.jpg new file mode 100644 index 0000000..9c70a92 Binary files /dev/null and b/test_set/Joestar, Joseph.jpg differ diff --git a/test_set/Kamina.jpg b/test_set/Kamina.jpg new file mode 100644 index 0000000..0bb22a3 Binary files /dev/null and b/test_set/Kamina.jpg differ diff --git a/test_set/Kaneki, Ken.jpg b/test_set/Kaneki, Ken.jpg new file mode 100644 index 0000000..884c376 Binary files /dev/null and b/test_set/Kaneki, Ken.jpg differ diff --git a/test_set/Kirigaya, Kazuto.jpg b/test_set/Kirigaya, Kazuto.jpg new file mode 100644 index 0000000..5eb6ec0 Binary files /dev/null and b/test_set/Kirigaya, Kazuto.jpg differ diff --git a/test_set/Kurosaki, Ichigo.jpg b/test_set/Kurosaki, Ichigo.jpg new file mode 100644 index 0000000..421d8f9 Binary files /dev/null and b/test_set/Kurosaki, Ichigo.jpg differ diff --git a/test_set/Lamperouge, Lelouch.jpg b/test_set/Lamperouge, Lelouch.jpg new file mode 100644 index 0000000..01fe14a Binary files /dev/null and b/test_set/Lamperouge, Lelouch.jpg differ diff --git a/test_set/Lawliet, L.jpg b/test_set/Lawliet, L.jpg new file mode 100644 index 0000000..dcc3ecc Binary files /dev/null and b/test_set/Lawliet, L.jpg differ diff --git a/test_set/Levi.jpg b/test_set/Levi.jpg new file mode 100644 index 0000000..f0561e7 Binary files /dev/null and b/test_set/Levi.jpg differ diff --git a/test_set/Makise, Kurisu.jpg b/test_set/Makise, Kurisu.jpg new file mode 100644 index 0000000..6248bac Binary files /dev/null and b/test_set/Makise, Kurisu.jpg differ diff --git a/test_set/Megumin.jpg b/test_set/Megumin.jpg new file mode 100644 index 0000000..61d20e7 Binary files /dev/null and b/test_set/Megumin.jpg differ diff --git a/test_set/Monkey D., Luffy.jpg b/test_set/Monkey D., Luffy.jpg new file mode 100644 index 0000000..78859ae Binary files /dev/null and b/test_set/Monkey D., Luffy.jpg differ diff --git a/test_set/Morow, Hisoka.jpg b/test_set/Morow, Hisoka.jpg new file mode 100644 index 0000000..5c23252 Binary files /dev/null and b/test_set/Morow, Hisoka.jpg differ diff --git a/test_set/Mustang, Roy.jpg b/test_set/Mustang, Roy.jpg new file mode 100644 index 0000000..c5abaf3 Binary files /dev/null and b/test_set/Mustang, Roy.jpg differ diff --git a/test_set/Okabe, Rintarou.jpg b/test_set/Okabe, Rintarou.jpg new file mode 100644 index 0000000..3e4a05f Binary files /dev/null and b/test_set/Okabe, Rintarou.jpg differ diff --git a/test_set/Onizuka, Eikichi.jpg b/test_set/Onizuka, Eikichi.jpg new file mode 100644 index 0000000..8842740 Binary files /dev/null and b/test_set/Onizuka, Eikichi.jpg differ diff --git a/test_set/Oshino, Shinobu.jpg b/test_set/Oshino, Shinobu.jpg new file mode 100644 index 0000000..f82c2fc Binary files /dev/null and b/test_set/Oshino, Shinobu.jpg differ diff --git a/test_set/Reigen, Arataka.jpg b/test_set/Reigen, Arataka.jpg new file mode 100644 index 0000000..102e213 Binary files /dev/null and b/test_set/Reigen, Arataka.jpg differ diff --git a/test_set/Rem.jpg b/test_set/Rem.jpg new file mode 100644 index 0000000..81e0e14 Binary files /dev/null and b/test_set/Rem.jpg differ diff --git a/test_set/Roronoa, Zoro.jpg b/test_set/Roronoa, Zoro.jpg new file mode 100644 index 0000000..795bf3d Binary files /dev/null and b/test_set/Roronoa, Zoro.jpg differ diff --git a/test_set/Saber.jpg b/test_set/Saber.jpg new file mode 100644 index 0000000..4707f91 Binary files /dev/null and b/test_set/Saber.jpg differ diff --git a/test_set/Saitama.jpg b/test_set/Saitama.jpg new file mode 100644 index 0000000..706309d Binary files /dev/null and b/test_set/Saitama.jpg differ diff --git a/test_set/Sakata, Gintoki.jpg b/test_set/Sakata, Gintoki.jpg new file mode 100644 index 0000000..7171bd8 Binary files /dev/null and b/test_set/Sakata, Gintoki.jpg differ diff --git a/test_set/Sakurajima, Mai.jpg b/test_set/Sakurajima, Mai.jpg new file mode 100644 index 0000000..a9e2948 Binary files /dev/null and b/test_set/Sakurajima, Mai.jpg differ diff --git a/test_set/Sanji.jpg b/test_set/Sanji.jpg new file mode 100644 index 0000000..6801570 Binary files /dev/null and b/test_set/Sanji.jpg differ diff --git a/test_set/Senjougahara, Hitagi.jpg b/test_set/Senjougahara, Hitagi.jpg new file mode 100644 index 0000000..b4070a3 Binary files /dev/null and b/test_set/Senjougahara, Hitagi.jpg differ diff --git a/test_set/Spiegel, Spike.jpg b/test_set/Spiegel, Spike.jpg new file mode 100644 index 0000000..589a811 Binary files /dev/null and b/test_set/Spiegel, Spike.jpg differ diff --git a/test_set/Uchiha, Itachi.jpg b/test_set/Uchiha, Itachi.jpg new file mode 100644 index 0000000..dd3572e Binary files /dev/null and b/test_set/Uchiha, Itachi.jpg differ diff --git a/test_set/Uchiha, Sasuke.jpg b/test_set/Uchiha, Sasuke.jpg new file mode 100644 index 0000000..42129e2 Binary files /dev/null and b/test_set/Uchiha, Sasuke.jpg differ diff --git a/test_set/Uzumaki, Naruto.jpg b/test_set/Uzumaki, Naruto.jpg new file mode 100644 index 0000000..cceacde Binary files /dev/null and b/test_set/Uzumaki, Naruto.jpg differ diff --git a/test_set/Yagami, Light.jpg b/test_set/Yagami, Light.jpg new file mode 100644 index 0000000..216165b Binary files /dev/null and b/test_set/Yagami, Light.jpg differ diff --git a/test_set/Yato.jpg b/test_set/Yato.jpg new file mode 100644 index 0000000..908a570 Binary files /dev/null and b/test_set/Yato.jpg differ diff --git a/test_set/Yeager, Eren.jpg b/test_set/Yeager, Eren.jpg new file mode 100644 index 0000000..da31618 Binary files /dev/null and b/test_set/Yeager, Eren.jpg differ diff --git a/test_set/Yuuki, Asuna.jpg b/test_set/Yuuki, Asuna.jpg new file mode 100644 index 0000000..c2a8b2a Binary files /dev/null and b/test_set/Yuuki, Asuna.jpg differ diff --git a/test_set/Zero Two.jpg b/test_set/Zero Two.jpg new file mode 100644 index 0000000..f6157c2 Binary files /dev/null and b/test_set/Zero Two.jpg differ diff --git a/test_set/Zoldyck, Killua.jpg b/test_set/Zoldyck, Killua.jpg new file mode 100644 index 0000000..e7081c6 Binary files /dev/null and b/test_set/Zoldyck, Killua.jpg differ diff --git a/test_set/holo.jpg b/test_set/holo.jpg new file mode 100644 index 0000000..7144ad2 Binary files /dev/null and b/test_set/holo.jpg differ