-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
58 lines (48 loc) · 1.54 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import os
import subprocess
from setuptools import find_packages, setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
def make_cuda_ext(name, module, sources):
cuda_ext = CUDAExtension(
name='%s.%s' % (module, name),
sources=[os.path.join(*module.split('.'), src) for src in sources]
)
return cuda_ext
def write_version_to_file(version, target_file):
with open(target_file, 'w') as f:
print('__version__ = "%s"' % version, file=f)
if __name__ == '__main__':
version = '0.1.0'
setup(
name='insmos',
version=version,
description='InsMOS is a method for segmenting moving objects from point cloud',
install_requires=[
'numpy==1.18.1',
'torch>=1.10',
'easydict',
'pyyaml'
],
author='Neng Wang',
packages=find_packages(exclude=['logs', 'docs', 'output']),
cmdclass={'build_ext': BuildExtension},
ext_modules=[
make_cuda_ext(
name='iou3d_nms_cuda',
module='models.bbox_post_process',
sources=[
'src/iou3d_cpu.cpp',
'src/iou3d_nms_api.cpp',
'src/iou3d_nms.cpp',
'src/iou3d_nms_kernel.cu',
]
),
make_cuda_ext(
name='Array_Index',
module='models.utils',
sources=[
'src/Array_Index.cpp',
]
),
],
)