Upload files to 'Biedap'
This commit is contained in:
parent
f5962efa0c
commit
2b914cfcdb
21
Biedap/algorytm_uczenia.py
Normal file
21
Biedap/algorytm_uczenia.py
Normal 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)
|
||||
# %%
|
Loading…
Reference in New Issue
Block a user