YOLOv4-pytorch
YOLOv4-pytorch copied to clipboard
CUDA_VISIBLE_DEVICES=0 python3 eval_voc.py --weight_path weight/best.pt --gpu_id 0 --eval --mode det
在进行detect的时候执行CUDA_VISIBLE_DEVICES=0 python3 eval_voc.py --weight_path weight/best.pt --gpu_id 0 --eval --mode det
保错如下:
Traceback (most recent call last):
File "eval_voc.py", line 150, in
该如何解决呢
eval_voc.py文件第59行 self.__model, showatt=False.改为self.__model, showatt=True
If you update to the latest version you should see the attention block. And you can set showatt
to True
. Otherwise, I would suggest that you abandon the attention part.
If you update to the latest version you should see the attention block. And you can set
showatt
toTrue
. Otherwise, I would suggest that you abandon the attention part.
感谢
eval_voc.py文件第59行 self.__model, showatt=False.改为self.__model, showatt=True
感谢
Traceback (most recent call last):
File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 148, in
Traceback (most recent call last): File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 148, in mode=opt.mode File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 38, in init self.__load_model_weights(weight_path) File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 47, in __load_model_weights self.__model.load_state_dict(chkpt["model"]) KeyError: 'model' 该如何解决
当你使用可视化时,需要重新训练你的的预训练模型
Traceback (most recent call last): File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 148, in mode=opt.mode File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 38, in init self.__load_model_weights(weight_path) File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 47, in __load_model_weights self.__model.load_state_dict(chkpt["model"]) KeyError: 'model' 该如何解决
好兄弟你这个问题怎么解决的?我也遇到同样的问题了
追溯(最近一次通话): 文件“ C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py”,行148,在 mode = opt.mode 文件中,“ C:/用户/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py”,第38行,位于初始化 自我中。load_model_weights(weight_path) 文件“ C:/ Users / gja / Downloads / YOLOv4-pytorch-master” /YOLOv4-pytorch-master/eval_voc.py“,第47行,位于__load_model_weights self . model.load_state_dict(chkpt [” model“]) KeyError:'model' 该如何解决
好兄弟你这个问题怎么解决的?我也遇到同样的问题了 self .__ model.load_state_dict(chkpt [” model“])修改为:self .__ model.load_state_dict(chkpt)
追溯(最近一次通话): 文件“ C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py”,行148,在 mode = opt.mode 文件中,“ C:/用户/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py”,第38行,位于初始化 自我中。load_model_weights(weight_path) 文件“ C:/ Users / gja / Downloads / YOLOv4-pytorch-master” /YOLOv4-pytorch-master/eval_voc.py“,第47行,位于__load_model_weights self . model.load_state_dict(chkpt [” model“]) KeyError:'model' 该如何解决
好兄弟你这个问题怎么解决的?我也遇到同样的问题了 self .__ model.load_state_dict(chkpt [” model“])修改为:self .__ model.load_state_dict(chkpt)
感谢
Traceback (most recent call last): File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 148, in mode=opt.mode File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 38, in init self.__load_model_weights(weight_path) File "C:/Users/gja/Downloads/YOLOv4-pytorch-master/YOLOv4-pytorch-master/eval_voc.py", line 47, in __load_model_weights self.__model.load_state_dict(chkpt["model"]) KeyError: 'model' 该如何解决
当你使用可视化时,需要重新训练你的的预训练模型
直接用题主训练好的模型,没办法直接显示注意力的热力图吗?