5分钟教你使用pyarmnn推理引擎识别一只可爱猫咪~

在这里插入图片描述

视频

5分钟教你使用pyarmnn推理引擎识别一只可爱猫咪~

添加仓库

sudo apt install software-properties-common 
sudo add-apt-repository ppa:armnn/ppa 
sudo apt update 

安装pyarmnn

sudo apt-get install -y python3-pyarmnn armnn-latest-all python3-pip

安装PIL的package

pip3 install Pillow

安装opencv库

sudo apt-get install python3-opencv

下载pyarmnn仓库

git clone https://github.com/nxp-imx/pyarmnn-release.git

测试图片分类推理

默认会下载一个小猫的图片还有标签文件

cd pyarmnn-release/python/pyarmnn/examples
python3 tflite_mobilenetv1_quantized.py -d . -m .

在这里插入图片描述

可以看大,tabby的概率最高

firefly@firefly:~/pyarmnn-release/python/pyarmnn/examples$ python3 tflite_mobilenetv1_quantized.py -d . -m .
WARNING: PyArmNN is deprecated. To use ArmNN on python, please use the tflite delegate. Expected to be removed in release 24.05.
Your ArmNN library instance does not support Onnx models parser functionality.  Skipped IOnnxParser import.
Your ArmNN library instance does not have ArmNN model (.armnn) parser functionality.  Skipped IDeserializer import.
Found model (./mobilenet_v1_1.0_224_quant.tflite) and labels (./labels_mobilenet_quant_v1_224.txt).
Running inference(0) ...
class=tabby ; value=99
class=Egyptian cat ; value=84
class=tiger cat ; value=71
class=cricket ; value=0
class=zebra ; value=0

在这里插入图片描述

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值