Open AbdurrahimBalta opened 1 year ago
AttributeError: Can't get attribute 'SegmentationModel' on <module 'models.yolo' from '/Users/cache/torch/hub/WongKinYiu_yolov7_main/models/yolo.py'>
I'm trying to use my custom instance segmentation model. The yolov7 seg codes are a branch of yolov5, but the models.yolo.py file is still in its old version and out of date for segmentation.
mycode
def get_yolov7(): # local best.pt model = torch.hub.load('WongKinYiu/yolov7', 'custom', 'best.pt', force_reload=True)
local repo
model.conf = 0.6 return model
model = get_yolov7()
Hi dear, I faced a similar error, can you guide me to solve it? Thanks in advance
这个是使用的底膜问题 也就是.pt的问题 换一个.pt文件就可以了 更换成yolov5s.pt之类的
AttributeError: Can't get attribute 'SegmentationModel' on <module 'models.yolo' from '/Users/cache/torch/hub/WongKinYiu_yolov7_main/models/yolo.py'>
I'm trying to use my custom instance segmentation model. The yolov7 seg codes are a branch of yolov5, but the models.yolo.py file is still in its old version and out of date for segmentation.
mycode
def get_yolov7():
local best.pt
local repo
model = get_yolov7()