How to resolve the error “cannot import name 'string_int_label_map_pb2' from 'object_detection.protos'”

ⅰ亾dé卋堺 提交于 2020-12-27 07:23:54

问题


My friends and I are partaking in a hackathon and are stuck on this one tutorial on training an object detection model:

https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html

But after three people have tried to follow the above tutorial to the letter, we are all stuck on the creating TfRecord step:

https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#create-tensorflow-records

We get the error message:

ImportError: cannot import name 'string_int_label_map_pb2' from 'object_detection.protos'

We are three different people, with three different machines, getting this result, and have spent in total 20+ person-hours googling, retrying, sacrificing things to eldritch gods and nothing gets us passed this hurdle.

Is there a better way of achieving the result, or a fix for the issue? We are inexperienced with Tensorflow and are just wanting to use it to train a model that can be converted to an onnx model that will be consumed by ml.net.


回答1:


Thanks to @EdwinCheong for pointing us in the correct direction.

The issue was resolved by basically downloading the Windows 10 SDK and a bunch of c++ -related packages in the Visual Studio Installer before following this linked tutorial: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install related to installing object detection. CUDA seems to be required regardless of what the tutorial says



来源:https://stackoverflow.com/questions/64856785/how-to-resolve-the-error-cannot-import-name-string-int-label-map-pb2-from-ob

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!