seraj94ai / Train-Object-Detection-Classifier

How To Train an Object Detection Classifier for Multiple Objects Using TensorFlow (GPU) on Windows 10
12 stars 18 forks source link

python: can't open file 'train.py': [Errno 2] No such file or directory WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. #3

Open maz483 opened 5 years ago

maz483 commented 5 years ago

Hello, I followed all the tutorial and at the end received below Errors. 1) First i used python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_inception_v2_coco.config and Received below Error. (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config python: can't open file 'train.py': [Errno 2] No such file or directory

2) Then I found that to use legacy and i wrote as below
(tensorflow1) C:\tensorflow1\models\research\object_detection>python legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

Traceback (most recent call last): File "legacy/train.py", line 51, in from object_detection.builders import model_builder File "C:\Pyth\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 27, in from object_detection.builders import post_processing_builder File "C:\Pyth\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\post_processing_builder.py", line 22, in from object_detection.protos import post_processing_pb2 File "C:\Pyth\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\post_processing_pb2.py", line 15, in from object_detection.protos import calibration_pb2 as objectdetection_dot_protos_dot_calibrationpb2 ImportError: cannot import name 'calibration_pb2' from 'object_detection.protos' (C:\Pyth\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos__init__.py)

Please help to solve this issue efficiently

hussamsayeed commented 5 years ago

Even i got the same issue.can anyone please help me out.

oumaimafadi commented 5 years ago

same problem anyone?

RajiniRajini commented 4 years ago

I have the following Error when I run the file generate_tfrecord.py

(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 2020-02-24 13:50:13.588909: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll Traceback (most recent call last): File "generate_tfrecord.py", line 17, in import tensorflow as tf File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow__init.py", line 101, in from tensorflow_core import * File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core__init.py", line 40, in from tensorflow.python.tools import module_util as _module_util File "", line 968, in _find_and_load File "", line 949, in _find_and_load_unlocked File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow__init.py", line 50, in getattr__ module = self._load() File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow\init__.py", line 44, in _load module = _importlib.import_module(self.name) File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\python__init__.py", line 64, in from tensorflow.core.framework.graph_pb2 import * File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\core\framework\graph_pb2.py", line 16, in from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_nodedefpb2 File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\core\framework\node_def_pb2.py", line 16, in from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attrvaluepb2 File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\core\framework\attr_value_pb2.py", line 16, in from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensorpb2 File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\core\framework\tensor_pb2.py", line 16, in from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resourcehandle__pb2 File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\core\framework\resource_handle_pb2.py", line 16, in from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensorshape__pb2 File "C:\Users\KSREERANG.conda\envs\tensorflow1\lib\site-packages\tensorflow_core\core\framework\tensor_shape_pb2.py", line 112, in 'module' : 'tensorflow.core.framework.tensor_shape_pb2' TypeError: expected bytes, Descriptor found

Can anyone help me to solve this problem

ihssenedr commented 4 years ago

@RajiniRajini pip install --ignore-installed --upgrade tensorflow-gpu==1.15.0