Skip to content

Commit d50c28c

Browse files
author
Anton Baliasnikov
committed
Add nms library python setup file
1 parent d03cbd3 commit d50c28c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# --------------------------------------------------------
2+
# Fast R-CNN
3+
# Copyright (c) 2015 Microsoft
4+
# Licensed under The MIT License [see LICENSE for details]
5+
# Written by Ross Girshick
6+
# --------------------------------------------------------
7+
8+
from setuptools import setup
9+
from distutils.extension import Extension
10+
from Cython.Distutils import build_ext
11+
import numpy as np
12+
13+
# Obtain the numpy include directory. This logic works across numpy versions.
14+
try:
15+
numpy_include = np.get_include()
16+
except AttributeError:
17+
numpy_include = np.get_numpy_include()
18+
19+
20+
ext_modules = [
21+
Extension("nms.cpu_nms", ["nms/cpu_nms.pyx"], include_dirs = [numpy_include]),
22+
]
23+
24+
setup(
25+
name='fast_rcnn',
26+
ext_modules=ext_modules,
27+
cmdclass={'build_ext': build_ext},
28+
)

0 commit comments

Comments
 (0)