UPDATE Vision test
This commit is contained in:
@ -23,17 +23,17 @@ 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.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.model = yolov8_segment_openvino(model_path, device, conf_thres=0.3, iou_thres=0.3)
|
||||
|
||||
img_path = ''.join([os.getcwd(), '/model/data/test0911.png'])
|
||||
point_path = ''.join([os.getcwd(), '/model/data/test0911.xyz'])
|
||||
img_path = ''.join([os.getcwd(), '/Vision/model/data/test0910.png'])
|
||||
point_path = ''.join([os.getcwd(), '/Vision/model/data/test0910.xyz'])
|
||||
self.img = cv2.imread(img_path)
|
||||
self.point = np.loadtxt(point_path).reshape((1080, 1440, 3))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user