Python ModuleNotFoundError:没有名为';对象检测。protos';
我按照说明()安装Tensorflow对象检测API。我在ubuntu18.4上使用了Anaconda,说明中的所有步骤似乎都完成了 当我使用以下命令训练我的模型时:Python ModuleNotFoundError:没有名为';对象检测。protos';,python,tensorflow,Python,Tensorflow,我按照说明()安装Tensorflow对象检测API。我在ubuntu18.4上使用了Anaconda,说明中的所有步骤似乎都完成了 当我使用以下命令训练我的模型时: python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config 我得到以下错误: Traceback (most rece
python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config
我得到以下错误:
Traceback (most recent call last):
File "model_main_tf2.py", line 34, in <module>
from object_detection import model_lib_v2
File "/home/chanitda/Desktop/Tensorflow/workspace/training_demo/object_detection/__init__.py", line 28, in <module>
from object_detection import eval_util
File "/home/chanitda/Desktop/Tensorflow/workspace/training_demo/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/home/chanitda/Desktop/Tensorflow/workspace/training_demo/object_detection/metrics/coco_evaluation.py", line 28, in <module>
from object_detection.utils import object_detection_evaluation
File "/home/chanitda/Desktop/Tensorflow/workspace/training_demo/object_detection/utils/object_detection_evaluation.py", line 46, in <module>
from object_detection.utils import label_map_util
File "/home/chanitda/Desktop/Tensorflow/workspace/training_demo/object_detection/utils/label_map_util.py", line 30, in <module>
from object_detection.protos import string_int_label_map_pb2
ModuleNotFoundError: No module named 'object_detection.protos'
回溯(最近一次呼叫最后一次):
文件“model_main_tf2.py”,第34行,在
从对象检测导入模型库v2
文件“/home/chanitda/Desktop/Tensorflow/workspace/training_demo/object_detection/_init__.py”,第28行,在
从对象检测导入评估工具
文件“/home/chanitda/Desktop/Tensorflow/workspace/training\u demo/object\u detection/eval\u util.py”,第35行,在
从object_detection.metrics导入coco_评估
文件“/home/chanitda/Desktop/Tensorflow/workspace/training\u demo/object\u detection/metrics/coco\u evaluation.py”,第28行,在
从object\u detection.utils导入object\u detection\u求值
文件“/home/chanitda/Desktop/Tensorflow/workspace/training\u demo/object\u detection/utils/object\u detection\u evaluation.py”,第46行,在
从object\u detection.utils导入标签\u映射\u util
文件“/home/chanitda/Desktop/Tensorflow/workspace/training\u demo/object\u detection/utils/label\u map\u util.py”,第30行,在
从object\u detection.protos导入字符串\u int\u label\u map\u pb2
ModuleNotFoundError:没有名为“object\u detection.protos”的模块
我得到了标题中提到的错误。如果有人能给我一个代码示例来解决这个问题,我将非常感激。从这里开始尝试
或者从这里重试安装步骤
从这里开始尝试
或者从这里重试安装步骤
这个怎么样这个怎么样
# Install the Object Detection API
%%bash
cd models/research/
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install .