From 2b914cfcdbc1a0b1a5552f1307c4ccd248f57c16 Mon Sep 17 00:00:00 2001 From: Filip Jankowski Date: Tue, 6 Dec 2022 07:44:12 +0100 Subject: [PATCH] Upload files to 'Biedap' --- Biedap/algorytm_uczenia.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Biedap/algorytm_uczenia.py diff --git a/Biedap/algorytm_uczenia.py b/Biedap/algorytm_uczenia.py new file mode 100644 index 0000000..ac89e70 --- /dev/null +++ b/Biedap/algorytm_uczenia.py @@ -0,0 +1,21 @@ +#%% + +from detecto import core, utils, visualize +import os + +os.chdir(r"C:\Users\pittb\Documents\biedronkapp\BiedronkApp\biedronki_dataset") +dataset = core.Dataset('images/') + +model = core.Model(['azjatycka','siedmiokropka']) + +model.fit(dataset) +# %% +image = utils.read_image('images/4733127105_0a658bd317_c.jpg') +predictions = model.predict(image) +# %% +labels, boxes, scores = predictions +print(labels) +print(boxes) +print(scores) +visualize.show_labeled_image(image, boxes, labels) +# %%