Answer a question

i try to train.py in object_detection in under git url

https://github.com/tensorflow/models/tree/master/research/object_detection

However, the following error occurs.

ModuleNotFoundError: No module named 'object_detection'

So I tried to solve the problem by writing the following code.

import sys

sys.path.append('/home/user/Documents/imgmlreport/inception/models/research/object_detection')
from object_detection.builders import dataset_builder

This problem has not been solved yet.

The directory structure is shown below.

~/object_detection/train.py

~/object_detection/builders/dataset_bulider.py

and here is full error massage

/home/user/anaconda3/lib/python3.6/site-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated.

In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters

Traceback (most recent call last):

File "train.py", line 52, in import trainer

File"/home/user/Documents/imgmlreport/inception/models/research/object_detection/trainer.py", line 26, in from object_detection.builders import optimizer_builder

ModuleNotFoundError: No module named 'object_detection'

how can i import modules?

Answers

Try install Tensorflow Object Detection Library Packaged

pip install tensorflow-object-detection-api
Logo

Python社区为您提供最前沿的新闻资讯和知识内容

更多推荐