文章目录
OpenPCDet
├── pcdet
├── tools
├── checkpoints
├── data
│ ├── kitti
│ │ ├── ImageSets
│ │ ├── testing
│ │ │ ├── calib
│ │ │ ├── image_2
│ │ │ ├── velodyne
│ │ ├── training
│ │ │ ├── calib
│ │ │ ├── image_2
│ │ │ ├── label_2
│ │ │ ├── velodyne
# 这一步后会生成下方所示的gt_database(里面是根据label分割好的点云)及.pkl文件
python -m pcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml
kitti
├── ImageSets
│ ├── test.txt
│ ├── train.txt
├── testing
│ ├── calib
│ ├── image_2
│ ├── velodyne
├── training
│ ├── calib
│ ├── image_2
│ ├── label_2
│ ├── velodyne
├── gt_database
│ ├── xxxxx.bin
├── kitti_infos_train.pkl
├── kitti_infos_val.pkl
├── kitti_dbinfos_train.pkl
├── kitti_infos_trainval.pkl
cd tools
python train.py --cfg_file cfgs/kitti_models/pointpillar.yaml --batch_size=1 --epochs=10 --workers=1
# 测试生成模型的性能 test.py
python test.py --cfg_file cfgs/kitti_models/pointpillar.yaml --batch_size 1 --ckpt ../output/kitti_models/pointpillar/default/ckpt/checkpoint_epoch_9.pth
# 可视化模型预测效果 demo.py
python demo.py --cfg_file cfgs/kitti_models/pointpillar.yaml --data_path ../data/kitti/testing/velodyne/000001.bin --ckpt ../output/kitti_models/pointpillar/default/ckpt/checkpoint_epoch_9.pth
- tools/cfgs/dataset_configs/kitti_dataset.yaml
- 23行 USE_ROAD_PLANE: true 将true改为False
- pcdet/datasets/augmentor/data_augmentor.py
- 225-228行 注释掉
if 'road_plane' in data_dict:
data_dict.pop('road_plane')
- pcdet/datasets/augmentor/database_sampler.py
- 161-167行 注释掉
if self.sampler_cfg.get('USE_ROAD_PLANE', False):
sampled_gt_boxes, mv_height = self.put_boxes_on_road_planes(
sampled_gt_boxes, data_dict['road_plane'], data_dict['calib']
)
data_dict.pop('calib')
data_dict.pop('road_plane')
- 186-189行 注释掉
if self.sampler_cfg.get('USE_ROAD_PLANE', False):
# mv height
obj_points[:, 2] -= mv_height[idx]
from .custom.custom_dataset import CustomDataset
# 在__all__ = 中增加
'CustomDataset': CustomDataset
custom
├── ImageSets
│ ├── test.txt
│ ├── train.txt
├── testing
│ ├── velodyne
├── training
│ ├── label_2
│ ├── velodyne
├── gt_database
│ ├── xxxxx.bin
├── custom_infos_train.pkl
├── custom_infos_val.pkl
├── custom_dbinfos_train.pkl
python -m pcdet.datasets.custom.custom_dataset create_custom_infos tools/cfgs/dataset_configs/custom_dataset.yaml
python tools/train.py --cfg_file tools/cfgs/custom_models/pointrcnn.yaml --batch_size=1 --epochs=10 --workers=1

下面说一下我训练时遇到的错误避免大家踩坑
一开始测试没有后我检查我的标签数据发现我中间几位的数据是<xyz长宽高>而KITTI中间几位是<高宽长xyz>,所以一开始我的gt_database里生成的.bin文件都是0kb里面没有点的数据啥也没有(也不知道为啥这样也能训练),标签数据位置不对没能从点云中裁剪出点。
修正标签数据后重新对数据集进行预处理和训练,gt_database文件夹下生成的.bin文件是对的,也可以进行训练(训练时报错什么difficulty把该行注释后就可以跑了)并且生成对应pth文件,但是测试的时候依旧没有框。

由于一开始我的标签是在3.1中利用PCD文件标注生成的,思考会不会因为这个原因导致测试没有框,于是又重新对所有的.bin点云进行重新标注,结果训练的时候报错ValueError: Caught ValueError in DataLoader worker process 0.把worker值改为0 后就没报这个错了,但还是报错ValueError: Cannot take a larger sample than population when 'replace=False’跟着几个博客改了改还是没能改成功。
更新一下报错ValueError: Cannot take a larger sample than population when 'replace=False’找到解决办法了
# 将pcdet/datasets/processor/data_processor.py大概第161行的
extra_choice = np.random.choice(choice, num_points - len(points), replace=False)
# 修改为以下代码
try:
extra_choice = np.random.choice(choice, num_points - len(points), replace=False)
except ValueError:
extra_choice = np.random.choice(choice, num_points - len(points), replace=True)




# -*- coding:utf-8 -*-
import os
def process(path):
files = os.listdir(path)
file_names = set([file.split('.')[0] for file in files])
file_names = list(file_names)
# 替换字符
print(file_names)
for filename in file_names:
file_data = ''
dir_path = os.path.join(path, filename + ".txt") # TXT文件
# f = open('E:/DataSet/label_2/cloudnorm_00001.txt') # 打开txt文件
print(type(dir_path))
print(dir_path)
f = open(dir_path) # 打开txt文件
line = f.readline() # 以行的形式进行读取文件
list1 = []
while line:
a = line.split()
b = a[0:15] # 这是选取需要读取/修改的列
list1.append(b) # 将其添加在列表之中
line = f.readline()
f.close()
# path_out = dir_path # 新的txt文件
with open(dir_path, 'w+', encoding='utf-8') as f_out:
for i in list1:
# print(len(i))
l0 = i[0]
l1 = i[1]
l2 = i[2]
l3 = i[3]
l4 = i[4]
l5 = i[5]
l6 = i[6]
l7 = i[7]
l8 = i[8]
l9 = i[9]
l10 = i[10]
l11 = i[11]
l12 = i[12]
l13 = i[13]
l14 = i[14]
a=round( (float(i[10])-0.5*float(i[13])),6)
# print(fir)
# print(str(sec))
f_out.write(
l0 + ' ' + l1 + ' ' + l2 + ' ' + l3 + ' ' + l4 + ' ' + l5 + ' ' + l6 + ' ' + l7 + ' ' + l13 + ' ' + l12 + ' ' + l11 + ' '+ l8 + ' ' + l9 +' ' + str(a) + ' ' + l14 + '\n')
print('trans has done!!!')
if __name__ == '__main__':
# 这里路径修改为你自己point-cloud-annotation-tool标注文件路径
path = 'E:/DataSet/text2/'
process(path)
# 将原本的
loc_lidar = np.concatenate([np.array((float(loc_obj[2]), float(-loc_obj[0]), float(loc_obj[1]-2.3)), dtype=np.float32).reshape(1,3) for loc_obj in loc])
return loc_lidar
# 修改为
loc_lidar = np.concatenate(
[np.array((float(loc_obj[0]), float(loc_obj[1]), float(loc_obj[2])), dtype=np.float32).reshape(1, 3) for loc_obj in loc])
return loc_lidar



我正在使用的第三方API的文档状态:"[O]urAPIonlyacceptspaddedBase64encodedstrings."什么是“填充的Base64编码字符串”以及如何在Ruby中生成它们。下面的代码是我第一次尝试创建转换为Base64的JSON格式数据。xa=Base64.encode64(a.to_json) 最佳答案 他们说的padding其实就是Base64本身的一部分。它是末尾的“=”和“==”。Base64将3个字节的数据包编码为4个编码字符。所以如果你的输入数据有长度n和n%3=1=>"=="末尾用于填充n%
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
有时我需要处理键/值数据。我不喜欢使用数组,因为它们在大小上没有限制(很容易不小心添加超过2个项目,而且您最终需要稍后验证大小)。此外,0和1的索引变成了魔数(MagicNumber),并且在传达含义方面做得很差(“当我说0时,我的意思是head...”)。散列也不合适,因为可能会不小心添加额外的条目。我写了下面的类来解决这个问题:classPairattr_accessor:head,:taildefinitialize(h,t)@head,@tail=h,tendend它工作得很好并且解决了问题,但我很想知道:Ruby标准库是否已经带有这样一个类? 最佳
我正在尝试使用Curbgem执行以下POST以解析云curl-XPOST\-H"X-Parse-Application-Id:PARSE_APP_ID"\-H"X-Parse-REST-API-Key:PARSE_API_KEY"\-H"Content-Type:image/jpeg"\--data-binary'@myPicture.jpg'\https://api.parse.com/1/files/pic.jpg用这个:curl=Curl::Easy.new("https://api.parse.com/1/files/lion.jpg")curl.multipart_form_
无论您是想搭建桌面端、WEB端或者移动端APP应用,HOOPSPlatform组件都可以为您提供弹性的3D集成架构,同时,由工业领域3D技术专家组成的HOOPS技术团队也能为您提供技术支持服务。如果您的客户期望有一种在多个平台(桌面/WEB/APP,而且某些客户端是“瘦”客户端)快速、方便地将数据接入到3D应用系统的解决方案,并且当访问数据时,在各个平台上的性能和用户体验保持一致,HOOPSPlatform将帮助您完成。利用HOOPSPlatform,您可以开发在任何环境下的3D基础应用架构。HOOPSPlatform可以帮您打造3D创新型产品,HOOPSSDK包含的技术有:快速且准确的CAD
在应用开发中,有时候我们需要获取系统的设备信息,用于数据上报和行为分析。那在鸿蒙系统中,我们应该怎么去获取设备的系统信息呢,比如说获取手机的系统版本号、手机的制造商、手机型号等数据。1、获取方式这里分为两种情况,一种是设备信息的获取,一种是系统信息的获取。1.1、获取设备信息获取设备信息,鸿蒙的SDK包为我们提供了DeviceInfo类,通过该类的一些静态方法,可以获取设备信息,DeviceInfo类的包路径为:ohos.system.DeviceInfo.具体的方法如下:ModifierandTypeMethodDescriptionstatic StringgetAbiList()Obt
本教程将在Unity3D中混合Optitrack与数据手套的数据流,在人体运动的基础上,添加双手手指部分的运动。双手手背的角度仍由Optitrack提供,数据手套提供双手手指的角度。 01 客户端软件分别安装MotiveBody与MotionVenus并校准人体与数据手套。MotiveBodyMotionVenus数据手套使用、校准流程参照:https://gitee.com/foheart_1/foheart-h1-data-summary.git02 数据转发打开MotiveBody软件的Streaming,开始向Unity3D广播数据;MotionVenus中设置->选项选择Unit
文章目录一、概述简介原理模块二、配置Mysql使用版本环境要求1.操作系统2.mysql要求三、配置canal-server离线下载在线下载上传解压修改配置单机配置集群配置分库分表配置1.修改全局配置2.实例配置垂直分库水平分库3.修改group-instance.xml4.启动监听四、配置canal-adapter1修改启动配置2配置映射文件3启动ES数据同步查询所有订阅同步数据同步开关启动4.验证五、配置canal-admin一、概述简介canal是Alibaba旗下的一款开源项目,Java开发。基于数据库增量日志解析,提供增量数据订阅&消费。Git地址:https://github.co
我正在尝试在Rails上安装ruby,到目前为止一切都已安装,但是当我尝试使用rakedb:create创建数据库时,我收到一个奇怪的错误:dyld:lazysymbolbindingfailed:Symbolnotfound:_mysql_get_client_infoReferencedfrom:/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundleExpectedin:flatnamespacedyld:Symbolnotfound:_mysql_get_client_infoReferencedf
文章目录1.开发板选择*用到的资源2.串口通信(个人理解)3.代码分析(注释比较详细)1.主函数2.串口1配置3.串口2配置以及中断函数4.注意问题5.源码链接1.开发板选择我用的是STM32F103RCT6的板子,不过代码大概在F103系列的板子上都可以运行,我试过在野火103的霸道板上也可以,主要看一下串口对应的引脚一不一样就行了,不一样的就更改一下。*用到的资源keil5软件这里用到了两个串口资源,采集数据一个,串口通信一个,板子对应引脚如下:串口1,TX:PA9,RX:PA10串口2,TX:PA2,RX:PA32.串口通信(个人理解)我就从串口采集传感器数据这个过程说一下我自己的理解,