资源简介
整个项目代码包括:faster RCNN作为检测的基础,结合传统跟踪算法,以及效果。由于模型的参数太大,所以没有上传,
代码片段和文件信息
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
from os.path import join as pjoin
import numpy as np
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
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 ‘CUDAHOME‘ in os.environ:
home = os.environ[‘CUDAHOME‘]
nvcc = pjoin(home ‘bin‘ ‘nvcc‘)
else:
# otherwise search the PATH for NVCC
default_path = pjoin(os.sep ‘usr‘ ‘local‘ ‘cuda‘ ‘bin‘)
nvcc = find_in_path(‘nvcc‘ os.environ[‘PATH‘] + os.pathsep + default_path)
if nvcc is None:
return None;
home = os.path.dirname(os.path.dirname(nvcc))
cudaconfig = {‘home‘:home ‘nvcc‘:nvcc
‘include‘: pjoin(home ‘include‘)
‘lib64‘: pjoin(home ‘lib64‘)}
for k v in cudaconfig.iteritems():
if not os.path.exists(v):
return None;
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 the compiler it can processes .cu
self.src_extensions.append(‘.cu‘)
# save references to the default compiler_so and _comple methods
default_compiler_so = self.compiler_so
super = self._compile
# now redefine the _compile method. This gets executed for each
# object but distutils doesn‘t have the ability to change compilers
# based on source extension: we add it.
def _compile(obj src ext cc_args extra_postargs pp_opts):
print extra_postargs
if os
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 16560 2018-05-04 20:20 行人检测与跟踪\lib\datasets\coco.py
文件 1336 2018-05-04 20:20 行人检测与跟踪\lib\datasets\ds_utils.py
文件 2909 2018-05-04 20:20 行人检测与跟踪\lib\datasets\factory.py
文件 22471 2018-05-04 20:20 行人检测与跟踪\lib\datasets\imagenet3d.py
文件 9845 2018-05-04 20:20 行人检测与跟踪\lib\datasets\imdb.py
文件 16430 2018-05-04 20:20 行人检测与跟踪\lib\datasets\imdb2.py
文件 31328 2018-05-04 20:20 行人检测与跟踪\lib\datasets\kitti.py
文件 21960 2018-05-04 20:20 行人检测与跟踪\lib\datasets\kitti_tracking.py
文件 10202 2018-05-04 20:20 行人检测与跟踪\lib\datasets\nissan.py
文件 10141 2018-05-04 20:20 行人检测与跟踪\lib\datasets\nthu.py
文件 30627 2018-05-04 20:20 行人检测与跟踪\lib\datasets\pascal3d.py
文件 14274 2018-05-04 20:20 行人检测与跟踪\lib\datasets\pascal_voc.py
文件 29327 2018-05-04 20:20 行人检测与跟踪\lib\datasets\pascal_voc2.py
文件 7244 2018-05-04 20:20 行人检测与跟踪\lib\datasets\voc_eval.py
文件 1525 2018-05-04 20:20 行人检测与跟踪\lib\datasets\__init__.py
文件 2540 2018-05-04 20:20 行人检测与跟踪\lib\fast_rcnn\bbox_transform.py
文件 2982 2018-05-04 20:31 行人检测与跟踪\lib\fast_rcnn\bbox_transform.pyc
文件 10111 2018-05-04 20:20 行人检测与跟踪\lib\fast_rcnn\config.py
文件 6320 2018-05-04 20:31 行人检测与跟踪\lib\fast_rcnn\config.pyc
文件 666 2018-05-04 20:20 行人检测与跟踪\lib\fast_rcnn\nms_wrapper.py
文件 775 2018-05-04 20:31 行人检测与跟踪\lib\fast_rcnn\nms_wrapper.pyc
文件 12978 2018-05-04 20:20 行人检测与跟踪\lib\fast_rcnn\test.py
文件 12207 2018-05-04 20:31 行人检测与跟踪\lib\fast_rcnn\test.pyc
文件 11644 2018-05-04 20:20 行人检测与跟踪\lib\fast_rcnn\train.py
文件 10229 2018-05-04 20:31 行人检测与跟踪\lib\fast_rcnn\train.pyc
文件 309 2018-05-04 20:20 行人检测与跟踪\lib\fast_rcnn\__init__.py
文件 281 2018-05-04 20:31 行人检测与跟踪\lib\fast_rcnn\__init__.pyc
文件 3679 2018-05-04 20:20 行人检测与跟踪\lib\gt_data_la
文件 4750 2018-05-04 20:20 行人检测与跟踪\lib\gt_data_la
文件 6279 2018-05-04 20:20 行人检测与跟踪\lib\gt_data_la
............此处省略103个文件信息
评论
共有 条评论