DRENet
DRENet copied to clipboard
运行detect.py出错,您好我把C3ResAtnMHSA加入了yolov7中,出现下面的错误
Namespace(weights=['/content/runs/train/exp2/weights/last.pt'], source='/content/1_6306.jpg', img_size=640, conf_thres=0.25, iou_thres=0.2, device='0', view_img=False, save_txt=False, save_conf=False, nosave=False, classes=None, agnostic_nms=False, augment=False, update=False, project='runs/detect', name='exp', exist_ok=False, no_trace=False) YOLOR 🚀 v0.1-122-g3b41c2c torch 1.9.1+cu111 CUDA:0 (Tesla T4, 15101.8125MB)
Fusing layers... RepConv.fuse_repvgg_block RepConv.fuse_repvgg_block RepConv.fuse_repvgg_block IDetect.fuse Model Summary: 327 layers, 36431002 parameters, 6194944 gradients Convert model to Traced-model... /content/yolov7/models/common.py:2172: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if C != self.in_channels: /content/yolov7/models/common.py:2131: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if C != self.in_channels: /content/yolov7/models/common.py:2139: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if x.size(0)>1: traced_script_module saved! model is traced!
Traceback (most recent call last):
File "/content/yolov7/detect.py", line 196, in
哈喽呀 @denghuimin1
从上面的报错信息来看,大概率是输入尺寸的问题。需要注意的是,如果图像尺寸!=512,需要对配置文件进行修改。具体可以参考下issue #4 和 #9 .
谢谢您的回复呀,@WindVChen ,我改过之后发现还是出错,我再看看吧