PyTorch GPU 与虚拟内存

接引前文《Windows 10 yolov5 GPU环境》,配置完成之后,一度因为虚拟内存没什么太大用处。原有设置的虚拟内存c盘(系统盘)为4096-8192。在我将虚拟内存改成1024-2048之后,然后tm报错了。就是上面的的这个错误:RuntimeError: Unable to find a valid cuDNN algorithm to run convolution。但是实际上,错误和cuda没有直接关系,目前我还不太清楚为什么虚拟内存直接关系到了cuda的运行环境,或者说pytorch的运行环境。网上搜了一下也没找到相关的资料,主要应该是我的理解太浅显。 

Continue Reading

yolov5 训练速度对比

测试训练集二十几张图片,在m1 mac上的运行时间一共8.084 小时,共152 epochs。对于这个计算速度还是比较让人吃惊的,这个效率也太低了。对于需要处理图像的训练这个速度也无法让人接受。

152 epochs completed in 8.084 hours.
Optimizer stripped from runs/train/exp3/weights/last.pt, 14.4MB
Optimizer stripped from runs/train/exp3/weights/best.pt, 14.4MB

wandb: Waiting for W&B process to finish, PID 63332
wandb: Program ended successfully.
wandb: Find user logs for this run at: /Users/zhongming/PycharmProjects/yolov5/wandb/offline-run-20210913_191626-18h6dxo0/logs/debug.log
wandb: Find internal logs for this run at: /Users/zhongming/PycharmProjects/yolov5/wandb/offline-run-20210913_191626-18h6dxo0/logs/debug-
Continue Reading

Windows 10 yolov5 GPU环境

网上关于yolov5 gpu环境搭建的文章也是一抓一大把,但是实际上好用不好用并不清楚。所以要想按照那些所谓的教程安装配置,很可能会失败。当然按照我的文章进行安装配置也可能会失败。逼乎上有个帖子问新手学习一门语言该不该用ide,还有一大群人建议新手配置各种环境,用sb vim等编辑器,配置各种执行路径,各种源代码路径、库路径。这tm一个ide就解决的问题,非得折腾半天,这是为了让没入门的赶紧放弃?

我简单的说一下我的安装流程:

1.下载cuda安装文件,https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exe_network 安装cuda,默认一路next 即可。

2.安装pytorch-gpu,yolov5的运行环境主要依赖于pytorch。通过官网https://pytorch.org可以找到对应的安装命令:

Continue Reading

Android Skip Ads Yolov5 Project

YOLOv5 🚀 is a family of object detection architectures and models pretrained on the COCO dataset, and represents Ultralytics open-source research into future vision AI methods, incorporating lessons learned and best practices evolved over thousands of hours of research and development.

1. 环境搭建
自动广告跳过这个想法,不过由于各种原因一直没有实时。知道最近才又重新开始折腾这个东西,yolov5的安装这里就不再说明了,建议使用anaconda安装。我创建了一个conda环境可以直接下载之后通过conda安装:

# 1. conda 环境地址:https://anaconda.org/obaby/yolov5 
# 2. 下载对应操作系统的环境yml脚本 
# 3. 在Terminal 或者 an Anaconda Prompt内执行 
conda env create user/my-environment source activate my-environment

badge

 如果不想使用上面的安装方法可以参考:https://blog.csdn.net/oJiWuXuan/article/details/107558286 和https://github.com/ultralytics/yolov5 按照官方指导进行安装。

Continue Reading

百度语音识别 ASR 收费导致的bug

[ERROR][bds_asr_response_agent.cpp:419][ASRResponse::get_server_err_desc]err_no is: -3004
[DEBUG][bds_EventManagerAsr.cpp:1031]Encounter error: Server app name unknown.
[DEBUG][bds_EventManagerAsr.cpp:936]vr_handler work_status=8, encoded_err=2225220, err_desc=Server app name unknown., need_finish=1, need_stop=0, need_loop=0
[DEBUG][bds_EventManagerAsr.cpp:937]vr_handler m_has_cancelled=0, m_need_cancelled_callback=0
[DEBUG][bds_EventManagerAsr.cpp:654]1cancel_internal m_vr_is_running=1
[DEBUG][bds_EventManagerAsr.cpp:660]2cancel_internal m_vr_is_running=0
[TRACE][bds_Chunk_Connection.mm:194][bds_Chunk_Connection] uptask finished.
2021-09-03 20:26:05.888644+0800 BDSClientSample[13947:7119533] EVoiceRecognitionClientWorkStatusError:33
[TRACE][bds_Chunk_Connection.mm:556][bds_Chunk_Connection] downtask finished.
[TRACE][AppThread.cpp:329]Thread end (SP ~ 0x16d62ef98, threadID: 0x16d62f000

[TRACE][AppThread.cpp:47]============================================= AppThread::~AppThread() ====================================
[TRACE][AppThread.cpp:329]Thread end (SP ~ 0x16dea6f98, threadID: 0x16dea7000

[TRACE][AppThread.cpp:47]============================================= AppThread::~AppThread() ====================================
[DEBUG][BDVRReachability.mm:74]BDVRReachability Flag Status: -R ------- networkStatusForFlags
[DEBUG][BDVRReachability.mm:74]BDVRReachability Flag Status: -R ------- networkStatusForFlags
[DEBUG][bds_EventManagerAsr.cpp:471]start sn=72A104F8-DAAE-4226-8DEE-B7F43402FF4C
[TRACE][bds_EventManagerAsr.cpp:1134][EventManagerAsr::resolve_property_list]PROPERTY:10005
[TRACE][bds_EventManagerAsr.cpp:909]ASR_ONLINE_PARAM_KEY_APPCODE = 24797995
[TRACE][bds_EventManagerAsr.cpp:917]ASR_ONLINE_PARAM_KEY_APPCODE = fxAfMkwQk4gu3RpmgE4Oxhy2
[TRACE][bds_EventManagerMic.cpp:119][Mic:]start recorder prepare cost: 1
[TRACE][bds_EventManagerMic.cpp:121][Mic:]start recorder cost: 102
[TRACE][bds_vad_proxy.cpp:110][VADProxy::init_vad]current vad: ModelVAD
[TRACE][bds_EventManagerDec_Chunk.cpp:370][setupConnection]Cached IP: 
[TRACE][bds_AddressResolver_getaddrinfo.cpp:194]PROTO: https:// HOST: vop.baidu.com PATH: /v2

今天晚上使用语音助理切换影院模式的时候提示错误,Server app name unknown.这特喵的就神奇了,当时各种appkey id之类的都换成自己的了,应该也不会有人删除这些东西。但是就是提示错误,真是人生何处不坑爹。登陆百度后台发现创建的key依旧存在,不过后面语音技术显示的是无!

Continue Reading

一个加号(+)引发的血案

之前做的一个项目,由于阿里的旺信服务停了,最近想找个替代方案,于是找到了野火IM,看了下demo效果还不错,主要是ui部分可以复用。于是下载源代码看了一眼,比较奇怪的一点是昨天在windows已经把代码跑起来了,结果今天在mac上死活运行不聊了,提示下面的错误:

Execution failed for task ':chat:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\obaby\.gradle\caches\transforms-2\files-2.1\87575f1e55fb95ae83d67cbd526a722c\core-1.7.0-alpha02\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
Continue Reading