Tensorflow Object Detection API安装——Ubuntu
安装anaconda
安装教程
注意:不要用sudo安装!
创建虚拟环境
conda create -n tf14 python=3.7
安装Tensorflow-gpu
conda install tensorflow-gpu=1.14
安装pycocotools
pip install pycocotools
安装Tensorflow Object Detection API
- 下载模型文件https://github.com/tensorflow/models
- 上传到服务器,解压
- 安装
cd models-master/research
protoc object_detection/protos/*.proto --python_out=.
python setup.py install
cd slim
python setup.py install
cd ..
python object_detection/builders/model_builder_test.py
-
BUG记录
-
NameError: name ‘unicode’ is not defined
参考:https://blog.csdn.net/xy707707/article/details/80698086 -
TypeError: resnet_v1_50() got an unexpected keyword argument 'min_base_depth’2.
-
with tf.variable_scope(
self._resnet_scope_name, reuse=self._reuse_weights) as scope:
with slim.arg_scope(resnet_v1.resnet_arg_scope()):
with (slim.arg_scope(self._conv_hyperparams_fn())
if self._override_base_feature_extractor_hyperparams else
context_manager.IdentityContextManager()):
_,image_features = self._resnet_base_fn(
inputs=ops.pad_to_multiple(preprocessed_inputs,
self._pad_to_multiple),
num_classes=None,
is_training=None,
global_pool=False,
output_stride=None,
store_non_strided_activations=True) #括号填在这里
#min_base_depth=self._min_depth,
#depth_multiplier=self._depth_multiplier)
#scope=self.scope
)