資源簡介
基于python3.0實現人臉特征的提取,提取獲取到的人臉圖像的特征
代碼片段和文件信息
#coding=utf-8
“““
Author:wepon
Code:https://github.com/wepe
File:?get_feature_map.py
1.??visualize?feature?map?of?Convolution?layer?Fully?Connected?layer
2.??rewrite?the?code?so?you?can?treat?CNN?as?feature?extractor?see?file:?cnn-svm.py
--
2016.06.06更新:
keras的API已經發生變化,現在可視化特征圖可以直接調用接口,具體請參考:http://keras.io/visualization/
“““
from?__future__?import?print_function
import?pickletheano
import?matplotlib.pyplot?as?plt
import?matplotlib.cm?as?cm
import?cv2
import?sys
import?gc
from?face_train_use_keras?import?Model
#load?the?saved?model
model?=?Model()
model.load_model(file_path=‘F:/wget/FaceDetectionAndRecognition-master/me.face.model.h5‘)
#define?theano?funtion?to?get?output?of??FC?layer
get_feature?=?theano.funct
- 上一篇:snn脈沖神經網絡.py
- 下一篇:python2.7sc
ript目錄
評論
共有 條評論