91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡(jiǎn)介

該資源為MTCNN實(shí)現(xiàn)人臉檢測(cè)與定位完整代碼,下載壓縮包,解壓并將待檢測(cè)的圖片放入文件夾中,修改mtcnn.py中的圖片路徑,最后運(yùn)行mtcnn.py即可。

資源截圖

代碼片段和文件信息

“““?Tensorflow?implementation?of?the?face?detection?/?alignment?algorithm?found?at
https://github.com/kpzhang93/MTCNN_face_detection_alignment
“““
#?MIT?License
#?
#?Copyright?(c)?2016?David?Sandberg
#?
#?Permission?is?hereby?granted?free?of?charge?to?any?person?obtaining?a?copy
#?of?this?software?and?associated?documentation?files?(the?“Software“)?to?deal
#?in?the?Software?without?restriction?including?without?limitation?the?rights
#?to?use?copy?modify?merge?publish?distribute?sublicense?and/or?sell
#?copies?of?the?Software?and?to?permit?persons?to?whom?the?Software?is
#?furnished?to?do?so?subject?to?the?following?conditions:
#?
#?The?above?copyright?notice?and?this?permission?notice?shall?be?included?in?all
#?copies?or?substantial?portions?of?the?Software.
#?
#?THE?SOFTWARE?IS?PROVIDED?“AS?IS“?WITHOUT?WARRANTY?OF?ANY?KIND?EXPRESS?OR
#?IMPLIED?INCLUDING?BUT?NOT?LIMITED?TO?THE?WARRANTIES?OF?MERCHANTABILITY
#?FITNESS?FOR?A?PARTICULAR?PURPOSE?AND?NONINFRINGEMENT.?IN?NO?EVENT?SHALL?THE
#?AUTHORS?OR?COPYRIGHT?HOLDERS?BE?LIABLE?FOR?ANY?CLAIM?DAMAGES?OR?OTHER
#?LIABILITY?WHETHER?IN?AN?ACTION?OF?CONTRACT?TORT?OR?OTHERWISE?ARISING?FROM
#?OUT?OF?OR?IN?CONNECTION?WITH?THE?SOFTWARE?OR?THE?USE?OR?OTHER?DEALINGS?IN?THE
#?SOFTWARE.

from?__future__?import?absolute_import
from?__future__?import?division
from?__future__?import?print_function
from?six?import?string_types?iteritems

import?numpy?as?np
import?tensorflow?as?tf
#from?math?import?floor
import?cv2
import?os

def?layer(op):
????“““Decorator?for?composable?network?layers.“““

????def?layer_decorated(self?*args?**kwargs):
????????#?Automatically?set?a?name?if?not?provided.
????????name?=?kwargs.setdefault(‘name‘?self.get_unique_name(op.__name__))
????????#?Figure?out?the?layer?inputs.
????????if?len(self.terminals)?==?0:
????????????raise?RuntimeError(‘No?input?variables?found?for?layer?%s.‘?%?name)
????????elif?len(self.terminals)?==?1:
????????????layer_input?=?self.terminals[0]
????????else:
????????????layer_input?=?list(self.terminals)
????????#?Perform?the?operation?and?get?the?output.
????????layer_output?=?op(self?layer_input?*args?**kwargs)
????????#?Add?to?layer?LUT.
????????self.layers[name]?=?layer_output
????????#?This?output?is?now?the?input?for?the?next?layer.
????????self.feed(layer_output)
????????#?Return?self?for?chained?calls.
????????return?self

????return?layer_decorated

class?Network(object):

????def?__init__(self?inputs?trainable=True):
????????#?The?input?nodes?for?this?network
????????self.inputs?=?inputs
????????#?The?current?list?of?terminal?nodes
????????self.terminals?=?[]
????????#?Mapping?from?layer?names?to?layers
????????self.layers?=?dict(inputs)
????????#?If?true?the?resulting?variables?are?set?as?trainable
????????self.trainable?=?trainable

????????self.setup()

????def?setup(self):
????????“““Construct?the?network.?“““
????????raise?NotImplementedError(‘Must?be?implemented?by?the?subclass.‘)

????def?load(self?data_path?session?i

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????27368??2018-08-22?18:42??MTCNN\det1.npy
?????文件??????401681??2018-08-22?18:42??MTCNN\det2.npy
?????文件?????1557360??2018-08-22?18:43??MTCNN\det3.npy
?????文件???????31697??2018-08-20?13:22??MTCNN\detect_face.py
?????文件????????1621??2018-08-22?18:35??MTCNN\mtcnn.py
?????目錄???????????0??2018-08-27?13:04??MTCNN\

評(píng)論

共有 條評(píng)論

相關(guān)資源