EdjeElectronics / TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

How to train a TensorFlow Object Detection Classifier for multiple object detection on Windows
Apache License 2.0
2.92k stars 1.3k forks source link

Import error #482

Open theman162 opened 4 years ago

theman162 commented 4 years ago

Hi i have been having this problem is there any solution for this i am using tensorflow cpu btw as the author said it is possible (tensorflow1) C:\tensorflow1\models\research\object_detection>python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record Traceback (most recent call last): File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\vilsuresh\anaconda3\lib\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\Users\vilsuresh\anaconda3\lib\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "generate_tfrecord.py", line 17, in import tensorflow as tf File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow__init.py", line 101, in from tensorflow_core import * File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core__init.py", line 40, in from tensorflow.python.tools import module_util as _module_util File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow__init.py", line 50, in getattr__ module = self._load() File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow\init__.py", line 44, in _load module = _importlib.import_module(self.name) File "C:\Users\vilsuresh\anaconda3\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper()

File "C:\Users\vilsuresh\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\vilsuresh\anaconda3\lib\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\Users\vilsuresh\anaconda3\lib\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

satyamedh commented 4 years ago

@theman162 , u must have install cuda(GPU) version of tf. do python3 -m pip uninstall tensorflow-gpu && python3 -m pip install tensorflow==1.15.0

Satyamedh