iou3d_nms_setup.py build
时间: 2023-08-06 14:09:58 浏览: 266
根据引用\[1\]中的博客,要在iou3d_nms_setup.py文件中进行构建,可以进行以下修改:
在setup.py文件中添加以下代码:
```
include_dirs = \[os.path.realpath('../include'), '/usr/local/cuda/include/'\]
```
修改make_cuda_ext函数:
```
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\],
include_dirs=include_dirs
)
return cuda_ext
```
然后,根据引用\[2\]中的说明,可以运行以下命令进行构建:
```
python demo/image_demo.py demo/demo.jpg yolov3_mobilenetv2_320_300e_coco.py yolov3_mobilenetv2_320_300e_coco_20210719_215349-d18dff72.pth --device cpu --out-file result.jpg
```
如果需要安装MMCV,可以根据引用\[3\]中的步骤进行安装:
```
Step 0.InstallMMCVusingMIM.
pip install -U openmim
mim install mmcv-full==1.5.0 (版本必须在\[1.3.17,1.5.0\]区间内)
```
这样就可以进行iou3d_nms_setup.py的构建了。
#### 引用[.reference_title]
- *1* [fatal error: cuda.h: 没有那个文件或目录( pcdet/ops/iou3d_nms/src/iou3d_cpu.cpp:12:18: fatal error: cuda.h: )](https://blog.csdn.net/jiachang98/article/details/121933403)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [AssertionError: iou3d_boxes_iou_bev_forward miss in module _ext ----安装mmdetaction过程](https://blog.csdn.net/weixin_44717949/article/details/126105865)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文