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

資源簡介

此項目在IQIYI_VID(IQIYI視頻人識別)比賽中獲得第一名。提供說明文檔.md。

資源截圖

代碼片段和文件信息

import?argparse
import?cv2
import?numpy?as?np
import?sys
import?mxnet?as?mx
import?datetime

class?Alignment:
??def?__init__(self?prefix?epoch?ctx_id=0):
????print(‘loading‘prefix?epoch)
????ctx?=?mx.gpu(ctx_id)
????sym?arg_params?aux_params?=?mx.model.load_checkpoint(prefix?epoch)
????all_layers?=?sym.get_internals()
????sym?=?all_layers[‘heatmap_output‘]
????image_size?=?(128?128)
????self.image_size?=?image_size
????model?=?mx.mod.Module(symbol=sym?context=ctx?label_names?=?None)
????#model?=?mx.mod.Module(symbol=sym?context=ctx)
????model.bind(for_training=False?data_shapes=[(‘data‘?(1?3?image_size[0]?image_size[1]))])
????model.set_params(arg_params?aux_params)
????self.model?=?model
??
??def?get(self?img):
????rimg?=?cv2.resize(img?(self.image_size[1]?self.image_size[0]))
????img?=?cv2.cvtColor(rimg?cv2.COLOR_BGR2RGB)
????img?=?np.transpose(img?(201))?#3*112*112?RGB
????input_blob?=?np.zeros(?(1?3?self.image_size[1]?self.image_size[0])dtype=np.uint8?)
????input_blob[0]?=?img
????data?=?mx.nd.array(input_blob)
????db?=?mx.io.DataBatch(data=(data))
????self.model.forward(db?is_train=False)
????alabel?=?self.model.get_outputs()[-1].asnumpy()[0]
????ret?=?np.zeros(?(alabel.shape[0]?2)?dtype=np.float32)
????for?i?in?xrange(alabel.shape[0]):
??????a?=?cv2.resize(alabel[i]?(self.image_size[1]?self.image_size[0]))
??????ind?=?np.unravel_index(np.argmax(a?axis=None)?a.shape)
??????#ret[i]?=?(ind[0]?ind[1])?#h?w
??????ret[i]?=?(ind[1]?ind[0])?#w?h
????return?ret




?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-25?11:36??insightface-master\
?????文件????????1157??2018-10-25?11:36??insightface-master\.gitignore
?????文件?????????101??2018-10-25?11:36??insightface-master\.gitmodules
?????目錄???????????0??2018-10-25?11:36??insightface-master\3rdparty\
?????目錄???????????0??2018-10-25?11:36??insightface-master\3rdparty\operator\
?????文件???????10205??2018-10-25?11:36??insightface-master\3rdparty\operator\amsoftmax-inl.h
?????文件????????2274??2018-10-25?11:36??insightface-master\3rdparty\operator\amsoftmax.cc
?????文件????????8073??2018-10-25?11:36??insightface-master\3rdparty\operator\amsoftmax.cu
?????文件???????13982??2018-10-25?11:36??insightface-master\3rdparty\operator\lsoftmax-inl.h
?????文件????????2830??2018-10-25?11:36??insightface-master\3rdparty\operator\lsoftmax.cc
?????文件???????14129??2018-10-25?11:36??insightface-master\3rdparty\operator\lsoftmax.cu
?????文件????????1082??2018-10-25?11:36??insightface-master\LICENSE
?????文件???????12479??2018-10-25?11:36??insightface-master\README.md
?????目錄???????????0??2018-10-25?11:36??insightface-master\SSH\
?????文件?????????266??2018-10-25?11:36??insightface-master\SSH\Makefile
?????文件?????????472??2018-10-25?11:36??insightface-master\SSH\README.md
?????文件???????????0??2018-10-25?11:36??insightface-master\SSH\__init__.py
?????目錄???????????0??2018-10-25?11:36??insightface-master\SSH\rcnn\
?????文件???????????0??2018-10-25?11:36??insightface-master\SSH\rcnn\__init__.py
?????目錄???????????0??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\
?????文件??????????15??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\.gitignore
?????文件???????????0??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\__init__.py
?????文件????????1185??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\anchors.pyx
?????文件????????1763??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\bbox.pyx
?????文件????????2241??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\cpu_nms.pyx
?????文件?????????146??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\gpu_nms.hpp
?????文件????????1110??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\gpu_nms.pyx
?????文件????????5064??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\nms_kernel.cu
?????文件????????5748??2018-10-25?11:36??insightface-master\SSH\rcnn\cython\setup.py
?????目錄???????????0??2018-10-25?11:36??insightface-master\SSH\rcnn\processing\
?????文件???????????0??2018-10-25?11:36??insightface-master\SSH\rcnn\processing\__init__.py
............此處省略143個文件信息

評論

共有 條評論