从代码到实践:手把手教你用EmbodiedOcc++实现高效3D占用预测(含ScanNet配置)

EmbodiedOcc++: Boosting Embodied 3D Occupancy Prediction with Plane Regularization and Uncertainty S EmbodiedOcc++:通过平面正则化和不确定性采样提升具身3D占用预测 本文提出EmbodiedOcc++,针对室内场景的几何特性(如平面结构)优化3D占用预测。核心创新包括:1)几何引导优化模块(GRM),通过法线切平面约束高斯位置更新,结合曲率和深度自适应调整权重,平衡平面对齐与复杂结构适应性;2)语义感知不确定性采样器(SUS),基于语义熵筛选低置信度高斯,减少冗余计算(跳过熵值<0.3的高斯,效率提升21.5%)。实验表明,在ScanNet数据集上,局部和具身预测的mIoU分别提升1.8 阅读详情

从代码到实践:手把手教你用EmbodiedOcc++实现高效3D占用预测(含ScanNet配置)

在机器人导航、增强现实和智能家居等前沿领域,让机器“看懂”并理解三维空间是核心挑战。传统的3D感知方法,如点云或体素网格,往往在细节与效率之间难以两全。最近,一种名为EmbodiedOcc++ 的新框架,通过巧妙地融合几何先验与智能采样策略,在室内3D占用预测任务上取得了显著突破。它不仅在ScanNet等权威数据集上刷新了性能记录,更重要的是,其代码开源且设计清晰,为算法工程师和研究者提供了一个极佳的实践起点。

如果你正致力于构建一个能够在线、增量式理解复杂室内环境的系统,无论是用于科研项目还是产品原型开发,EmbodiedOcc++都值得你深入探索。本文将以实践为导向,抛开复杂的理论推导,直接带你进入代码世界。我们将从环境搭建、数据准备开始,一步步解析核心模块的配置与实现,并分享在ScanNet数据集上训练和评估的实战技巧与避坑指南。我们的目标不仅是让你能成功复现论文结果,更是帮助你理解其设计精髓,以便未来能灵活应用于自己的场景中。

1. 环境准备与依赖安装

在开始任何代码实践之前,一个稳定、兼容的环境是成功的基石。EmbodiedOcc++基于PyTorch和3D高斯泼溅(3D Gaussian Splatting)生态构建,对系统环境和库版本有特定要求。下面我们将分步完成基础环境的搭建。

1.1 系统与硬件要求

EmbodiedOcc++主要面向Linux系统进行开发和优化,Windows环境可能面临较多的兼容性问题。以下是推荐的硬件配置:

  • 操作系统:Ubuntu 20.04 LTS 或 22.04 LTS。这是深度学习社区最主流的环境,能最大程度避免依赖冲突。
  • GPU:至少需要一张具有8GB以上显存的NVIDIA GPU。由于3D高斯表示和占用预测涉及大量并行计算,显存是主要瓶颈。对于ScanNet这样的室内数据集训练,建议使用RTX 3090 (24GB) 或更高规格的GPU以获得流畅体验。
  • 内存:建议32GB或以上系统内存,用于处理大型数据集和中间缓存。
  • 存储:预留至少100GB的SSD空间,用于存放数据集、代码和模型检查点。

1.2 创建并激活Conda环境

使用Conda进行环境管理可以有效地隔离项目依赖。我们创建一个新的Python 3.9环境。

# 创建名为embodiedocc的Python 3.9环境
conda create -n embodiedocc python=3.9 -y

# 激活环境
conda activate embodiedocc

1.3 安装PyTorch与CUDA

EmbodiedOcc++的核心计算依赖于PyTorch。请根据你的CUDA版本(通过 nvidia-smi 命令查看)安装对应的PyTorch。以下以CUDA 11.8为例:

# 安装PyTorch 2.0+, torchvision 以及对应的CUDA 11.8版本
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118

提示:务必确保PyTorch能正确识别你的GPU。安装后,在Python中运行 import torch; print(torch.cuda.is_available()),应返回 True。

1.4 安装项目核心依赖

克隆官方代码仓库后,进入项目目录安装其余依赖。这些依赖包括用于3D高斯渲染的底层库、数据处理工具等。

# 克隆代码仓库(假设仓库地址,请替换为实际地址)
git clone https://github.com/PKUHaoWang/EmbodiedOcc2.git
cd EmbodiedOcc2

# 安装requirements.txt中列出的依赖
pip install -r requirements.txt

requirements.txt 通常包含以下关键库:

  • submodules/diff-gaussian-rasterization 和 submodules/simple-knn:这是3D高斯泼溅的核心光栅化和最近邻搜索库,需要单独编译。
  • ninja:加速编译的构建系统。
  • tqdm, tensorboard, opencv-python:用于进度显示、日志记录和图像处理。
  • scikit-image, trimesh:用于图像和网格数据处理。

安装完基础依赖后,最关键的一步是编译两个C++/CUDA扩展。这通常是新手遇到问题的重灾区。

# 进入扩展目录并编译
cd submodules/diff-gaussian-rasterization
pip install .
cd ../simple-knn
pip
3D占用预测实战:EmbodiedOcc++训练与ScanNet避坑指南 3D占用预测将三维空间划分为均匀体素,逐格判断占用状态与语义类别,相比传统3D边界框更贴合真实物理结构。其核心原理在于融合RGB图像与点云等多模态特征,通过投影填充与稀疏卷积在体素空间实现几何与语义对齐。这项技术为机器人导航、机械臂操作与自动驾驶提供更可靠的稠密环境感知基础,尤其适合处理半开抽屉、堆叠物体等复杂室内场景。结合ScanNet数据集配置,完整跑通EmbodiedOcc++流程,可帮助开发者快速掌握数据预处理、训练配置与可视化验证的关键环节,避开常见工程陷阱。 阅读详情

相关推荐

EmbodiedOcc++中的不确定性采样器:如何减少21.5%冗余计算提升在线3D预测效率

本文探讨了EmbodiedOcc++框架中的不确定性采样器(Uncertainty Sampler)如何通过智能计算资源分配减少21.5%的冗余计算,提升在线3D占用预测效率。该技术结合蒙特卡洛Dropout扰动和归一化语义熵计算,动态优化更新策略,与几何引导优化模块协同工作,显著提升系统性能。

weixin_29053067的博客 139

深度学习之目标检测Mask R-CNN原理与实战

【代码】深度学习之目标检测Mask R-CNN原理与实战。

yumiwangzi30的博客 183

YOLO多任务实战,实例分割、姿态估计与目标跟踪

本文系统阐述YOLOv8多任务实战技术,涵盖实例分割、姿态估计与目标跟踪的联合实现。基于共享骨干与解耦头设计,YOLOv8通过原型掩码与关键点回归实现高效多任务推理,支持检测、分割、姿态、分类与跟踪一体化部署。文章详解网络结构、任务头设计、联合训练优化及TensorRT加速,提供可复现的完整代码流程,适用于工业视觉、智慧交通等实时多任务场景,显著降低开发与部署成本。

QQ_778132974的博客 12

<数据集>咖啡叶片病害识别<目标检测>

YOLO与VOC格式的咖啡叶片病害识别数据集,适用于YOLO系列、Faster Rcnn、SSD等模型训练,类别:Cercospora、Miner、Phoma、Rust,图片数量1744。文件中包含图片、txt标签、指定类别信息的yaml文件、xml标签,已将图片和txt标签划分为训练集、验证集和测试集,可直接用于YOLOv5、YOLOv6、YOLOv7、YOLOv8、YOLOv9、YOLOv10、YOLOv11、YOLOv12、YOLOv13、YOLOv26等YOLO系列算法的训练。

qq_53332949的博客 254

unity 腾讯地图sdk移动和缩放代码

unity 腾讯地图sdk 实现移动端 缩放 和 移动

。。。。。 1279

PyMySQLSaver实战:构建高可靠性的LangGraph状态管理

本文详细介绍了如何使用PyMySQLSaver构建高可靠性的LangGraph状态管理系统。通过检查点机制和MySQL持久化技术,开发者可以确保AI应用在崩溃后从最近状态恢复,支持长时间运行任务和多轮交互。文章包含核心架构解析、生产环境部署指南及实战案例,帮助开发者掌握状态管理的核心技术。

weixin_29310605的博客 491

PostgreSQL向量数据插件--pgvector安装(附PostgreSQL安装)

本文为本人在安装pgvector中踩过的坑,已找到解决方法,现向大家分享。

m0_62627802的博客 2万+

Unity Android平台下插件/SDK开发通用流程

本文主要面向对Android开发不甚了解的Unity开发者,介绍了基于最新的Android Studio的标准Android开发环境与项目结构的配置流程,在此基础上,开发者可以快速的进行SDK的接入与插件的开发。

ZhangDi2017的博客 1万+

什么是PCIe Relaxed Ordering

什么是PCIe上的Relaxed Ordering呢?直接翻译的话就是宽松排序。在理解这个东西之前,需要先了解下什么是PCIe的基本事务排序法则。

qq_42824983的博客 1505

海鸥派OpenEuler开发板实战:从烧写到SSH连接的完整指南

本文提供海鸥派OpenEuler开发板从开箱到SSH远程连接的完整实战指南。详细介绍了基于海思SD3403/SS928芯片的算力开发板系统烧写、存储扩容、网络配置等关键步骤,帮助开发者快速上手这款AI边缘计算设备,并实现高效的远程开发与管理。

ruby5的博客 1120

Buck电源设计常见的一些问题(四)MOS管振荡抑制方法(二)

另一方面,开关振铃为远超开关频率的高频振铃,并伴随很高的 dV/dt,会带来传导和辐射的 EMI 问题,可能会使得终端产品不能通过 EMI 标准测试,更严重时甚至会干扰开关电源自身的信号电路或临近的其他功能电路的正常工作。选用二极管反向特性好的器件;该电路可等效成图 3 中 LC 谐振电路,新的 LR和 CR为 Lp1、Lp5,Lp3, Lp4, CD等所有参与振铃的寄生感容的复合值。通常 Snubber 的 Csnub取值在数 nF 以上,在振铃频率 fR(加了 snubber 后)下的阻抗很小。

小幽余生不加糖 2891

CodeX 登录报错 os error 10013?一键修复 CodeX 无法登录问题(亲测有效)

CodeX 登录时报 os error 10013?本文提供快速修复方案,实测有效,彻底解决登录报错:登录失败:failed to start login server: 以一种访问权限不允许的方式做了一个访问套接字的尝试。 (os error 10013)的问题💡

XiaoqiangClub的博客 2909

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

上一篇: 平衡开关损耗与EMI:栅极电阻选取的黄金法则(附实测数据)
下一篇: 用Processing玩转2D机械臂模拟:从几何原理到代码实现(附完整源码)
terraform7cloud
博客等级 码龄1天 0粉丝 1179原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值