執行create_pet_tf_record.py 找不到object_detection.protos
不好意思, 不太熟悉Python module path 怎樣運作,請指教...
object_detection.protos/string_int_label_map_pb2.py 是建在的, 但不知為何找不到。
!pwd
/content/gdrive/My Drive/models/research
for path in sys.path:
print(path)
/env/python /usr/lib/python36.zip /usr/lib/python3.6 /usr/lib/python3.6/lib-dynload /usr/local/lib/python3.6/dist-packages /usr/lib/python3/dist-packages /usr/local/lib/python3.6/dist-packages/IPython/extensions /root/.ipython
!python object_detection/dataset_tools/create_pet_tf_record.py \
--label_map_path=object_detection/data/pet_label_map.pbtxt \
--data_dir=/content/gdrive/My\ Drive/models/research \
--output_dir=/content/gdrive/My\ Drive/models/research
!ls *.record*
2020-04-13 11:21:40.452298: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 Traceback (most recent call last): File "object_detection/dataset_tools/create_pet_tf_record.py", line 44, in <module> from object_detection.utils import label_map_util File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/label_map_util.py", line 27, in <module> from object_detection.protos import string_int_label_map_pb2 ImportError: cannot import name 'string_int_label_map_pb2' ls: cannot access '*.record*': No such file or directory