хуй знает что там

This commit is contained in:
Alexander Popov 2024-02-24 19:30:01 +03:00
parent c7516d542c
commit 1cb337c7b1

View File

@ -1,23 +1,27 @@
from ultralytics import YOLO from ultralytics import YOLO
model = YOLO('yolov8m.pt') model = YOLO('yolov8s.pt')
model.save_dir = './predict/' model.save_dir = './predict/'
result = model.predict( result = model.predict(
'./Assets/cat_dog.jpg', './Assets/cat_dog.jpg',
save=True, save=True,
device='cpu', project='test',
name='ololo',
device=0,
show=False, show=False,
classes=[16, 15], classes=[16, 15],
)[0] )[0]
result = model( # result = model(
'./Assets/cat_dog.jpg', # './Assets/cat_dog.jpg',
save=True, # save=True,
project='test', # project='test',
name='ololo', # name='ololo',
device='cpu', # device='gpu',
show=False, # show=False,
)[0] # )[0]
print(model.names)
# print(len(result.boxes)) # print(len(result.boxes))