pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam
MIT License
281 stars 47 forks source link

Get ERROR when using main.py #13

Open maheluyao429 opened 2 years ago

maheluyao429 commented 2 years ago

`D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\deep_utils\vision\face_detection\ultralight__init.py:5: UserWarning: No module named 'deep_utils.vision.face_detection.ultralight.torch'. If you don't use UltralightTorchFaceDetector ignore this message. 'UltralightTorchFaceDetector') D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\deep_utils\vision\face_detection\ultralight\init__.py:8: UserWarning: No module named 'deep_utils.vision.face_detection.ultralight.tf'. If you don't use UltralightTFFaceDetector ignore this message. 'UltralightTFFaceDetector') 2022-05-19 14:08:34.287874: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2022-05-19 14:08:34.288041: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. ['bus.jpg', 'cat-dog.jpg', 'dog.jpg', 'eagle.jpg'] [INFO] Loading the model [INFO] Model is loaded [INFO] fetching names from coco file D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\torch\functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\torch\nn\modules\module.py:1025: UserWarning: Using a non-full backward hook when the forward contains multiple autograd Nodes is deprecated and will be removed in future versions. This hook will be missing some grad_input. Please use register_full_backward_hook to get the documented behavior. warnings.warn("Using a non-full backward hook when the forward contains multiple autograd Nodes " [INFO] saliency_map size : torch.Size([20, 20]) D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\torch\nn\modules\module.py:1025: UserWarning: Using a non-full backward hook when the forward contains multiple autograd Nodes is deprecated and will be removed in future versions. This hook will be missing some grad_input. Please use register_full_backward_hook to get the documented behavior. warnings.warn("Using a non-full backward hook when the forward contains multiple autograd Nodes " [INFO] model-forward took: 0.1995 seconds D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\torch\nn\functional.py:3509: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.") [INFO] person, model-backward took: 0.2481 seconds [INFO] person, model-backward took: 0.2605 seconds [INFO] person, model-backward took: 0.2442 seconds [INFO] bus, model-backward took: 0.2368 seconds [INFO] person, model-backward took: 0.2494 seconds total time: 1.4811 Traceback (most recent call last): File "D:/deep-learning/yolov5-gradcam-master/main.py", line 94, in main(os.path.join( args.img_path ,item)) File "D:/deep-learning/yolov5-gradcam-master/main.py", line 78, in main res_img, heat_map = get_res_img(bbox, mask, res_img) File "D:/deep-learning/yolov5-gradcam-master/main.py", line 32, in get_res_img n_heatmat = (Box.fill_outer_box(heatmap, bbox) / 255).astype(np.float32) File "D:\python3.8.6\anaconda\envs\videocv\lib\site-packages\deep_utils\utils\box_utils\boxes.py", line 430, in fill_outer_box img = cv2.multiply(img, mask) NameError: name 'cv2' is not defined

Process finished with exit code 1 `

maheluyao429 commented 2 years ago
Screenshot 2022-05-19 141344

![Uploading Screenshot 2022-05-19 141400.png…]()

maheluyao429 commented 2 years ago
Screenshot 2022-05-19 141400
pooya-mohammadi commented 2 years ago

@maheluyao429

pip install opencv-python

install this package.