pooya-mohammadi / yolov5-gradcam

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

get error "google/protobuf/pyext/descriptor.cc:358: bad argument to internal function" #19

Closed ChengYao0209 closed 2 years ago

ChengYao0209 commented 2 years ago

Dears

When I try to operate "python main.py --model-path yolov5l.pt --img-path images/cat-dog.jpg --output-dir outputs" and I get this error

Traceback (most recent call last): File "main.py", line 6, in from models.yolo_v5_object_detector import YOLOV5TorchObjectDetector File "/content/yolov5-gradcam/models/yolo_v5_object_detector.py", line 2, in from deep_utils.utils.box_utils.boxes import Box File "/usr/local/lib/python3.7/dist-packages/deep_utils/init.py", line 10, in from .vision import File "/usr/local/lib/python3.7/dist-packages/deep_utils/vision/init.py", line 1, in from .face_detection import File "/usr/local/lib/python3.7/dist-packages/deep_utils/vision/face_detection/init.py", line 49, in from deep_utils.vision.face_detection.ultralight.tf.ultralight_tf_face_detection import ( File "/usr/local/lib/python3.7/dist-packages/deep_utils/vision/face_detection/ultralight/tf/ultralight_tf_face_detection.py", line 17, in from .utils.rfb_320 import create_rfb_net File "/usr/local/lib/python3.7/dist-packages/deep_utils/vision/face_detection/ultralight/tf/utils/rfb_320.py", line 1, in import tensorflow as tf File "/usr/local/lib/python3.7/dist-packages/tensorflow/init.py", line 37, in from tensorflow.python.tools import module_util as _module_util File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/init.py", line 37, in from tensorflow.python.eager import context File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py", line 29, in from tensorflow.core.framework import function_pb2 File "/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/function_pb2.py", line 16, in from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attrvaluepb2 File "/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2 File "/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resourcehandlepb2 File "/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/resource_handle_pb2.py", line 150, in 'module' : 'tensorflow.core.framework.resource_handle_pb2' SystemError: google/protobuf/pyext/descriptor.cc:358: bad argument to internal function

Could you tell me how to solve this error?

ahmetfurkaann commented 2 years ago

I keep getting the same error. If anyone knows the solution, it would be great.

pooya-mohammadi commented 2 years ago

@ahmetfurkaann @ChengYao0209 The issue is solved

ahmetfurkaann commented 2 years ago

Thank you