win10编译Faster RCNN的cython_utils(No Module named ''cython_bbox.bbox_overlaps)

win10编译Faster RCNN的cython_utils

  • 安装cuda、cudnn
  • 安装MinGW
  • 修改cython_utils/setup.py
  • 修改cython_utils/Makefile
  • 编译

安装cuda、cudnn


请确保设置CUDAHOME环境变量

安装MinGW

修改cython_utils/setup.py

将以下代码块中的
nvcc改为nvcc.exe
win下是.exe后缀的
lib64改为lib
win10编译Faster RCNN的cython_utils(No Module named ''cython_bbox.bbox_overlaps)_第1张图片

    # 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:
            raise EnvironmentError('The nvcc binary could not be '
                'located in your $PATH. Either add it to your path, or set $CUDAHOME')
        home = os.path.dirname(os.path.dirname(nvcc))

    cudaconfig = {'home':home, 'nvcc':nvcc,
                  'include': pjoin(home, 'include'),
                  'lib64': pjoin(home, 'lib64')}

修改cython_utils/Makefile

修改 rm -rf 为 rd/del

all:
	python setup.py build_ext --inplace
	rm -rf build
clean:
	rm -rf */*.pyc
	rm -rf */*.so
## 新的改变

编译

于cython_utils下,执行 mingw32-make
make
生成bbox和nms计算脚本如下:
win10编译Faster RCNN的cython_utils(No Module named ''cython_bbox.bbox_overlaps)_第2张图片

你可能感兴趣的:(深度学习,神经网络,人工智能,深度学习,Faster-RCNN,目标检测,人工智能,图像算法)