ImportError: cannot import name ‘model_lib_v2’ from ‘object_detection’ (

ImportError: cannot import name 'model_lib_v2' from 'object_detection' (

Object detection api import error

This was what i managed to do succesfully. Basicallly followed instructions from here Gilbert Tanner github.

git clone

cd models/research

# Compile protos.

protoc object_detection/protos/*.proto –python_out=.

# Install TensorFlow Object Detection API.

i manually copied from packages/tf2 folder to object_detection/packages/tf2/

python -m pip install .

All these ran smoothly without warning messages.

I tested it with

python -c “import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000,1000])))”
and it works fine i got the printed output without any error.

python –csv_input=images/train_labels.csv –image_dir=images/train –output_path=train.record
works as well i got the train.record file.

However, when i tried to Training the model with

python –pipeline_config_path=training/ssd_efficientdet_d0_512x512_coco17_tpu-8.config –model_dir=training –alsologtostderr

this came up.

submitted by /u/slpypnda
[visit reddit] [comments]

Leave a Reply

Your email address will not be published.