问题
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