【Paddle Detection】跳坑总结

简介:

先贴上PaddleDetection官方连接:https://github.com/PaddlePaddle/PaddleDetection https://paddledetection.readthedocs.io/

(根据实操,个人认为按照官方文档安装不会出大问题,但是不能保证完全没问题)

PaddleDetection是基于PaddlePaddle的端到端目标检测开发套件,在模块化设计中实现了多种主流目标检测、实例分割、跟踪和关键点检测算法,具有网络组件、数据增强和丢失等可配置模块,并发布了多种SOTA行业实践模型,集成了模型压缩和跨平台高性能部署的能力,旨在帮助开发人员整体以更快、更好的方式进行端到端开发。
PaddleDetection提供图像处理功能,如对象检测,实例分割,多目标跟踪,关键点检测等。


问题1

安装好paddlepaddle,python解释器中输入import paddleimport paddle.fluid出现类似如下Warning:

DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

这是一个imp模块弃用警告,取而代之的时importlib
解决方法:
1.可以直接不管它,不影响运行
2.不想看见它也可以手动打开相应文档将imp修改成importlib


问题2

paddlepaddle安装测试paddle. fluid.install_check.run_check()报错:

OSError: (External) CUSOLVER error(7). 
  [Hint: 'CUSOLVER_STATUS_INTERNAL_ERROR'. An internal cuSolver operation failed. This error is usually caused by a cudaMemcpyAsync() failure.To correct: check that the hardware, an appropriate version of the driver, and the cuSolver library are correctly installed. Also, check that the memory passed as a parameter to the routine is not being deallocated prior to the routine’s completion.] (at /paddle/paddle/fluid/platform/device_context.h:418)

我使用的是学校的服务器,所以有多块gpu,而且存在被别人占满的情况,

解决方法:

nvidia-smi

查看占用情况,然后挑选一块可用的gpu ‘x’

export CUDA_VISIBLE_DEVICES=x

再次运行, 成功

Your Paddle Fluid works well on SINGLE GPU or CPU.
Your Paddle Fluid works well on MUTIPLE GPU or CPU.
Your Paddle Fluid is installed successfully! Let's start deep Learning with Paddle Fluid now


问题3

paddlepaddle安装测试paddle. fluid.install_check.run_check()报错RuntimeError: (PreconditionNotMet) Cannot load cudnn shared library. Cannot invoke method cudnnGetVersion.:

RuntimeError: (PreconditionNotMet) Cannot load cudnn shared library. Cannot invoke method cudnnGetVersion.
  [Hint: cudnn_dso_handle should not be null.] (at /paddle/paddle/fluid/platform/dynload/cudnn.cc:59)


cuda和cudnn的位置一般默认在/usr/local下,如果你也和我一样找不到,可以尝试将paddlepaddle-gpu的安装方式从pip改成conda安装(记得要在conda环境下)

官方通过conda安装paddle的链接:

https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/conda/linux-conda.html

解决方法:

conda install paddlepaddle-gpu==2.2.2 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge 

再次运行, 成功

>>> import paddle
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ... 
W0318 17:43:11.313911 25840 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.4, Runtime API Version: 11.2
W0318 17:43:11.315970 25840 device_context.cc:465] device: 0, cuDNN Version: 8.1.
PaddlePaddle works well on 1 GPU.
W0318 17:43:13.095731 25840 parallel_executor.cc:617] Cannot enable P2P access from 0 to 1
W0318 17:43:13.095757 25840 parallel_executor.cc:617] Cannot enable P2P access from 0 to 2
W0318 17:43:13.095762 25840 parallel_executor.cc:617] Cannot enable P2P access from 1 to 0
W0318 17:43:13.095764 25840 parallel_executor.cc:617] Cannot enable P2P access from 1 to 2
W0318 17:43:13.095768 25840 parallel_executor.cc:617] Cannot enable P2P access from 2 to 0
W0318 17:43:13.095772 25840 parallel_executor.cc:617] Cannot enable P2P access from 2 to 1
W0318 17:43:18.973172 25840 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 3 GPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.


问题4

paddledetection安装测试
python ppdet/modeling/tests/test_architectures.py失败:

-----------------------------------------------------------------
Ran 7 tests in 14.421s

FAILED(errors=7)

官方没有提供解决方法,网上找到的方法对我也不适用

我的可行解决过程(CUDA Version11.1):
将官网建议安装的paddlepaddle-gpu2.2.0版本改成下载2.2.2版本
再次运行,成功


<未完>

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
PaddleDetection是一个目标检测库,用于训练和部署目标检测模型。你可以通过以下命令克隆PaddleDetection库到本地:cd <path/to/clone/PaddleDetection> git clone https://github.com/PaddlePaddle/PaddleDetection.git \[1\]。另外,你也可以直接下载已经准备好的PaddleDetection压缩包并解压使用。在工作目录下提供了PaddleDetection.zip文件,你可以使用以下命令解压:!unzip -o /home/aistudio/work/PaddleDetection.zip \[2\]。 安装PaddleDetection时,你可以参考GitHub上的安装文档。请注意,PaddleDetection的最新版本可能与《入门使用教程》中的安装方式有所不同。确保你的环境满足PaddlePaddle 2.2以上的要求。以下是安装PaddleDetection的一般步骤:cd <path> #切换到自己要安装PaddleDetection的安装目录 git clone https://github.com/PaddlePaddle/PaddleDetection.git #克隆PaddleDetection仓库 cd PaddleDetection pip install -r requirements.txt #安装其他依赖 python setup.py install #编译安装paddledet \[3\]。 #### 引用[.reference_title] - *1* [PaddleDetection使用教程](https://blog.csdn.net/qq_40502460/article/details/117480800)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [PaddleDetection目标检测任务简介和概述](https://blog.csdn.net/tegddhdrhdd/article/details/121328678)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [PaddleDetection简单教程](https://blog.csdn.net/qq_56591814/article/details/126006273)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值