前言
本文主要是介绍了在跑通CIA-SSD
系列算法过程中遇到的一些bug,下面是对CIASSD算法的一个简单的介绍。
CIA-SSD
其基本思想是校准单步目标检测中分类
和定位
两个任务,提出Confident IoU-Aware Single-Stage object Detector (CIA-SSD)
。
第一个是Spatial-Semantic Feature Aggregation(SSFA)
模块,为了准确预测目标框和分类置信度,自适应地融合低端spatial feature和高端抽象semantic feature。
第二个是IoU-aware confidence rectification
模块,对置信度进一步校准(rectified),使其和定位精度更加一致。最后采用Distance-variant IoU-weighted NMS获得更平滑的回归并避免冗余预测。
GitHub链接
:CIA-SSD。
下图是CIA-SSD与其他的点云3D目标检测算法做的比较:
1、没有THC/THCNumerics.cuh文件
报错代码:
In file included from /home/hzc/PythonProject/SE-SSD/spconv/src/spconv/reordering.cu:18:0:
/home/hzc/PythonProject/SE-SSD/spconv/include/spconv/reordering.cu.h:18:10: fatal error: THC/THCNumerics.cuh: No such file or directory
#include <THC/THCNumerics.cuh>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
src/spconv/CMakeFiles/spconv.dir/build.make:185: recipe for target 'src/spconv/CMakeFiles/spconv.dir/reordering.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/reordering.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
报错截图:
在编译过程中报错,fatal error: THC/THCNumerics.cuh: No such file or directory
,这里我们可以直接将 #include <THC/THCNumerics.cuh>
部分直接删去,或者升级pytorch的版本。
2. error: ‘AT_CHECK’ was not declared in this scope
报错内容:
src/iou3d.cpp:7:23: error: ‘AT_CHECK’ was not declared in this scope
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
报错截图:
解决方法:参考链接error: ‘AT_CHECK’ was not declared in this scope,将AT_CHECK修改为AT_ASSERT。
3. No module named ‘det3d’
报错解决办法:再次进入cd det3d
,重新编译python setup.py build develop
即可。
4. ImportError: cannot import name ‘UnencryptedCookieSessionFactoryConfig’ from ‘pyramid.session’ (unknown location)
报错原因:直接命令行安装apexpip install apex
,运行报错内容为:
Traceback (most recent call last):
File "main.py", line 10, in <module>
import apex
"""
"""
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
解决办法:手动安装apex
git clone git://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir ./
5. python中自己编写的文件报错
(SESSD) hzc@cjailab:~/PythonProject/SE-SSD_fusion$ python tools/MX_fusion_train.py --config=examples/point_pillars/configs/MX_fusion_train_config.py --checkpoint=epoch_60.pth
True
Traceback (most recent call last):
File "tools/MX_fusion_train.py", line 35, in <module>
from fusion.preprocess_for_fusion import preprocess_for_fusion
ModuleNotFoundError: No module named 'fusion'
fusion
是自己编写的python文件,但是在运行的时候出现了No module named 'fusion'
报错,原因是没有在系统初始编译中注册该文件,解决办法如下图:
在训练函数中添加工程的路径:`sys.path.append(‘/home/xxxx/SE-SSD_fusion’)
6. KeyError: “XXX is not in the models registry“
一般出现此类错误,检查模块是否加入registry
了,检查_init_
文件,记得跑python setup install
。