Upload files to 'Biedap'

This commit is contained in:
Filip Jankowski 2022-12-06 07:44:12 +01:00
parent f5962efa0c
commit 2b914cfcdb

View File

@ -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)
# %%