Open rrrtype opened 5 years ago
Try This one with Python 2
%cd ~
!git clone --quiet https://github.com/tensorflow/models.git
!apt-get install -qq protobuf-compiler python-tk
!pip install -q Cython contextlib2 pillow lxml matplotlib PyDrive
!pip install -q pycocotools
%cd ~/models/research !protoc object_detection/protos/*.proto --python_out=.
!python setup.py build !python setup.py install
%cd slim !pip install -e .
%cd .. !python object_detection/builders/model_builder_test.py
facing issues while running tfrecord code:
!python ~/models/research/object_detection/dataset_tools/create_pet_tf_record.py --label_map_path=label_map.pbtxt --data_dir=. --output_dir=. --num_shards=1
ERROR
/root/datalab
Traceback (most recent call last):
File "/root/models/research/object_detection/dataset_tools/create_pet_tf_record.py", line 318, in
@RomRoc any help will be great .
Try this, just change content into root
import os os.environ['PYTHONPATH'] += ':/root/models/research/:/root/models/research/slim/' !set PYTHONPATH=C:\root\models\research\slim !python object_detection/builders/model_builder_test.py
this worked for me
I did run Install required packages but,looks like /root fatal: destination path 'models' already exists and is not an empty directory. /root/models/research Traceback (most recent call last): File "object_detection/builders/model_builder_test.py", line 23, in
from object_detection.builders import model_builder
ModuleNotFoundError: No module named 'object_detection'
and I did %cd
!git clone --quiet https://github.com/tensorflow/models.git
!apt-get install -qq protobuf-compiler python-tk
!pip install -q Cython contextlib2 pillow lxml matplotlib PyDrive
!pip install -q pycocotools
%cd ~/models/research !protoc object_detection/protos/*.proto --python_out=.
import os os.environ['PYTHONPATH'] += ':/content/models/research/:/content/models/research/slim/' %cd ~/models/research !python setup.py build !python setup.py install %cd ~/models/research/slim !pip install -e !export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim
%cd ~/models/research !python object_detection/builders/model_builder_test.py but,looks like
Traceback (most recent call last): File "object_detection/builders/model_builder_test.py", line 23, in
from object_detection.builders import model_builder
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/builders/model_builder.py", line 35, in
from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py", line 28, in
from nets import inception_resnet_v2
ModuleNotFoundError: No module named 'nets'