models/research/object_detection/exporter_main_v2.py give me error "ImportError: cannot import name 'builder'"
@laxmareddyp 已经在做这个了。
开始于 2024年2月29日。
评估
这个 Issue 还没有评估数据。
描述
On my jetson nano : when using models/research/object_detection/exporter_main_v2.py i got the error "ImportError: cannot import name 'builder'
It was working great 1-2 years ago ... :-( but when I try to git clone the tag v2.6.0, there is no research directory ... it contains only Official and Orbit directory ...
how can i do for git clone the repo from tag 2.6.0 with the research directory inside ??
Can someone help me ?
Thanks !
git clone --recursive https://github.com/tensorflow/models.git
cd models/research
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python3 -m pip install .
cd ../..
wget http://download.tensorflow.org/models/object_detection/tf2/20200711/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8.tar.gz
tar -zxf ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8.tar.gz
rm ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8.tar.gz
set_env PYTHONPATH="/env/python:/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models/research:/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models/research/slim:/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models"
mkdir tfmodel_ssd_mobilenet_v2_320x320_coco17_tpu-8
pip3 install tf_slim
sudo cp -r models/official /usr/local/lib/python3.6/dist-packages
python3 models/research/object_detection/exporter_main_v2.py --input_type float_image_tensor --trained_checkpoint_dir ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/checkpoint/ --pipeline_config_path ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/pipeline.config --output_directory tfmodel_ssd_mobilenet_v2_320x320_coco17_tpu-8
I got the error :
Traceback (most recent call last):
File "models/research/object_detection/exporter_main_v2.py", line 104, in <module>
from object_detection import exporter_lib_v2
File "/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models/research/object_detection/exporter_lib_v2.py", line 21, in <module>
from object_detection.builders import model_builder
File "/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models/research/object_detection/builders/model_builder.py", line 23, in <module>
from object_detection.builders import anchor_generator_builder
File "/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models/research/object_detection/builders/anchor_generator_builder.py", line 26, in <module>
from object_detection.protos import anchor_generator_pb2
File "/home/jetson/notebook/Jetbot/6. Détection et suivi d'objet/models/research/object_detection/protos/anchor_generator_pb2.py", line 5, in <module>
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder'
- 主要语言
- Python
- 星标
- 77.6k
- 派生
- 44.8k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/models 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
tensorflow/models#13653 ·
-
object_detection_tutorial.ipynb pretrained model "resnet50 imagenet"可能重新可做 @laxmareddyp 于 202 天前认领,目前没有进行中的 PR。 未关闭type:support
tensorflow/models#13634 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
-
Tag version compatible with Tensorflow 2.20可能重新可做 @bharatjetti 于 277 天前认领,目前没有进行中的 PR。 未关闭models:official type:bug
tensorflow/models#13607 · 1 条评论 · 已指派 1 人 ·
-
models:research type:feature
难度 5/5 一周以上 新手友好度 10/100
tensorflow/models#13600 ·
-
Installation Issues on Python 3.13可能重新可做 @bharatjetti 于 246 天前认领,目前没有进行中的 PR。 未关闭models:official type:bug
tensorflow/models#13587 · 9 条评论 · 已指派 1 人 ·
查看 tensorflow/models 的全部 Issue
相似的 Issue
-
channels:edit check:passed
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
aws-samples/sample-aws-genai-db-modernizer#2097 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 67/100
ietf-tools/datatracker#12027 ·
维护者通常 1 天内回复
-
[Bug]: Python SDK overwrites OVPack backups with HTTP 200 JSON errors可能已有人在做 @stefanielizeth73-art 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
volcengine/OpenViking#7347 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
deepset-ai/haystack-core-integrations#4228 ·
维护者通常 1 天内回复