mindspore mindyolo目标检测华为昇腾上推理使用

参考:

https://github.com/mindspore-lab/mindyolo

使用案例:

https://github.com/mindspore-lab/mindyolo/blob/master/GETTING_STARTED.md

安装:

matlab 复制代码
pip install mindyolo

特别注意opencv-python、opencv-python-headless版本问题,不然会遇到ImportError: libGL.so.1: cannot open shared object file: No such file or directory等问题

代码

1)下载项目

matlab 复制代码
git clone https://github.com/mindspore-lab/mindyolo

2)运行测试

模型权重下载:https://github.com/mindspore-lab/mindyolo/blob/master/MODEL_ZOO.md

测试这种命令形式用华为昇腾npu推理速度不算快

matlab 复制代码
cd mindyolo

# Run with Ascend (By default)华为昇腾npu推理
python demo/predict.py --config ./configs/yolov7/yolov7.yaml --weight=/path_to_ckpt/WEIGHT.ckpt --image_path /path_to_image/IMAGE.jpg

# Run with GPU
python demo/predict.py --config ./configs/yolov7/yolov7.yaml --weight=/path_to_ckpt/WEIGHT.ckpt --image_path /path_to_image/IMAGE.jpg --device_target=GPU

## 我这里用的yolov7-tiny测试
python demo/predict.py --config ./configs/yolov7/yolov7-tiny.yaml --weight=../yolov7-tiny_300e_mAP375-d8972c94.ckpt --image_path  ../17people.jpg --device_target=CPU

推理图片结果保存在runs_infer下

相关推荐
ZzT8 分钟前
怎么做才不会被 AI 替代?
人工智能·程序员
道友可好12 分钟前
从今天开始:你的第一个 Harness Engineering 实践
前端·人工智能·后端
小姜前线技术1 小时前
AI回答代码块高亮加一键复制
人工智能
洛阳泰山1 小时前
从 0 到 1.6K Star:一个 Java 开源项目的增长复盘
人工智能·后端·开源
米小虾2 小时前
Agent Skill 设计模式完全指南
人工智能·agent
饼干哥哥3 小时前
保姆级教程:用Image2 + Seedance2.0 做长视频,以品牌广告为例
人工智能
米小虾3 小时前
Agent Skill 规范与 Skill-Creator 核心思想
人工智能·agent
ZhengEnCi3 小时前
09e-斯坦福CS336作业四:大规模语言模型训练数据收集与处理
人工智能
oil欧哟3 小时前
Codex 最佳实践(超级长文):先搞懂 AI,再用好 AI
前端·人工智能·后端
甲维斯4 小时前
日本发布比肩Fable5的模型?Fugu Ultra初探!
人工智能·ai编程