Closed Kiwigamer closed 4 years ago
This is probably because you need to add input_reader to the protoc command.
Try this: protoc --python_out=. .\object_detection\protos\input_reader.proto
When i try this i get this:
(tensorflow1) C:\tensorflow1\models\research\object_detection>protoc --python_out=. .\object_detection\protos\input_reader.proto .\object_detection\protos\input_reader.proto: No such file or directory
so then in /research
(tensorflow1) C:\tensorflow1\models\research>protoc --python_out=. .\object_detection\protos\input_reader.proto object_detection/protos/input_reader.proto: warning: Import object_detection/protos/image_resizer.proto but not used.
That's fine, it's just a warning.
but then i get the same error then before
Re-run the python build and install commands in the tutorial.
Same error
Ok go to the models/research directory.
Enter the following:
protoc --python_out=. ./object_detection/protos/anchor_generator.proto ./object_detection/protos/argmax_matcher.proto ./object_detection/protos/bipartite_matcher.proto ./object_detection/protos/box_coder.proto ./object_detection/protos/box_predictor.proto ./object_detection/protos/eval.proto ./object_detection/protos/faster_rcnn.proto ./object_detection/protos/faster_rcnn_box_coder.proto ./object_detection/protos/grid_anchor_generator.proto ./object_detection/protos/hyperparams.proto ./object_detection/protos/image_resizer.proto ./object_detection/protos/input_reader.proto ./object_detection/protos/losses.proto ./object_detection/protos/matcher.proto ./object_detection/protos/mean_stddev_box_coder.proto ./object_detection/protos/model.proto ./object_detection/protos/optimizer.proto ./object_detection/protos/pipeline.proto ./object_detection/protos/post_processing.proto ./object_detection/protos/preprocessor.proto ./object_detection/protos/region_similarity_calculator.proto ./object_detection/protos/square_box_coder.proto ./object_detection/protos/ssd.proto ./object_detection/protos/ssd_anchor_generator.proto ./object_detection/protos/string_int_label_map.proto ./object_detection/protos/train.proto ./object_detection/protos/keypoint_box_coder.proto ./object_detection/protos/multiscale_anchor_generator.proto ./object_detection/protos/graph_rewriter.proto ./object_detection/protos/calibration.proto ./object_detection/protos/flexible_grid_anchor_generator.proto ./object_detection/protos/center_net.proto
The only result you should get back is a warning, saying:
object_detection/protos/input_reader.proto: warning: Import object_detection/protos/image_resizer.proto but not used.
Then, in that same directory, run:
python setup.py build
and then
python setup.py install
Re-run all commands after this point, including xml to csv and generate_tfrecord.py
Let me know if that helps
After a few more complcations,it finally worked, so far
Ok go to the models/research directory.
Enter the following:
protoc --python_out=. ./object_detection/protos/anchor_generator.proto ./object_detection/protos/argmax_matcher.proto ./object_detection/protos/bipartite_matcher.proto ./object_detection/protos/box_coder.proto ./object_detection/protos/box_predictor.proto ./object_detection/protos/eval.proto ./object_detection/protos/faster_rcnn.proto ./object_detection/protos/faster_rcnn_box_coder.proto ./object_detection/protos/grid_anchor_generator.proto ./object_detection/protos/hyperparams.proto ./object_detection/protos/image_resizer.proto ./object_detection/protos/input_reader.proto ./object_detection/protos/losses.proto ./object_detection/protos/matcher.proto ./object_detection/protos/mean_stddev_box_coder.proto ./object_detection/protos/model.proto ./object_detection/protos/optimizer.proto ./object_detection/protos/pipeline.proto ./object_detection/protos/post_processing.proto ./object_detection/protos/preprocessor.proto ./object_detection/protos/region_similarity_calculator.proto ./object_detection/protos/square_box_coder.proto ./object_detection/protos/ssd.proto ./object_detection/protos/ssd_anchor_generator.proto ./object_detection/protos/string_int_label_map.proto ./object_detection/protos/train.proto ./object_detection/protos/keypoint_box_coder.proto ./object_detection/protos/multiscale_anchor_generator.proto ./object_detection/protos/graph_rewriter.proto ./object_detection/protos/calibration.proto ./object_detection/protos/flexible_grid_anchor_generator.proto ./object_detection/protos/center_net.proto
The only result you should get back is a warning, saying:object_detection/protos/input_reader.proto: warning: Import object_detection/protos/image_resizer.proto but not used.
Then, in that same directory, run:
python setup.py build
and then
python setup.py install
Re-run all commands after this point, including xml to csv and generate_tfrecord.py
Let me know if that helps
ImportError: cannot import name 'fpn_pb2' Now i get this error after running the train.py. Any solution?
i have the same problem. anyone can fix it.
After a few more complcations,it finally worked, so far
sir how you fixing the error ?
Ok go to the models/research directory.
Enter the following:
protoc --python_out=. ./object_detection/protos/anchor_generator.proto ./object_detection/protos/argmax_matcher.proto ./object_detection/protos/bipartite_matcher.proto ./object_detection/protos/box_coder.proto ./object_detection/protos/box_predictor.proto ./object_detection/protos/eval.proto ./object_detection/protos/faster_rcnn.proto ./object_detection/protos/faster_rcnn_box_coder.proto ./object_detection/protos/grid_anchor_generator.proto ./object_detection/protos/hyperparams.proto ./object_detection/protos/image_resizer.proto ./object_detection/protos/input_reader.proto ./object_detection/protos/losses.proto ./object_detection/protos/matcher.proto ./object_detection/protos/mean_stddev_box_coder.proto ./object_detection/protos/model.proto ./object_detection/protos/optimizer.proto ./object_detection/protos/pipeline.proto ./object_detection/protos/post_processing.proto ./object_detection/protos/preprocessor.proto ./object_detection/protos/region_similarity_calculator.proto ./object_detection/protos/square_box_coder.proto ./object_detection/protos/ssd.proto ./object_detection/protos/ssd_anchor_generator.proto ./object_detection/protos/string_int_label_map.proto ./object_detection/protos/train.proto ./object_detection/protos/keypoint_box_coder.proto ./object_detection/protos/multiscale_anchor_generator.proto ./object_detection/protos/graph_rewriter.proto ./object_detection/protos/calibration.proto ./object_detection/protos/flexible_grid_anchor_generator.proto ./object_detection/protos/center_net.proto
The only result you should get back is a warning, saying:object_detection/protos/input_reader.proto: warning: Import object_detection/protos/image_resizer.proto but not used.
Then, in that same directory, run:
python setup.py build
and then
python setup.py install
Re-run all commands after this point, including xml to csv and generate_tfrecord.py
Let me know if that helps
On running that code, for every line of command I am getting this error. So what can I do?
C:\Users\ASUS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages>protoc --python_out=. ./object_detection/protos/losses.proto Could not make proto path relative: ./object_detection/protos/losses.proto: No such file or directory
I followed the tutorial exactly and did everything exactly as it was written. I started all over again and twice the same mistake:
`(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config 2020-06-23 11:00:32.995237: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found 2020-06-23 11:00:33.002556: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "train.py", line 53, in
from object_detection.builders import model_builder
File "C:\tensorflow1\models\research\object_detection\builders\model_builder.py", line 38, in
from object_detection.protos import model_pb2
File "C:\tensorflow1\models\research\object_detection\protos\model_pb2.py", line 15, in
from object_detection.protos import center_net_pb2 as objectdetection_dot_protos_dot_centernet__pb2
ImportError: cannot import name 'center_net_pb2'
(tensorflow1) C:\tensorflow1\models\research\object_detection>`