其他
人脸口罩检测现开源PyTorch、TensorFlow、MXNet等全部五大主流深度学习框架模型和代码
号外!号外!
现在,AIZOO开源PyTorch、TensorFlow、MXNet、Keras和Caffe五大主流深度学习框架的人脸检测模型和代码啦!先附上Github链接为敬。https://github.com/AIZOOTech/FaceMaskDetectionpip install mmdnn # 安装
# 将TensorFlow的resnet152模型转为PyTorch模型
mmconvert -sf tensorflow -in imagenet_resnet_v2_152.ckpt.meta -iw imagenet_resnet_v2_152.ckpt --dstNodeName MMdnn_Output -df pytorch -om tf_resnet_to_pth.pt
Keras转TensorFlow
import tensorflow as tffrom keras import backend as Kkeras_model = load_keras_model(keras_model_path)sess = K.get_session()from tensorflow.python.framework import graph_utilfrom tensorflow.python.framework import graph_ioconstant_graph = graph_util.convert_variables_to_constants(sess, sess.graph.as_graph_def(), ["cls_branch_concat","loc_branch_concat"])graph_io.write_graph(constant_graph, '.' , graph_output_name, as_text=False)print('saved the constant graph (ready for inference) at: ', osp.join('.', graph_output_name))
Keras转Caffe
Keras转PyTorch
cls_0_reshape = torch.reshape(input = cls_0_conv.permute(0,2,3,1) , shape = (cls_0_conv.size(0),-1,2))
loc_0_reshape = torch.reshape(input = loc_0_conv.permute(0,2,3,1) , shape = (loc_0_conv.size(0),-1,4))
Keras转MXNet
数据下载地址(在公众号后台回复“口罩数据集”也可以)
开源五大主流深度学习模型和代码链接
在线体验链接 https://aizoo.com/face-mask-detection.html
☆ END ☆
扫描二维码
关注我们
AIZOO
扫描二维码
加元峰微信
AIZOOTech
集齐五大框架模型不易,帮元峰扩散一下吧