update 调试完成

This commit is contained in:
hjw
2024-09-11 20:47:06 +08:00
parent 232fab70b4
commit f46f71b176
8 changed files with 49 additions and 41 deletions

View File

@ -23,13 +23,13 @@ class Detection:
def __init__(self, use_openvino_model = True):
self.use_openvino_model = use_openvino_model
if self.use_openvino_model==False:
model_path = ''.join([os.getcwd(), '/model/pt/best.pt'])
model_path = ''.join([os.getcwd(), '/Vision/model/pt/best.pt'])
device = 'cpu'
self.camera_rvc = camera()
self.model = yolov8_segment()
self.model.load_model(model_path, device)
else:
model_path = ''.join([os.getcwd(), '/model/openvino/best.xml'])
model_path = ''.join([os.getcwd(), '/Vision/model/openvino/best.xml'])
device = 'CPU'
self.camera_rvc = camera()
self.model = yolov8_segment_openvino(model_path, device, conf_thres=0.3, iou_thres=0.3)