Tensorflow Object Detection API 安装验证(三)

根据前面两篇博文的准备,现在测试

kou@aikou:~/tensorflow/models/research$  python object_detection/builders/model_builder_test.py
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 21, in 
    from object_detection.builders import model_builder
  File "/home/kou/tensorflow/models/research/object_detection/builders/model_builder.py", line 18, in 
    from object_detection.builders import anchor_generator_builder
  File "/home/kou/tensorflow/models/research/object_detection/builders/anchor_generator_builder.py", line 21, in 
    from object_detection.protos import anchor_generator_pb2
  File "/home/kou/tensorflow/models/research/object_detection/protos/anchor_generator_pb2.py", line 16, in 
    from object_detection.protos import ssd_anchor_generator_pb2 as object__detection_dot_protos_dot_ssd__anchor__generator__pb2
  File "/home/kou/tensorflow/models/research/object_detection/protos/ssd_anchor_generator_pb2.py", line 22, in 
    serialized_pb=_b('\n2object_detection/protos/ssd_anchor_generator.proto\x12\x17object_detection.protos\"\xf2\x02\n\x12SsdAnchorGenerator\x12\x15\n\nnum_layers\x18\x01 \x01(\x05:\x01\x36\x12\x16\n\tmin_scale\x18\x02 \x01(\x02:\x03\x30.2\x12\x17\n\tmax_scale\x18\x03 \x01(\x02:\x04\x30.95\x12\x0e\n\x06scales\x18\x0c \x03(\x02\x12\x15\n\raspect_ratios\x18\x04 \x03(\x02\x12*\n\x1finterpolated_scale_aspect_ratio\x18\r \x01(\x02:\x01\x31\x12*\n\x1creduce_boxes_in_lowest_layer\x18\x05 \x01(\x08:\x04true\x12\x1d\n\x12\x62\x61se_anchor_height\x18\x06 \x01(\x02:\x01\x31\x12\x1c\n\x11\x62\x61se_anchor_width\x18\x07 \x01(\x02:\x01\x31\x12\x15\n\rheight_stride\x18\x08 \x03(\x05\x12\x14\n\x0cwidth_stride\x18\t \x03(\x05\x12\x15\n\rheight_offset\x18\n \x03(\x05\x12\x14\n\x0cwidth_offset\x18\x0b \x03(\x05')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
kou@aikou:~/tensorflow/models/research$ 

仍然提示:

TypeError: __new__() got an unexpected keyword argument 'serialized_options'

与第1篇博文错误提示一样。参考这个博文处理: https://stackoverflow.com/questions/50338968/objectdetecionapi-typeerror-new-got-an-unexpected-keyword-argument-seria

执行如下命令:

$ pip install -U protobuf
Collecting protobuf
  Downloading https://files.pythonhosted.org/packages/c2/f9/28787754923612ca9bfdffc588daa05580ed70698add063a5629d1a4209d/protobuf-3.6.1-cp36-cp36m-manylinux1_x86_64.whl (1.1MB)
    100% |████████████████████████████████| 1.1MB 42kB/s 
Requirement already satisfied, skipping upgrade: setuptools in /home/kou/anaconda3/lib/python3.6/site-packages (from protobuf) (36.5.0.post20170921)
Requirement already satisfied, skipping upgrade: six>=1.9 in /home/kou/anaconda3/lib/python3.6/site-packages (from protobuf) (1.11.0)
Installing collected packages: protobuf
  Found existing installation: protobuf 3.5.0.post1
    Uninstalling protobuf-3.5.0.post1:
      Successfully uninstalled protobuf-3.5.0.post1
Successfully installed protobuf-3.6.1
kou@aikou:~/tensorflow/models/research$ protoc --version
libprotoc 3.6.1

再执行 Tensorflow Object Detction API 测试脚本

$ python object_detection/builders/model_builder_test.py
..................
----------------------------------------------------------------------
Ran 18 tests in 0.080s

OK

执行成功

你可能感兴趣的:(Tensor,Flow)