Unable to import from utils
Im trying to run object detection example. I ran jupyter notebook in object_detection directory. then I opened the notebook file. It is firing the following error
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-956de605e8fe> in <module>()
----> 1 from utils import label_map_util
2
3 from utils import visualization_utils as vis_util
C:\Users\Documents\models-master\models-master\object_detection\utils\label_map_util.py in <module>()
20 import tensorflow as tf
21 from google.protobuf import text_format
---> 22 from object_detection.protos import string_int_label_map_pb2
23
24
ImportError: cannot import name 'string_int_label_map_pb2'
Did you build? There should be a file called string_int_label_map_pb2.py in your python path.
No... i did not run that first... should I run it the first? Where do i find the build file?
There is a build file in the main directory. You should try:
blaze build --config=opt :train
from the object_detection directory.
/CC @derekjchow
I think you should build .proto files first. Please follow the instruction here: https://github.com/tensorflow/models/blob/477ed41e7e4e8a8443bc633846eb01e2182dc68a/object_detection/g3doc/installation.md#protobuf-compilation
may I know what is proto file and why do we need that?
Tensorflow/models is a project with many experimental codes, which contains many .proto files. We have to compile them first to get .py files by a program named "protoc".
发件人:[email protected] 发送时间:2017年7月20日 上午12:24 收件人:[email protected] 回复:[email protected] 抄送:[email protected]; [email protected] 主题:Re: [tensorflow/models] Unable to import from utils (#1969)
may I know what is proto file and why do we need that?
― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/tensorflow/models/issues/1969#issuecomment-316440899, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACYRo5s1l47J0apivnSjBks2LlpAlhfcks5sPi2rgaJpZM4OZszG.
Okay It worked thanks...but i got the following error while executing eval.py
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "eval.py", line 135, in main
assert FLAGS.checkpoint_dir, '`checkpoint_dir` is missing.'
AssertionError: `checkpoint_dir` is missing.
May I know where do I get the checkpoint file for getting the detection as in this link
It's not just the proto files. You need to follow the instructions to build the models.
Again, please use bazel to build.
wow you are a genius.... thanks it worked. Thank you so much!!!...
by the way, Is it possible to get the pretrained model of tensorbox which I can use for detection of just the head? or is there any pretrained model that can detect the heads as in tensorbox?
So I think you'd better follow the instructions I posted earlier.
发件人:[email protected] 发送时间:2017年7月20日 上午12:38 收件人:[email protected] 回复:[email protected] 抄送:[email protected]; [email protected] 主题:Re: [tensorflow/models] Unable to import from utils (#1969)
I got this error while executing it from the root folder (Models folder)
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/tensorflow/models/issues/1969#issuecomment-316444677, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACYRo9SLHftRbR8-sBTTGu7Rjk6sp5j_ks5sPjDlgaJpZM4OZszG.
@Zumbalamambo Please follow the official installation instructions as pointed out by @friskit-china.
We don't officially support Bazel as a build system for the Tensorflow Object Detection API yet, but are considering adding it in the future.
is it possible to simulate tensorbox in object detection api?
@Zumbalamambo what is tensorbox?
This is tensorbox.
Closing this issue since the original error message was solved. Feel free to reopen if still running into issues and also provide additional information. Thanks!
I have followed the install instructions and I have the same error.
Unable to import from utils