資源簡介
rcnn r-fcn tiny-face 需要用, win10 vs2015 編譯nms和gpunms,親測成功,推薦下載

代碼片段和文件信息
#?--------------------------------------------------------
#?Fast?R-CNN
#?Copyright?(c)?2015?Microsoft
#?Licensed?under?The?MIT?License?[see?LICENSE?for?details]
#?Written?by?Ross?Girshick
#?--------------------------------------------------------
import?numpy?as?np
import?os
from?os.path?import?join?as?pjoin
#from?distutils.core?import?setup
from?setuptools?import?setup
from?distutils.extension?import?Extension
from?Cython.Distutils?import?build_ext
import?subprocess
#change?for?windows?by?MrX
nvcc_bin?=?‘nvcc.exe‘
lib_dir?=?‘lib/x64‘
def?find_in_path(name?path):
????“Find?a?file?in?a?search?path“
????#?Adapted?fom
????#?http://code.activestate.com/recipes/52224-find-a-file-given-a-search-path/
????for?dir?in?path.split(os.pathsep):
????????binpath?=?pjoin(dir?name)
????????if?os.path.exists(binpath):
????????????return?os.path.abspath(binpath)
????return?None
def?locate_cuda():
????“““Locate?the?CUDA?environment?on?the?system
????Returns?a?dict?with?keys?‘home‘?‘nvcc‘?‘include‘?and?‘lib64‘
????and?values?giving?the?absolute?path?to?each?directory.
????Starts?by?looking?for?the?CUDAHOME?env?variable.?If?not?found?everything
????is?based?on?finding?‘nvcc‘?in?the?PATH.
????“““
????#?first?check?if?the?CUDAHOME?env?variable?is?in?use
????if?‘CUDA_PATH‘?in?os.environ:
????????home?=?os.environ[‘CUDA_PATH‘]
????????print(“home?=?%s\n“?%?home)
????????nvcc?=?pjoin(home?‘bin‘?nvcc_bin)
????else:
????????#?otherwise?search?the?PATH?for?NVCC
????????default_path?=?pjoin(os.sep?‘usr‘?‘local‘?‘cuda‘?‘bin‘)
????????nvcc?=?find_in_path(nvcc_bin?os.environ[‘PATH‘]?+?os.pathsep?+?default_path)
????????if?nvcc?is?None:
????????????raise?EnvironmentError(‘The?nvcc?binary?could?not?be?‘
????????????????‘located?in?your?$PATH.?Either?add?it?to?your?path?or?set?$CUDA_PATH‘)
????????home?=?os.path.dirname(os.path.dirname(nvcc))
????????print(“home?=?%s?nvcc?=?%s\n“?%?(home?nvcc))
????cudaconfig?=?{‘home‘:home?‘nvcc‘:nvcc
??????????????????‘include‘:?pjoin(home?‘include‘)
??????????????????‘lib64‘:?pjoin(home?lib_dir)}
????for?k?v?in?cudaconfig.items():
????????if?not?os.path.exists(v):
????????????raise?EnvironmentError(‘The?CUDA?%s?path?could?not?be?located?in?%s‘?%?(k?v))
????return?cudaconfig
CUDA?=?locate_cuda()
#?Obtain?the?numpy?include?directory.??This?logic?works?across?numpy?versions.
try:
????numpy_include?=?np.get_include()
except?AttributeError:
????numpy_include?=?np.get_numpy_include()
def?customize_compiler_for_nvcc(self):
????“““inject?deep?into?distutils?to?customize?how?the?dispatch
????to?gcc/nvcc?works.
????If?you?subclass?UnixCCompiler?it‘s?not?trivial?to?get?your?subclass
????injected?in?and?still?have?the?right?customizations?(i.e.
????distutils.sysconfig.customize_compiler)?run?on?it.?So?instead?of?going
????the?OO?route?I?have?this.?Note?it‘s?kindof?like?a?wierd?functional
????subclassing?going?on.“““
????#?tell?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-02-07?20:32??py-faster-rcnn-windows-master\
?????文件????????1071??2018-02-06?20:35??py-faster-rcnn-windows-master\LICENSE
?????文件?????????601??2018-02-06?20:35??py-faster-rcnn-windows-master\README.md
?????目錄???????????0??2018-02-07?09:24??py-faster-rcnn-windows-master\lib\
?????文件??????????56??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\Makefile
?????目錄???????????0??2018-02-07?09:36??py-faster-rcnn-windows-master\lib\build\
?????目錄???????????0??2018-02-07?09:36??py-faster-rcnn-windows-master\lib\build\lib.win-amd64-3.6\
?????目錄???????????0??2018-02-07?09:38??py-faster-rcnn-windows-master\lib\build\lib.win-amd64-3.6\nms\
?????文件??????144384??2018-02-07?09:38??py-faster-rcnn-windows-master\lib\build\lib.win-amd64-3.6\nms\gpu_nms.cp36-win_amd64.pyd
?????目錄???????????0??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\
?????目錄???????????0??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\
?????目錄???????????0??2018-02-07?09:38??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\
?????文件?????????722??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\cpu_nms.cp36-win_amd64.exp
?????文件????????2000??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\cpu_nms.cp36-win_amd64.lib
?????文件??????425569??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\cpu_nms.obj
?????文件?????????864??2018-02-07?09:38??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\gpu_nms.cp36-win_amd64.exp
?????文件????????2202??2018-02-07?09:38??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\gpu_nms.cp36-win_amd64.lib
?????文件?????1910749??2018-02-07?09:36??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\nms\gpu_nms.obj
?????目錄???????????0??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\utils\
?????文件??????402998??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\utils\bbox.obj
?????文件?????????744??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\utils\cython_bbox.cp36-win_amd64.exp
?????文件????????2072??2018-02-06?21:01??py-faster-rcnn-windows-master\lib\build\temp.win-amd64-3.6\Release\utils\cython_bbox.cp36-win_amd64.lib
?????目錄???????????0??2018-02-06?20:38??py-faster-rcnn-windows-master\lib\datasets\
?????目錄???????????0??2018-02-06?20:38??py-faster-rcnn-windows-master\lib\datasets\VOCdevkit-matlab-wrapper\
?????文件?????????231??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\VOCdevkit-matlab-wrapper\get_voc_opts.m
?????文件????????1332??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\VOCdevkit-matlab-wrapper\voc_eval.m
?????文件?????????258??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\VOCdevkit-matlab-wrapper\xVOCap.m
?????文件?????????248??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\__init__.py
?????文件???????16560??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\coco.py
?????文件????????1336??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\ds_utils.py
?????文件????????1403??2018-02-06?20:35??py-faster-rcnn-windows-master\lib\datasets\factory.py
............此處省略66個文件信息
評論
共有 條評論