当前位置:网站首页>mmdetection3d(2)---结果、log可视化
mmdetection3d(2)---结果、log可视化
2022-07-28 16:34:00 【张飞飞~】
1.结果可视化:
安装的docker 版本的mmdetection3d在可视化的时候存在一些问题,open3d总是难以打开窗口,但源码安装的版本是可以实现可视化的。所以采用源码安装方法。源码安装也比较简便,环境没什么问题的话,过程很顺滑。
(1)源码安装步骤
安装过程方法:https://github.com/open-mmlab/mmdetection3d/blob/master/docs/getting_started.md
安装过程中没有什么坑,按照步骤一步一步来就可以。
安装运行之后出现类似:
KeyError: 'SparseConv2d is already registered in conv layer'
的报错,大概率是MMCV版本过高,适当降低mmcv版本,重新安装即可.
python_open3d_Error: The DISPLAY environment variable is missing
https://blog.csdn.net/shyjhyp11/article/details/113250325
(2)使用源码安装的版本进行可视化
先配置好config文件中test_cfg部分的的iou_thre以及score_thr
a.在线可视化
运行之后会对每一帧都进行可视化,并且可视化后会把原始点云和预测结果的.obj文件保存到show-dir目录下。每次想切换下一帧就将open3d窗口×掉。不过这种方法只能显示预测结果,GT没有一起显示。
eg:
python tools/test.py configs/3dssd/3dssd_kitti-3d-car.py data/mmdetection/pretrain_weight/3dssd_kitti-3d-car_20210324_122002-07e9a19b.pth --show --show-dir ./data/zjh_data/mmdetection/show_result
b.离线可视化,可以和GT一起显示
想要和GT一起显示,需要生成的文件中也一起包括gt.obj。使用如下命令可以一起得到gt.obj
python tools/test.py ${
CONFIG_FILE} ${
CKPT_PATH} --eval 'mAP' --eval-options 'show=True' 'out_dir=${SHOW_DIR}'
但在实际运行的时候,我的源码安装的mmdet3d出现如下报错。
暂时没有解决该问题,先记录一下。没改过这部分源码,感觉是环境配置哪里出现了点问题。
File "/mnt/data/zjh_data/mmdet3d_install/mmdetection3d/mmdet3d/core/evaluation/kitti_utils/eval.py", line 365, in calculate_iou_partly
overlap_part = image_box_overlap(gt_boxes, dt_boxes)
TypeError: expected dtype object, got 'numpy.dtype[float64]'
曲线救国方法:
采用docker版本先生成可视化文件,然后再采用源码版本的可视化。但是docker版本的因为open3d的问题,导致没法可视化从而导致在调用open3d的时候就报错,使得无法生成可视化文件。
解决方法:打开目录mmdet3d/core/visualization/show_result.py文件,把show_result函数下的if show 调用open3d部分全都注释,就不会因为open3d不能用影响可视化文件生成。
运行如下命令生成模型.pkl文件和可视化文件000023_gt.obj ,000023_points.obj ,000023_pred.obj。
python tools/test.py ${
CONFIG_FILE} ${
CKPT_PATH} --out ./data/result_output/out_dir/3dssd.pkl --eval 'mAP' --eval-options 'show=True' 'out_dir=./data/result_output/show_result'
生成之后采用tool中的离线可视化脚本进行可视化:
python tools/misc/visualize_results.py ${
CONFIG_FILE} --result ~/zjh_data/result_output/out_dir/3dssd.pkl --show-dir ~/zjh_data/result_output/show_result/

2.log文件中误差曲线可视化
python tools/analysis_tools/analyze_logs.py plot_curve ~/zjh_data/mmdetection/work_dir623/20210624_004729.log.json --keys loss --legend loss --out loss.pdf
- test测试并提交到kitti上进行在线测评
(1)修改config文件中
ann_file=data_root + 'kitti_infos_test.pkl',
split='testing',
data = dict(
samples_per_gpu=6,
workers_per_gpu=4,
train=dict(
type='RepeatDataset',
times=2,
dataset=dict(
type=dataset_type,
data_root=data_root,
ann_file=data_root + 'kitti_infos_train.pkl',
split='training',
pts_prefix='velodyne_reduced',
pipeline=train_pipeline,
modality=input_modality,
classes=class_names,
test_mode=False,
# we use box_type_3d='LiDAR' in kitti and nuscenes dataset
# and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='LiDAR')),
val=dict(
type=dataset_type,
data_root=data_root,
ann_file=data_root + 'kitti_infos_val.pkl',
split='training',
pts_prefix='velodyne_reduced',
pipeline=test_pipeline,
modality=input_modality,
classes=class_names,
test_mode=True,
box_type_3d='LiDAR'),
test=dict(
type=dataset_type,
data_root=data_root,
# 这里改动过,训练的时候重新改为val
####下面两行修改成test数据
ann_file=data_root + 'kitti_infos_test.pkl',
split='testing',
pts_prefix='velodyne_reduced',
pipeline=test_pipeline,
modality=input_modality,
classes=class_names,
test_mode=True,
box_type_3d='LiDAR'))
(2)使用脚本文件进行测试
边栏推荐
- 软件测试培训两个月骗局?培训机构到底如何选择?
- 【C语言必看】哟写BUG呢,我敢保证你踩过坑
- Can you read the story?
- 转行学习软件测试有前途吗?
- JS synchronizes the local time with the server time
- mmdetection3D---(1)
- Database optimization -- deeply understand the underlying data structure and algorithm of MySQL index
- .net MVC的理解
- The browser has no Internet, and wechat can connect to the Internet (solution)
- 软件测试就业前景如何?
猜你喜欢

【C语言进阶】——函数指针

The browser has no Internet, and wechat can connect to the Internet (solution)

Can you read the story?

蚂蚁金服移动测试工具solopi监控部分源码导读。。持续更新

Can‘t use an undefined value as an ARRAY reference at probe2symbol

R中因子(factor)

Visual Object Class介绍PASCAL VOC数据集

R语言画图/绘图/作图2

Mmcv installation method

【C语言笔记分享】字符函数和字符串函数(建议收藏)
随机推荐
【C语言笔记分享】字符函数和字符串函数(建议收藏)
点云处理--voxel filter
[阅读笔记] For Paper:R-CNN系列的三篇论文总结
软件测试前景不行了吗?进入寒冬期了吗?
数据库性能分析与优化(爱测未来团队内训材料)
Strsplit() function
JS synchronizes the local time with the server time
Alibaba P8 architect talk: seven knowledge points (including interview questions) that must be learned well to become an architect
ggplot2地图
[阅读笔记]-2 通过朴素贝叶斯模型学习机器学习分类
Public medical database
中南大学研究生复试机试题
Interviewer: the actual record of algorithm question brushing.pdf I can't even answer it
Talking about test platform -- Discussion on construction mode
Precautions for $ionicpopup in ionic when calling alert for two consecutive times
PCA 报错Error in eigen(crossprod(t(X), t(X)), symmetric = TRUE) : ‘x‘里有无穷值或遗漏值
The difference between using switch in a loop and using break and continue after executing a condition
pycharm连接到远程docker
MySQL面试题大全(陆续更新)
电工学自学笔记1.21