安装paddle detection心得

一、安装PaddlePaddle

复制代码
conda create -n mypaddle python=3.8   

conda activate mypaddle  

python -m pip install paddlepaddle-gpu==2.6.0 -i https://mirror.baidu.com/pypi/simple

请确保您的PaddlePaddle安装成功并且版本不低于需求版本。使用以下命令进行验证。

这是CUDA11.8 的 PaddlePaddle。

复制代码
# 在您的Python解释器中确认PaddlePaddle安装成功
>>> import paddle
>>> paddle.utils.run_check()

# 确认PaddlePaddle版本
python -c "import paddle; print(paddle.__version__)"

二、安装PaddleDetection

一定要先安装vs环境,特别是c++,要不然后面就麻烦

复制代码
# 克隆PaddleDetection仓库
cd <path/to/clone/PaddleDetection>
git clone https://github.com/PaddlePaddle/PaddleDetection.git

# 安装其他依赖
cd PaddleDetection
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

# 编译安装paddledet
python setup.py install

注意

如果github下载代码较慢,可尝试使用gitee或者代理加速。

若您使用的是Windows系统,由于原版cocoapi不支持Windows,pycocotools依赖可能安装失败,

但是如果安装了vs的c++应该没问题了。

如果运气不太好,可能发生下面的事情

可采用第三方实现版本,该版本仅支持Python3

复制代码
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

若您使用的是Python <= 3.6的版本,安装pycocotools可能会报错distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cython>=0.27.3'), 您可通过先安装cython如pip install cython解决该问题

如果运气好,安装成功的话,安装后确认测试通过:

复制代码
python ppdet/modeling/tests/test_architectures.py

测试通过后会提示如下信息:

.......


Ran 7 tests in 12.816s

OK

相关推荐
国服第二切图仔2 天前
基于文心开源大模型ERNIE-4.5-0.3B-Paddle私有化部署并构建一个企业智能客服系统
百度·开源·智能客服·知识库·文心大模型·paddle·gitcode
LucianaiB4 天前
百度开源文心4.5系列开源21款模型,实测 ERNIE-4.5-VL-28B-A3B-Paddle 多项评测结果超 Qwen3-235B-A22B
百度·开源·文心大模型·paddle·gitcode
国服第二切图仔5 天前
文心开源大模型ERNIE-4.5-0.3B-Paddle私有化部署保姆级教程及技术架构探索
百度·架构·开源·文心大模型·paddle·gitcode
qq_wuqingdefeng2 个月前
paddle 打包代码 ocr
ocr·paddle
BlackPercy2 个月前
【paddle】常见的数学运算
paddle
米饭咔咔吃2 个月前
飞桨paddle import fluid报错【已解决】
人工智能·paddlepaddle·paddle
米饭咔咔吃2 个月前
飞桨paddle ‘ParallelEnv‘ object has no attribute ‘_device_id‘【已解决】
人工智能·paddlepaddle·paddle
隐形喷火龙2 个月前
paddle ocr本地化部署进行文字识别
ocr·paddle
我变成了柴犬2 个月前
PaddleClas 车辆属性模型vehicle_attribute_model转onnx并部署
paddle
令狐少侠20112 个月前
ai之paddleOCR 识别PDF python312和paddle版本冲突 GLIBCXX_3.4.30
人工智能·pdf·paddle