TensorFlow Object Detection API

发布时间:2026/7/23 9:35:07
TensorFlow Object Detection API 安装验证测试打开anaconda _prompt输入命令行创建虚拟环境 conda create -n dl_21project python3.8 -y conda activate dl_21project 安装基础 python -m pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple python -m pip install tf_slim pillow lxml matplotlib opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple 下载protoc下载3.20.3与python中的protobuf 包版本一致才能使用 解压到D:\protoc 安装Python protobuf 包 python -m pip install protobuf3.20.3 -i https://pypi.tuna.tsinghua.edu.cn/simple 验证 set PATHD:\protoc\bin;%PATH% protoc --version python -c import google.protobuf; print(google.protobuf.__version__) 克隆TensorFlow Models 仓库 D: cd D:\Deep-Learning-21-Examples\chapter_3 git clone https://github.com/tensorflow/models.git models_tf 编译 Protobuf 文件 cd D:\Deep-Learning-21-Examples\chapter_3\models_tf\research protoc object_detection/protos/*.proto --python_out. 安装 Object Detection API copy object_detection\packages\tf2\setup.py . python -m pip install . 配置环境 变量名PYTHONPATH变量值D:\Deep-Learning-21Examples\chapter_3\models_tf\research;D:\Deep-Learning-21-Examples\chapter_3\models_tf\research\slim执行训练好的模型