Object Detection Train Error - ImportError: cannot import name 'dataset_builder'
I recently updated to tf 1.5 and while trying to invoke train.py under research/object_detection i hit an error saying
ImportError: cannot import name 'dataset_builder'
For more info:
Traceback (most recent call last):
File "train.py", line 50, in <module>
from object_detection.builders import dataset_builder
ImportError: cannot import name 'dataset_builder'
Is there any circular dependency or is it just me that gets this error? Or on your end everything is working?
Details:
- OS: Widows 10
- TensorFlow verion: 1.5
- CUDA 9.0 Cudnn 7
- Python ver: 3.6.2
- GPU: Nvidia 930MX - 2Gb Ram
- Tf installed from pip3
Command
py train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_inception_v2_coco.config
Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary? Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in the Github new issue template.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!
Sorry about that. I gave all the required details above in a post edit. If you need further details let me know. Meanwhile i will keep trying to make it work and post updates here if i make it work.
You may need to execute from one directory up... py object_detection/train.py --logtostderr --train_dir=object_detection/training/ --pipeline_config_path=object_detection/training/ssd_inception_v2_coco.config
The builders folder is in /object_detection folder.
@darraghdog No difference. Still the same error. I will get the latest clone of the repo in a few days and try again with it.
@alensaqe I got the same problem, Had you solve the problem?
@liu09114 not yet. I have not worked on it a lot lately. If i go around the issue i will make sure to update the thread!
Hi everyone, I get the same error too and I'm executing the command from one directory up as @darraghdog suggested. Inference works without problem.
Well, I solved this and thought to share it with others. The point is to move the train.py code to one directory up and then execute it!!! (I was doing this before: python3 object_detection/train.py blah blah, which is pointless!). I don't why such a thing isn't considered in the code in the first place!
Thank you for sharing! I might close this issue then and i will test it again. I might move all my training to the cloud anyway!
I meet the problem when i run Google object detection model. Maybe the solution is useful for you. You need put the slim to PYTHONPATH. The specific method is to execute this: export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim . you can have a try.
I have the same problem. I've tried what's written here, but the problem continues.
Traceback (most recent call last):
File "object_detection/train.py", line 49, in