python - 如何解决错误“无法从'object_detection.protos'导入名称'string_int_label_map_pb2'”
问题描述
我和我的朋友们正在参加一个黑客马拉松,并且被困在这个关于训练对象检测模型的教程中:
https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html
但是在三个人尝试按照上面的教程写信之后,我们都卡在了创建 TfRecord 的步骤上:
我们收到错误消息:
ImportError:无法从“object_detection.protos”导入名称“string_int_label_map_pb2”
我们是三个不同的人,拥有三台不同的机器,得到了这个结果,并且总共花费了 20 多个小时的谷歌搜索、重试、向可怕的神献祭,没有任何东西能让我们通过这个障碍。
是否有更好的方法来实现结果或解决问题?我们对 Tensorflow 缺乏经验,只是想用它来训练一个模型,该模型可以转换为将由 ml.net 使用的 onnx 模型。
解决方案
感谢@EdwinCheong为我们指明了正确的方向。
在遵循此链接教程之前,基本上通过在 Visual Studio 安装程序中下载 Windows 10 SDK 和一堆与 c++ 相关的包来解决该问题: https ://tensorflow-object-detection-api-tutorial.readthedocs.io/en/ latest/install.html#tf-models-install与安装对象检测相关。无论教程说什么,似乎都需要 CUDA
推荐阅读
- c - 在 *.hxx 中声明的无效函数,在 *.cxx 中定义但在 *.c 中未定义
- python - 在类似字节的对象上使用 csv.Sniffer
- firebase - Flutter:调用setData时从firstore中获取文档ID
- java - 如何在 Tomcat 8.5 中部署 Spring Boot 使用外部配置文件
- c# - 从模型中获取空值
- hyperledger-fabric - 尝试实例化 Chaincode 时出错“未能反序列化创建者身份,err msp usermsp 未知”
- python - 如何解决:我的第二个 if 语句出现语法错误,我不知道为什么?
- buffer - DirectX 11,使用 UpdateSubresource 更新常量缓冲区时引发异常
- c++ - 类模板的条件无效成员函数(隐式实例化有效;显式实例化失败)
- amazon-web-services - 如何在更新 AWS Dynamo DB 条目时收到通知?