在此文件目录下新建images文件夹,在网上找想要识别的图片放在这里。
使用命令行运行示例程序:
cd ~/Vitis-AI/examples/vai_runtime/resnet50
./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
运行结果显示如下:
root@xilinx-kv260-starterkit-20222:~/Vitis-AI/examples/vai_runtime/resnet50# ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0921 20:01:14.215875 4129 main.cc:292] create running for subgraph: subgraph_conv1
Image : 001.jpg
top[0] prob = 0.549634 name = jacamar
top[1] prob = 0.259629 name = bee eater
top[2] prob = 0.074385 name = coucal
top[3] prob = 0.021312 name = bulbul
top[4] prob = 0.012926 name = robin, American robin, Turdus migratorius
Image : 001.png
top[0] prob = 0.906801 name = school bus
top[1] prob = 0.045147 name = jeep, landrover
top[2] prob = 0.012935 name = snowplow, snowplough
top[3] prob = 0.007845 name = garbage truck, dustcart
top[4] prob = 0.004758 name = moving van
root@xilinx-kv260-starterkit-20222:~/Vitis-AI/examples/vai_runtime/resnet50#
5.4、resnet50可识别内容
以下是一些ResNet50可以用于识别的任务:
1.物体检测:ResNet50可以作为Faster R-CNN等物体检测模型的基础网络,进行物体检测任务,由于其深度和准确性,在这类任务中表现优秀。
2.人脸识别:通过对ResNet50模型进行微调,可以用于人脸识别任务,实现高精度的人脸识别。
3.情感识别:ResNet50也可以结合卷积神经网络进行人脸情感识别,从给定的静态图像或动态视频序列中分离出特定的面部状态,以确定待识别对象的心理情绪。
4.图像分类:ResNet50在ImageNet数据集上取得了很好的性能,因此可以用于其他类似的图像分类问题,包括但不限于数码宝贝的识别分类。