3DTrans 开源项目教程

3DTrans 开源项目教程

3DTransAn open-source codebase for exploring autonomous driving pre-training项目地址:https://gitcode.com/gh_mirrors/3d/3DTrans

项目介绍

3DTrans 是一个专注于自动驾驶领域的开源代码库,旨在通过转移学习和可扩展的预训练技术解决自动驾驶任务中的连续学习问题。项目包括多种技术,如无监督域适应(UDA)、主动域适应(ADA)、半监督域适应(SSDA)和多数据集域融合(MDF)等,以提高3D对象检测的性能。

项目快速启动

安装

首先,克隆项目仓库到本地:

git clone https://github.com/PJLab-ADG/3DTrans.git
cd 3DTrans

安装所需的依赖:

pip install -r requirements.txt

数据准备

准备数据集并将其转换为3DTrans格式:

python tools/prepare_dataset.py --dataset_path /path/to/dataset --output_path /path/to/output

模型训练

使用预训练模型进行训练:

python train.py --config configs/default_config.yaml --pretrained_model /path/to/pretrained_model

应用案例和最佳实践

案例一:跨数据集适应

使用3DTrans进行Waymo到KITTI数据集的跨域适应,提高3D对象检测的准确性。

案例二:多数据集融合

通过多数据集域融合技术,结合多个公开数据集的数据,进一步提升模型的泛化能力。

最佳实践

  • 数据预处理:确保数据集的质量和一致性,以提高训练效果。
  • 模型选择:根据具体任务选择合适的预训练模型和配置。
  • 超参数调整:通过实验调整学习率、批大小等超参数,以达到最佳性能。

典型生态项目

Uni3D

Uni3D 是一个统一的多数据集3D对象检测基准,旨在解决当前3D对象检测模型在不同数据集间部署时的准确性下降问题。

AD-PT

AD-PT 是一种自动驾驶预训练方法,使用大规模点云数据集进行预训练,以提高下游任务的性能。

SPOT

SPOT 是一种通过占用预测进行可扩展3D预训练的方法,适用于自动驾驶领域的3D表示学习。

通过这些生态项目,3DTrans 构建了一个完整的自动驾驶技术栈,涵盖了从数据预处理到模型训练和部署的各个环节。

3DTransAn open-source codebase for exploring autonomous driving pre-training项目地址:https://gitcode.com/gh_mirrors/3d/3DTrans

  • 16
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
将下面代码写成matlab形式 int runBm3d( const Mat image_noisy, Mat& image_basic, Mat& image_denoised ) { int Height = image_noisy.rows; int Width = image_noisy.cols; int Channels = image_noisy.channels(); vector<Mat> block_noisy;//store the patch vector<int>row_idx;//patch idx along the row direction vector<int>col_idx; GetAllBlock(image_noisy, Width, Height, Channels, kHard, pHard, block_noisy, row_idx, col_idx); int bn_r = row_idx.size(); int bn_c = col_idx.size(); tran2d(block_noisy, kHard); vector<int> sim_num;//index number for the selected similar patch in the block vector vector<int> sim_idx_row;//index number for the selected similar patch in the original Mat vector<int> sim_idx_col; vector<Mat>data;//store the data during transforming and shrinking Mat kaiser = gen_kaiser(beta, kHard);//2-D kaiser window float weight_hd = 1.0;//weights used for current relevent patch Mat denominator_hd(image_noisy.size(), CV_32FC1, Scalar::all(0)); Mat numerator_hd(image_noisy.size(), CV_32FC1, Scalar::all(0)); for (int i = 0; i < bn_r; i++) { for (int j = 0; j < bn_c; j++) { //for each pack in the block sim_num.clear(); sim_idx_row.clear(); sim_idx_col.clear(); data.clear(); getSimilarPatch(block_noisy, data, sim_num, i, j, bn_r, bn_c, int((nHard - kHard) / pHard) + 1, NHard, tao_hard);//block matching for (int k = 0; k < sim_num.size(); k++)//calculate idx in the left-top corner { sim_idx_row.push_back(row_idx[sim_num[k] / bn_c]); sim_idx_col.push_back(col_idx[sim_num[k] % bn_c]); } tran1d(data, kHard);//3-D transforming DetectZero(data, lambda3d * sigma);//shrink the cofficient weight_hd = calculate_weight_hd(data, sigma); Inver3Dtrans(data,kHard);//3-D inverse transforming aggregation(numerator_hd, denominator_hd, sim_idx_row, sim_idx_col, data, weight_hd, kHard, kaiser);//aggregation using weigths } } image_basic = numerator_hd / denominator_hd;
05-24
function [image_basic,image_denoised] = runBm3d(image_noisy) Height = size(image_noisy,1); Width = size(image_noisy,2); Channels = size(image_noisy,3); block_noisy = {}; %store the patch row_idx = []; %patch idx along the row direction col_idx = []; [block_noisy,row_idx,col_idx] = GetAllBlock(image_noisy, Width, Height, Channels, kHard, pHard); bn_r = length(row_idx); bn_c = length(col_idx); block_noisy = tran2d(block_noisy, kHard); sim_num = {}; %index number for the selected similar patch in the block vector sim_idx_row = []; %index number for the selected similar patch in the original Mat sim_idx_col = []; data = {}; %store the data during transforming and shrinking kaiser = gen_kaiser(beta, kHard); %2-D kaiser window weight_hd = 1.0; %weights used for current relevent patch denominator_hd = zeros(size(image_noisy),'single'); numerator_hd = zeros(size(image_noisy),'single'); for i = 1:bn_r for j = 1:bn_c %for each pack in the block sim_num = {}; sim_idx_row = []; sim_idx_col = []; data = {}; [data,sim_num] = getSimilarPatch(block_noisy, i, j, bn_r, bn_c, int32((nHard - kHard) / pHard) + 1, NHard, tao_hard); %block matching for k = 1:length(sim_num) %calculate idx in the left-top corner sim_idx_row(k) = row_idx(sim_num(k) / bn_c); sim_idx_col(k) = col_idx(mod(sim_num(k), bn_c)); end data = tran1d(data, kHard); %3-D transforming data = DetectZero(data, lambda3d * sigma); %shrink the cofficient weight_hd = calculate_weight_hd(data, sigma); data = Inver3Dtrans(data,kHard); %3-D inverse transforming [numerator_hd, denominator_hd] = aggregation(numerator_hd, denominator_hd, sim_idx_row, sim_idx_col, data, weight_hd, kHard, kaiser); %aggregation using weigths end end image_basic = numerator_hd ./ denominator_hd; end
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

穆声淼Germaine

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值