• 安裝 anaconda protobug
    conda install -c anaconda protobuf
    pip install pillow
    pip install lxml
    pip install Cython
    pip install jupyter
    pip install matplotlib
    pip install pandas
    pip install opencv-python
  • Compile Protobufs and run setup.py
    在 \models\research 目錄下執行 
    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
    設定環境變數 PYTHONPATH (要把 C:\tensorflow 更換成你的路徑)
    set PYTHONPATH=C:\tensorflow\models;C:\tensorflow\models\research;C:\tensorflow\models\research\slim
     
    然後開始 Build & Install
    python setup.py build
    python setup.py install
    
  • 檢查是否成功
    切換至 models\research\object_detection 執行
    jupyter notebook object_detection_tutorial.ipynb
回應
訪客如要回應,請先 登入