zl程序教程

您现在的位置是:首页 >  其他

当前栏目

CV之FR:基于paddlehub 框架利用mobile_mask人工智能算法实现人脸口罩图像识别(二分类识别,可结合无人机可,实现实时检测实时警告提醒)案例应用

2023-09-14 09:04:43 时间

CV之FR:基于paddlehub 框架利用mobile_mask人工智能算法实现人脸口罩图像识别(二分类识别,可结合无人机可,实现实时检测实时警告提醒)案例应用

目录

基于paddlehub 框架利用mobile_mask人工智能算法实现人脸口罩图像识别(二分类识别,可结合无人机可,实现实时检测实时警告提醒)

输出结果

实现代码


相关文章
CV之FR:基于paddlehub 框架利用mobile_mask人工智能算法实现人脸口罩图像识别(二分类识别,可结合无人机可,实现实时检测实时警告提醒)案例应用
CV之FR:基于paddlehub 框架利用mobile_mask人工智能算法实现人脸口罩图像识别(二分类识别,可结合无人机可,实现实时检测实时警告提醒)代码实现

基于paddlehub 框架利用mobile_mask人工智能算法实现人脸口罩图像识别(二分类识别,可结合无人机可,实现实时检测实时警告提醒)

输出结果

实现代码

参考文章CV:基于人工智能算法实现人脸口罩的实时检测(结合无人机可,实现实时警告提醒)——代码

更新中……

import matplotlib.pyplot as plt 
import matplotlib.image as mpimg 

image_str='test1011'   # test010  test101
test_img_path = ["./%s.jpg"%(image_str)]
img = mpimg.imread(test_img_path[0]) 

# 展示待预测图片
plt.imshow(img) 
plt.axis('off') 
plt.show()



import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import paddlehub as hub
module = hub.Module(name="ultra_light_fast_generic_face_detector_1mb_640")

# 待预测图片
test_img_path = ["./crowd1.jpg"]
img = mpimg.imread(test_img_path[0])

# 展示待预测图片
plt.imshow(img)
plt.axis('off')
plt.title('Face mask detection based on artificial intelligence algorithm by Jason Niu')
plt.show()


input_dict = {"image": test_img_path}
# execute predict and print the result
results = module.face_detection(data=input_dict)

for result in results:
    print(result)

# 预测结果展示
img = mpimg.imread("./face_detector_640_predict_output/crowd1.jpg")
plt.imshow(img)
plt.axis('off')
plt.title('Face mask detection based on artificial intelligence algorithm by Jason Niu')
plt.show()