22 lines
507 B
Python
22 lines
507 B
Python
#%%
|
|
|
|
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)
|
|
# %%
|