0

我正在尝试在我的数据集上运行以下代码:https ://github.com/fgabel/EfficientDet-DeepSORT-Tracker

但是我遇到了以下错误:

python run_waymo_deepsort_efficientdet.py --gpu 0 --p_semi 1.0 --data_path='../data/Imgs'

Traceback (most recent call last):File 
"/home/prachisharma/Downloads/DREAMVU/25_08_2021 
_EfficientDet-DeepSORT-Tracker 
master/run_waymo_deepsort_efficientdet.py", line 9, in 
<module>
from waymo_open_dataset import dataset_pb2
File "/home/prachisharma/Downloads/DREAMVU/25_08_2021 
_EfficientDet-DeepSORT-Tracker- 
master/waymo_open_dataset/dataset_pb2.py", line 14, in 
<module>
from waymo_open_dataset import label_pb2 as 
waymo__open__dataset_dot_label__pb2
File "/home/prachisharma/Downloads/DREAMVU/25_08_2021
_EfficientDet-DeepSORT-Tracker- 
master/waymo_open_dataset/label_pb2.py", line 376, in 
<module>
'Box' : _reflection.GeneratedProtocolMessageType('Box', 
(_message.Message,), {
TypeError: Expected a message Descriptor, got Descriptor

然后我也尝试在终端中导入 tensorflow,发现同样的错误。

import tensorflow as tf

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site-packages/tensorflow/__init__.py", 
line 41, in <module>
from tensorflow.python.tools import module_util as 
_module_util
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/python/__init__.py", line 41, in 
<module>
from tensorflow.python.eager import context
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/python/eager/context.py", line 32, in 
<module>
from tensorflow.core.framework import function_pb2
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/core/framework/function_pb2.py", line 
16, in <module>
from tensorflow.core.framework import attr_value_pb2 as 
tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/core/framework/attr_value_pb2.py", line 
16, in <module>
from tensorflow.core.framework import tensor_pb2 as 
tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/core/framework/tensor_pb2.py", line 16, 
in <module>
from tensorflow.core.framework import resource_handle_pb2 
as 
tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/core/framework/resource_handle_pb2.py", 
line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as 
tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/home/prachisharma/anaconda3/envs/tf- 
torch/lib/python3.9/site- 
packages/tensorflow/core/framework/tensor_shape_pb2.py", 
line 110, in <module>
'Dim' : _reflection.GeneratedProtocolMessageType('Dim', 
(_message.Message,), {
TypeError: Expected a message Descriptor, got Descriptor

我在安装了 pytorch 和 tesnorflow 的虚拟环境中工作。我还在环境中安装了 protobuf。在搜索错误时,我找到了答案,唯一的解决方案是同时卸载 tensorflow 和 protobuf,然后再次安装 tensorflow 以自动安装 protobuf。

但就我而言,如果我卸载 tensorflow,那么由于 pytorch 的存在,我将无法再次安装 tensorflow。

如果在提供任何解决方案时需要,这些是详细信息:

Python:3.9.6(通过 anaconda 安装)

protobuf:3.9.2(通过 pip 安装)

Pytorch:1.9.0.post2

CUDA:10.2.89

Cuda 编译工具,7.5 版,V7.5.17

库登:7.6.5

请让我知道可以做些什么来解决这个问题。

4

0 回答 0