Open arpan-kusari opened 1 year ago
May I ask if your problem has been resolved? I have also encountered the same problem
Traceback (most recent call last):
File "D:\jupyter\pythonProject\yolov5-gradcam-master\main.py", line 124, in
Waiting for your reply
Hi, Thanks for the repo. Whenever I am running it, I am getting an error on the self.model command. It seems it does not output pred and logits but a single tensor when given a tensor. Not sure how this line could be updated.
Traceback (most recent call last): File "C:\Users\kusari\Documents\Camera_error_sources\yolov5-gradcam\main.py", line 124, in
main(args.img_path)
File "C:\Users\kusari\Documents\Camera_error_sources\yolov5-gradcam\main.py", line 67, in main
saliency_method = YOLOV5GradCAM(model=model, layer_name=args.target_layer, img_size=input_size)
File "C:\Users\kusari\Documents\Camera_error_sources\yolov5-gradcam\models\gradcam.py", line 44, in init
self.model(torch.zeros(1, 3, img_size, device=device))
File "C:\Users\kusari\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(input, **kwargs)
File "C:\Users\kusari\Documents\Camera_error_sources\yolov5-gradcam\models\yolo_v5_objectdetector.py", line 167, in forward
prediction, logits, = self.model(img, augment=False)
ValueError: not enough values to unpack (expected 3, got 2)