I'm following this tutorial ( https://towardsdatascience.com/creating-your-own-object-detector-ad69dda69c85 ) to create my own object detector.
On the topic 'Generating TFRecords for training', whe i try run this code:
python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record
I got this error:
[...]
Traceback (most recent call last):
File "generate_tfrecord.py", line 20, in <module>
from object_detection.utils import dataset_util
ModuleNotFoundError: No module named 'object_detection'
My folder structure:
-generate_tfrecord.py
-images/
--test_labels.csv
--train_labels.csv
--test/
---*files*
--train/
---*files*
Check this:
git clone
Go to folder "research". Open terminal: cd models-master/research
(for 3.6python) python3.6 setup.py build
(for 3.6python) sudo python3.6 setup.py install
Add Libraries to PYTHONPATH
When running locally, the tensorflow/models/research/ and slim directories should be appended to PYTHONPATH. This can be done by running the following from tensorflow/models/research/:
export PYTHONPATH=$PYTHONPATH:
pwd
:pwd
/slim
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.