添加状态分类和液面分割
This commit is contained in:
@ -2,10 +2,10 @@ from ultralytics import YOLO
|
||||
import cv2
|
||||
|
||||
# 1. 加载模型
|
||||
model = YOLO(r'/home/hx/yolo/ultralytics_yolo11-main/runs/train/exp_obb2/weights/best.pt')
|
||||
model = YOLO(r'/home/hx/yolo/ultralytics_yolo11-main/runs/train/exp_obb/weights/best.pt')
|
||||
|
||||
# 2. 读取图像
|
||||
img_path = r"/home/hx/桌面/image/images/test/1.jpg"
|
||||
img_path = r"/home/hx/yolo/test_image/2.png"
|
||||
img = cv2.imread(img_path)
|
||||
|
||||
# ✅ 检查图像是否加载成功
|
||||
|
||||
Reference in New Issue
Block a user