xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 1.27MB
    文件類(lèi)型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-28
  • 語(yǔ)言: Python
  • 標(biāo)簽: 人臉識(shí)別??

資源簡(jiǎn)介

原理 人臉框識(shí)別 人臉對(duì)齊 人臉剪裁 實(shí)現(xiàn) 使用webface人臉數(shù)據(jù)集以及DeepID網(wǎng)絡(luò),通過(guò)Caffe訓(xùn)練出模型參數(shù),得到LFW二分類(lèi)的人臉識(shí)別準(zhǔn)確率。下 根據(jù)預(yù)處理工具進(jìn)行人臉框檢測(cè),人臉對(duì)齊。 預(yù)處理工具是其他人寫(xiě)的,地址:https://github.com/RiweiChen/FaceTools 根據(jù)香港中文大學(xué)提供的人臉框檢測(cè)和人臉特征點(diǎn)檢測(cè)的windows二進(jìn)制程序?qū)崿F(xiàn)。 http://mmlab.ie.cuhk.edu.hk/archive/CNN_FacePoint.htm

資源截圖

代碼片段和文件信息

#!/usr/bin/env?python
#-*-?coding:utf-8?-*-
‘‘‘
Create?on?Tues?2015-11-24

@author:?hqli
‘‘‘

#運(yùn)行前先將caffe安裝好放在~/caffe-mater
import?os


class?DeepID():
????#基本屬性
????prj=‘‘#項(xiàng)目名稱(chēng)
????caffepath=‘‘#caffe主目錄路徑
????prjpath=‘‘#工程的位置
????datapath=‘‘#數(shù)據(jù)的路徑
????num=0#人數(shù)多少
#????ratio=0#訓(xùn)練數(shù):測(cè)試
#????max_iter=0#迭代次數(shù)(用于lfw驗(yàn)證)
#????snapshot=0#迭代多少次保存一次
????
????data_train=‘‘#用于訓(xùn)練的數(shù)據(jù)列表
????data_test=‘‘#用于測(cè)試的數(shù)據(jù)列表
????net_proto=‘‘#caffe的Net
????net_proto_model=‘‘

????solver_proto=‘‘#caffe的solver
????solver_proto_model=‘‘
????deploy_proto=‘‘#caffe的deploy

????snapshot_pre=‘‘#訓(xùn)練好的模型的前綴

????lmdb_train=‘‘#訓(xùn)練集的lmdb
????lmdb_test=‘‘#測(cè)試集的lmdb
????imgmean=‘‘#圖像均值

????netimg=‘‘#net的結(jié)構(gòu)圖像

????log_train=‘‘#caffe的訓(xùn)練日志
????log_test=‘‘#caffe的測(cè)試日志
????log_create=‘‘#轉(zhuǎn)換lmdb的日志

????#可執(zhí)行文件
????shcreate=‘‘#將圖像和標(biāo)簽轉(zhuǎn)換成lmdb格式
????shimgmean=‘‘#計(jì)算圖像均值
????shdrawnet=‘‘#畫(huà)Net結(jié)構(gòu)圖
?????
????shtrain=‘‘#訓(xùn)練
????shtest=‘‘#測(cè)試


????def?__init__(selfprjcaffepathprjpathdatapathnum):
????????self.prj=prj
????????self.caffepath=caffepath
????????self.prjpath=self.prjpath
????????self.datapath=datapath
????????self.num=num
#????????self.ratio=ratio
#????????self.itera=max_iter
#????????self.snapshot=snapshot
???????
????????#在prjpath下新建名為num的文件夾將配置以及生成的文件放在該文件夾下
????????#在prjpath下新建num文件夾
????????if?not?os.path.exists(prjpath+str(num)):????
????????????os.makedirs(prjpath+str(num))
????????
????????self.net_proto_model=prjpath+prj+‘_train_test.prototxt‘
????????self.solver_proto_model=prjpath+prj+‘_solver.prototxt‘
????????
????????self.netimg=prjpath+prj+‘_net.png‘
????????self.shdrawnet=prjpath+prj+‘_drawnet.sh‘#畫(huà)Net結(jié)構(gòu)圖
????????
????????rspath=prjpath+str(num)+‘/‘
????????strnum=‘_‘+str(num)+‘_‘
??
????????self.data_train=rspath+prj+‘_train_‘+str(num)+‘.txt‘
????????self.data_test=rspath+prj+‘_val_‘+str(num)+‘.txt‘

????????self.net_proto=rspath+prj+strnum+‘train_test.prototxt‘

????????self.solver_proto=rspath+prj+strnum+‘solver.prototxt‘

????????self.deploy_proto=rspath+prj+‘_deploy.prototxt‘

????????self.snapshot_pre=rspath+prj+‘_‘+str(num)
????????
????????self.lmdb_train=rspath+prj+strnum+‘train_lmdb‘
????????self.lmdb_test=rspath+prj+strnum+‘test_lmdb‘????
????????self.imgmean=rspath+prj+strnum+‘mean.binaryproto‘


????????self.log_train=rspath+prj+strnum+‘train.log‘
????????self.log_test=rspath+prj+strnum+‘test.log‘
????????self.log_create=rspath+prj+strnum+‘create.log‘

????????#可執(zhí)行文件
????????self.shcreate=rspath+prj+strnum+‘create.sh‘#將圖像和標(biāo)簽轉(zhuǎn)換成lmdb格式
????????self.shimgmean=rspath+prj+strnum+‘imgmean.sh‘#計(jì)算圖像均值
?
????????self.shtrain=rspath+prj+strnum+‘train.sh‘#訓(xùn)練deepID
????????self.shtest=rspath+prj+strnum+‘test.sh‘#測(cè)試deepID

????????
????@staticmethod
????def?fileopt(filenamecontent):
????????fp=open(filename‘w‘)
????????fp.write(content)
????????fp.close()

?
????def?div_data(selfratio):
????????‘‘‘
????????@brief:?將數(shù)據(jù)集分為訓(xùn)練集和測(cè)試集保存在prjpath下
????????‘‘‘

#????????if?not?os.path.exists(savepath):
#????????????os.makedirs(savepath)

????????dirlists=os.listdir(self.datapath)
?

?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2016-04-11?14:10??face_recognition-master\
?????文件???????10697??2016-04-11?14:10??face_recognition-master\DeepID.py
?????文件????????8772??2016-04-11?14:10??face_recognition-master\DeepIDTest.py
?????文件????????3005??2016-04-11?14:10??face_recognition-master\README.md
?????目錄???????????0??2016-04-11?14:10??face_recognition-master\analysis\
?????文件??????980054??2016-04-11?14:10??face_recognition-master\analysis\face_recognition_all.pdf
?????文件????????2487??2016-04-11?14:10??face_recognition-master\deepID_deploy.prototxt
?????文件??????203364??2016-04-11?14:10??face_recognition-master\deepID_net.png
?????文件?????????312??2016-04-11?14:10??face_recognition-master\deepID_solver.prototxt
?????文件????????4972??2016-04-11?14:10??face_recognition-master\deepID_train_test.prototxt
?????文件????????4972??2016-04-11?14:10??face_recognition-master\deepID_train_test_2.prototxt
?????文件????????8198??2016-04-11?14:10??face_recognition-master\lfw_test_deal.py
?????文件??????155334??2016-04-11?14:10??face_recognition-master\pairs.txt
?????目錄???????????0??2016-04-11?14:10??face_recognition-master\res\
?????文件???????21800??2016-04-11?14:10??face_recognition-master\res\ConvNet_structure.png
?????文件??????156657??2016-04-11?14:10??face_recognition-master\res\medium_scales.png
?????文件???????60113??2016-04-11?14:10??face_recognition-master\res\process_all.png

評(píng)論

共有 條評(píng)論

相關(guān)資源