当前位置: 首页 > article >正文

【机器人】复现 3D-Mem 具身探索和推理 | 3D场景记忆 CVPR 2025

3D-Mem 是用于具体探索推理3D场景记忆,来自CVPR 2025.

本文分享3D-Mem复现和模型推理的过程~

下面是一个推理和选择识别的结果:

看一下机器人探索的效果:

下面是真实环境下,官方跑的demo,3D-Mem无需训练的设计,可以无缝适应真实的机器人,从而实现在现实世界中的部署

项目地址:https://umass-embodied-agi.github.io/3D-Mem/

 1、创建Conda环境

首先创建一个Conda环境,名字为3dmem,python版本为3.9

进入3dmem环境

conda create -n 3dmem python=3.9 -y
conda activate 3dmem

然后下载代码,进入代码工程:https://github.com/UMass-Embodied-AGI/3D-Mem

git clone https://github.com/UMass-Embodied-AGI/3D-Mem.git
cd 3D-Mem

2、安装habitat模拟器

我需要安装habitat-sim==0.2.5、headless 和 faiss-cpu

conda install -c conda-forge -c aihabitat habitat-sim=0.2.5 headless faiss-cpu=1.7.4 -y

等待安装完成~

3、安装 torch 和 pytorch3d

执行下面命令,进行安装torch:

pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118

再安装pytorch3d:

conda install https://anaconda.org/pytorch3d/pytorch3d/0.7.4/download/linux-64/pytorch3d-0.7.4-py39_cu118_pyt201.tar.bz2 -y

4、安装依赖库

执行下面命令进行安装:

pip install omegaconf==2.3.0 open-clip-torch==2.26.1 ultralytics==8.2.31 supervision==0.21.0 opencv-python-headless==4.10.* \scikit-learn==1.4 scikit-image==0.22 open3d==0.18.0 hipart==1.0.4 openai==1.35.3 httpx==0.27.2

等待安装完成~

5、安装clip

执行下面命令进行安装:

pip install git+https://github.com/openai/CLIP.git

打印信息

Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Collecting git+https://github.com/openai/CLIP.gitCloning https://github.com/openai/CLIP.git to /tmp/pip-req-build-imrsh3kfRunning command git clone --filter=blob:none --quiet https://github.com/openai/CLIP.git /tmp/pip-req-build-imrsh3kfResolved https://github.com/openai/CLIP.git to commit dcba3cb2e2827b402d2701e7e1c7d9fed8a20ef1Preparing metadata (setup.py) ... done
.....
Successfully built clip
Installing collected packages: clip
Successfully installed clip-1.0

clip的主要思路流程:

6、修改Hugging Face 镜像源

代码会自动从Hugging Face下载模型权重,需要先配置为国内的镜像源

 编辑用户配置文件 ~/.bashrc,设置为 export HF_ENDPOINT=https://hf-mirror.com

执行下面命令:

echo 'export HF_ENDPOINT=https://hf-mirror.com' >> ~/.bashrc
source ~/.bashrc  # 立即生效

验证环境变量​​,是否修改成功:

echo $HF_ENDPOINT

正常会输出:https://hf-mirror.com,说明设置成功啦~

7、准备HM3D数据集

我们需要下载 hm3d_v0.2

下载地址:GitHub - matterport/habitat-matterport-3dresearch

选择的下载文件:hm3d-val-habitat-v0.2.tar

然后放到data目录下:

8、准备gpt-4o的Api

推荐使用国内的供应商,比较稳定:https://ai.nengyongai.cn/register?aff=RQt3

首先“添加令牌”,设置额度(比如5块钱),点击查看就能看到Key啦

 然后填写到 src/const.py中

# about habitat scene
INVALID_SCENE_ID = []# about chatgpt api
END_POINT = "https://ai.nengyongai.cn/v1"
OPENAI_KEY = "xxxxxxxxxxxxxxxxxxxxx"

点击模型列表,能查看支持的模型:

看一下使用情况:


 

9、运行模型推理

查看配置文件 cfg/eval_aeqa.yaml

# 通用设置
seed: 77  # 随机种子
exp_name: "exp_eval_aeqa"  # 实验名称
output_parent_dir: "results"  # 输出文件夹的父目录
scene_dataset_config_path: "data/hm3d_annotated_basis.scene_dataset_config.json"  # 场景数据集配置文件路径
scene_data_path: "data/hm3d_v0.2/"  # 场景数据路径
questions_list_path: 'data/aeqa_questions-41.json'  # 问题列表文件路径concept_graph_config_path: "cfg/concept_graph_default.yaml"  # 概念图配置文件路径# 主要设置
choose_every_step: true  # 是否在每一步都查询视觉语言模型(VLM),还是仅在到达导航目标后查询
egocentric_views: true  # 是否在提示视觉语言模型时添加自我中心视角
prefiltering: true  # 是否使用预筛选(实际上不能关闭,否则会超出上下文长度限制)
top_k_categories: 10  # 在预筛选过程中保留与目标最相关的前 k 个类别# 关于检测模型
yolo_model_name: yolov8x-world.pt  # YOLO 模型名称
sam_model_name: sam_l.pt  # SAM 模型名称
class_set: scannet200  # 使用 200 类别的数据集用于 YOLO-world 检测器# 关于快照聚类
min_detection: 1  # 最小检测数量# 相机和图像设置
camera_height: 1.5  # 相机高度(单位:米)
camera_tilt_deg: -30  # 相机倾斜角度(单位:度)
img_width: 1280  # 图像宽度(单位:像素)
img_height: 1280  # 图像高度(单位:像素)
hfov: 120  # 水平视场角(单位:度)# 是否保存可视化结果(这会比较慢)
save_visualization: true# 用于提示 GPT-4O 的图像大小
prompt_h: 360  # 提示图像高度(单位:像素)
prompt_w: 360  # 提示图像宽度(单位:像素)# 导航设置
num_step: 50  # 最大导航步数
init_clearance: 0.3  # 初始避碰距离(单位:米)
extra_view_phase_1: 2  # 第一阶段额外视角的数量
extra_view_angle_deg_phase_1: 60  # 第一阶段每个额外视角之间的角度(单位:度)
extra_view_phase_2: 6  # 第二阶段额外视角的数量
extra_view_angle_deg_phase_2: 40  # 第二阶段每个额外视角之间的角度(单位:度)# 关于 TSDF、深度图和边界更新
explored_depth: 1.7  # 已探索深度(单位:米)
tsdf_grid_size: 0.1  # TSDF 网格大小(单位:米)
margin_w_ratio: 0.25  # 宽度方向的边界比例
margin_h_ratio: 0.6  # 高度方向的边界比例
planner:  # 规划器设置eps: 1  # 规划器的精度max_dist_from_cur_phase_1: 1  # 第一阶段未找到目标时,探索边界的步长(单位:米)max_dist_from_cur_phase_2: 1  # 第二阶段找到目标后,接近目标的步长(单位:米)final_observe_distance: 0.75  # 第二阶段找到一个距离目标对象此距离的地方进行观察(单位:米)surrounding_explored_radius: 0.7  # 周围已探索区域的半径(单位:米)# 关于边界选择frontier_edge_area_min: 4  # 边界边缘最小面积frontier_edge_area_max: 6  # 边界边缘最大面积frontier_area_min: 8  # 边界最小面积frontier_area_max: 9  # 边界最大面积min_frontier_area: 20  # 边界至少需要的像素数量max_frontier_angle_range_deg: 150  # 边界中像素所张角度的最大值(单位:度)region_equal_threshold: 0.95  # 区域相等的阈值# 关于场景图构建
scene_graph:confidence: 0.003  # 置信度阈值nms_threshold: 0.1  # 非极大值抑制阈值iou_threshold: 0.5  # 交并比阈值obj_include_dist: 3.5  # 包含目标对象的距离(单位:米)target_obj_iou_threshold: 0.6  # 目标对象的交并比阈值

运行下面代码,生成 A-EQA 数据集的预测结果

python run_aeqa_evaluation.py -cf cfg/eval_aeqa.yaml

运行程序后,会联网下载一些模型权重,

包括:yolov8x-world.pt、sam_l.pt、open_clip_pytorch_model.bin、ViT-B-32.pt等

下面是运行信息:

00:00:00 - ***** Running exp_eval_aeqa *****
00:00:00 - Total number of questions: 41
00:00:00 - number of questions after splitting: 41
00:00:00 - question path: data/aeqa_questions-41.json
Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-world.pt to 'yolov8x-world.pt'...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 141M/141M [04:04<00:00, 605kB/s]
00:04:09 - Load YOLO model yolov8x-world.pt successful!
Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/sam_l.pt to 'sam_l.pt'...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.16G/1.16G [11:56<00:00, 1.74MB/s]
00:16:12 - Load SAM model sam_l.pt successful!
00:16:12 - Loaded ViT-B-32 model config.
open_clip_pytorch_model.bin:  70%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎                                                  | 440M/626M [03:17<01:11, 2.58MB/s]....

当下载和加载成功后,会显示:

00:00:00 - ***** Running exp_eval_aeqa *****
00:00:00 - Total number of questions: 41
00:00:00 - number of questions after splitting: 41
00:00:00 - question path: data/aeqa_questions-41.json
00:00:00 - Load YOLO model yolov8x-world.pt successful!
00:00:02 - Load SAM model sam_l.pt successful!
00:00:02 - Loaded ViT-B-32 model config.
00:00:04 - Loading pretrained ViT-B-32 weights (laion2b_s34b_b79k).
00:00:05 - Load CLIP model successful!
00:00:05 - Question 00c2be2a-1377-4fae-a889-30936b7890c3 already processed
00:00:05 - Question 013bb857-f47d-4b50-add4-023cc4ff414c already processed
00:00:05 - 
========
Index: 2 Scene: 00848-ziup5kvtCCR
00:00:05 - semantic_texture_path: data/hm3d_v0.2/val/00848-ziup5kvtCCR/ziup5kvtCCR.semantic.glb or scene_semantic_annotation_path: data/hm3d_v0.2/val/00848-ziup5kvtCCR/ziup5kvtCCR.semantic.txt does not exist
00:00:06 - Loaded 192 classes from scannet 200: data/scannet200_classes.txt!!!
00:00:06 - Load scene 00848-ziup5kvtCCR successfully without semantic texture
00:00:10 - Question id 01fcc568-f51e-4e12-b976-5dc8d554135a initialization successful!
00:00:10 - 
== step: 0
00:00:11 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.12 seconds
00:00:13 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.09 seconds
00:00:15 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.08 seconds
00:00:16 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.05 seconds
00:00:17 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.04 seconds
00:00:18 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.05 seconds
00:00:19 - Done! Execution time of detections_to_obj_pcd_and_bbox function: 0.07 seconds
00:00:20 - Step 0, update snapshots, 25 objects, 6 snapshots
00:00:23 - HTTP Request: POST https://ai.nengyongai.cn/v1/chat/completions "HTTP/1.1 200 OK"
00:00:23 - Prefiltering selected classes: ['sofa chair', 'couch', 'pillow', 'coffee table', 'cabinet']
00:00:23 - Prefiltering snapshot: 6 -> 3
00:00:23 - Input prompt:
00:00:23 - Task: You are an agent in an indoor scene tasked with answering questions by observing the surroundings and exploring the environment. To answer the question, you are required to choose either a Snapshot as the answer or a Frontier to further explore.
Definitions:
Snapshot: A focused observation of several objects. Choosing a Snapshot means that this snapshot image contains enough information for you to answer the question. If you choose a Snapshot, you need to directly give an answer to the question. If you don't have enough information to give an answer, then don't choose a Snapshot.
Frontier: An observation of an unexplored region that could potentially lead to new information for answering the question. Selecting a frontier means that you will further explore that direction. If you choose a Frontier, you need to explain why you would like to choose that direction to explore.
Question: Where is the teddy bear?
Select the Frontier/Snapshot that would help find the answer of the question.
The following is the egocentric view of the agent in forward direction: [iVBORw0KGg...]
The followings are all the snapshots that you can choose (followed with contained object classes)
Please note that the contained classes may not be accurate (wrong classes/missing classes) due to the limitation of the object detection model. So you still need to utilize the images to make decisions.
Snapshot 0 [iVBORw0KGg...]coffee table, couch, pillow
Snapshot 1 [iVBORw0KGg...]coffee table, pillow, sofa chair
Snapshot 2 [iVBORw0KGg...]cabinet, couch
The followings are all the Frontiers that you can explore: 
Frontier 0 [iVBORw0KGg...]
Frontier 1 [iVBORw0KGg...]
Please provide your answer in the following format: 'Snapshot i
[Answer]' or 'Frontier i
[Reason]', where i is the index of the snapshot or frontier you choose. For example, if you choose the first snapshot, you can return 'Snapshot 0
The fruit bowl is on the kitchen counter.'. If you choose the second frontier, you can return 'Frontier 1
I see a door that may lead to the living room.'.
Note that if you choose a snapshot to answer the question, (1) you should give a direct answer that can be understood by others. Don't mention words like 'snapshot', 'on the left of the image', etc; (2) you can also utilize other snapshots, frontiers and egocentric views to gather more information, but you should always choose one most relevant snapshot to answer the question.00:00:32 - HTTP Request: POST https://ai.nengyongai.cn/v1/chat/completions "HTTP/1.1 200 OK"
00:00:32 - Response: [frontier 0]
Reason: [I would like to explore the hallway further as it may lead to other rooms where the teddy bear might be located.]
00:00:32 - Prediction: frontier, 0
00:00:32 - Next choice: Frontier at [79 33]
UserWarning: *c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.
00:00:33 - Current position: [    0.11692    0.021223      6.1057], 1.005
00:00:34 - 
== step: 1

可视化的结果保存在:results/exp_eval_aeqa 中

看一下机器人探索区域可视化:

模型推理示例2

对应的配置文件是:cfg/eval_goatbench.yaml

运行代码,生成 GOAT-Bench 数据集的预测结果:

python run_goatbench_evaluation.py -cf cfg/eval_goatbench.yaml

GOAT-Bench 为每个场景提供了 10 个探索情节,并且由于时间和资源的限制,默认只测试第一情节。 

我们还可以通过设置来指定要评估每个场景的情节 --split

分享完成~

 相关文章推荐:

UniGoal 具身导航 | 通用零样本目标导航 CVPR 2025-CSDN博客

【机器人】复现 UniGoal 具身导航 | 通用零样本目标导航 CVPR 2025-CSDN博客

【机器人】复现 ECoT 具身思维链推理-CSDN博客

【机器人】复现 SG-Nav 具身导航 | 零样本对象导航的 在线3D场景图提示-CSDN博客

【机器人】复现 WMNav 具身导航 | 将VLM集成到世界模型中-CSDN博客

相关文章:

【机器人】复现 3D-Mem 具身探索和推理 | 3D场景记忆 CVPR 2025

3D-Mem 是用于具体探索和推理的3D场景记忆&#xff0c;来自CVPR 2025. 本文分享3D-Mem复现和模型推理的过程&#xff5e; 下面是一个推理和选择识别的结果&#xff1a; 看一下机器人探索的效果&#xff1a; 下面是真实环境下&#xff0c;官方跑的demo&#xff0c;3D-Mem无需训…...

鸿蒙进阶——CMakelist、GN语法简介及三方库通用移植指南

文章大纲 引言一、GN常用的内置变量二、GN常用的内置函数三、CMake 重要语法1、生成动态库2、生成静态库3、生成OBJECT 库4、重要的函数和模块4.1、add_definitions4.2、execute_process4.3、add_dependencies4.4、install4.5、FetchContent 四、GN 重要语法1、编译Target2、预…...

CSS-5.1 Transition 过渡

本系列可作为前端学习系列的笔记&#xff0c;代码的运行环境是在HBuilder中&#xff0c;小编会将代码复制下来&#xff0c;大家复制下来就可以练习了&#xff0c;方便大家学习。 HTML系列文章 已经收录在前端专栏&#xff0c;有需要的宝宝们可以点击前端专栏查看&#xff01; 点…...

TTS:VITS-fast-fine-tuning 快速微调 VITS

1&#xff0c;项目概述 VITS是一种语音合成的方法&#xff0c;是一个完全端到端的TTS 模型&#xff0c;它使用预先训练好的语音编码器将文本转化为语音&#xff0c;并且是直接从文本到语音波形的转换&#xff0c;无需额外的中间步骤或特征提取。 VITS的工作流程为&#xff1a;…...

从虚拟仿真到行业实训再到具身智能--华清远见嵌入式物联网人工智能全链路教学方案

2025年5月23-25日&#xff0c;第63届中国高等教育博览会&#xff08;高博会&#xff09;将在长春中铁东北亚国际博览中心举办。作为国内高等教育领域规模大、影响力广的综合性展会&#xff0c;高博会始终聚焦教育科技前沿&#xff0c;吸引全国高校管理者、一线教师、教育科技企…...

告别手动绘图!2分钟用 AI 生成波士顿矩阵

波士顿矩阵作为经典工具&#xff0c;始终是企业定位产品组合、制定竞争策略的核心方法论。然而&#xff0c;传统手动绘制矩阵的方式&#xff0c;往往面临数据处理繁琐、图表调整耗时、团队协作低效等痛点。 随着AI技术的发展&#xff0c;这一现状正在被彻底改变。boardmix博思白…...

GraphPad Prism工作表的管理

《2025新书现货 GraphPad Prism图表可视化与统计数据分析&#xff08;视频教学版&#xff09;雍杨 康巧昆 清华大学出版社教材书籍 9787302686460 GraphPadPrism图表可视化 无规格》【摘要 书评 试读】- 京东图书 GraphPad Prism统计数据分析_夏天又到了的博客-CSDN博客 工作…...

UE 材质几个输出向量节点

PixelNormalWS...

【modelscope/huggingface 通过colab将huggingface 模型/数据集/空间转移到 modelscope并下载】

1. 准备 注册一个modelscope账号&#xff08;国内的&#xff09;拿到对应的访问令牌SDK/API令牌注册一个google账号&#xff0c; 登录colab 2. 开始干! 打开一个ipynb 安装依赖包 !pip install -qqq modelscope huggingface-hub -U选择安装git lfs !curl -s https://packag…...

告别静态UI!Guineration用AI打造用户专属动态界面

摘 要 作为智能原生操作系统 DingOS 的核心技术之一&#xff0c;Guineration 生成式 UI 体系深刻践行了 DingOS“服务定义软件”的核心理念。DingOS 以“一切皆服务、服务按需而取、按用付费”为设计宗旨&#xff0c;致力于通过智能原生能力与粒子服务架构&#xff0c;实现资源…...

第六届电子通讯与人工智能国际学术会议(ICECAI 2025)

在数字化浪潮中&#xff0c;电子通讯与人工智能的融合正悄然重塑世界的运行逻辑。技术基础的共生关系是这场变革的核心——电子通讯如同“信息高速公路”&#xff0c;通过5G等高速传输技术&#xff0c;将海量数据实时输送至AI系统&#xff0c;使其能够像人类神经系统般快速响应…...

【C/C++】C++并发编程:std::async与std::thread深度对比

文章目录 C并发编程&#xff1a;std::async与std::thread深度对比1 核心设计目的以及区别2 详细对比分析3 代码对比示例4 适用场景建议5 总结 C并发编程&#xff1a;std::async与std::thread深度对比 在 C 中&#xff0c;std::async 和 std::thread 都是用于并发编程的工具&am…...

每日算法刷题Day11 5.20:leetcode不定长滑动窗口求最长/最大6道题,结束不定长滑动窗口求最长/最大,用时1h20min

6. 1695.删除子数组的最大得分(中等) 1695. 删除子数组的最大得分 - 力扣&#xff08;LeetCode&#xff09; 思想 1.给你一个正整数数组 nums &#xff0c;请你从中删除一个含有 若干不同元素 的子数组**。**删除子数组的 得分 就是子数组各元素之 和 。 返回 只删除一个 子…...

STL中的Vector(顺序表)

vector容器的基本用法&#xff1a; template<class T> class vector { T* _a; size_t size; size_t capacity; } 尾插和遍历&#xff1a; vector<int> v; v.push_back(1); v.push_back(2); v.push_back(3);//遍历 for(int i0;i<v.size();i) {cout<<…...

iOS Runtime与RunLoop的对比和使用

Runtime 机制 核心概念 Objective-C 的动态特性&#xff1a;Objective-C 是一门动态语言&#xff0c;很多工作都是在运行时而非编译时决定的消息传递机制&#xff1a;方法调用实际上是发送消息 objc_msgSend(receiver, selector, ...)方法决议机制&#xff1a;动态方法解析、…...

解决vscode在任务栏显示白色图标

长久不用&#xff0c;不知道怎么着就显示成白色图标&#xff0c;虽然不影响使用&#xff0c;但是看起来不爽 问了豆包&#xff0c;给了个解决方法&#xff1a; 1、打开隐藏文件&#xff0c; 由于图标缓存文件是隐藏文件&#xff0c;首先点击资源管理器中的 “查看” 菜单&am…...

架构思维:构建高并发扣减服务_分布式无主架构

文章目录 Pre无主架构的任务简单实现分布式无主架构 设计和实现扣减中的返还什么是扣减的返还返还实现原则原则一&#xff1a;扣减完成才能返还原则二&#xff1a;一次扣减可以多次返还原则三&#xff1a;返还的总数量要小于等于原始扣减的数量原则四&#xff1a;返还要保证幂等…...

Vue 3 官方 Hooks 的用法与实现原理

Vue 3 引入了 Composition API&#xff0c;使得生命周期钩子&#xff08;hooks&#xff09;在函数式风格中更清晰地表达。本篇文章将从官方 hooks 的使用、实现原理以及自定义 hooks 的结构化思路出发&#xff0c;全面理解 Vue 3 的 hooks 系统。 &#x1f4d8; 1. Vue 3 官方生…...

Vue3 打印表格、Element Plus 打印、前端打印、表格导出打印、打印插件封装、JavaScript 打印、打印预览

🚀 Vue3 高级表格打印工具封装(支持预览、分页、样式美化) 现已更新至npm # npm npm install vue-table-print# yarn yarn add vue-table-print# pnpm pnpm add vue-table-printgithunb地址: https://github.com/zhoulongshao/vue-table-print/blob/main/README.MD关键词…...

湖北理元理律师事务所:专业债务优化如何助力负债者重获生活掌控权

在当前经济环境下&#xff0c;个人债务问题日益凸显。湖北理元理律师事务所通过其专业的债务优化服务&#xff0c;为负债群体提供了一条合法合规的解决路径。本文将客观分析专业债务规划的实际价值&#xff0c;不涉及任何营销内容。 一、债务优化的核心价值 科学评估&#xf…...

RAGFlow知识检索原理解析:混合检索架构与工程实践

一、核心架构设计 RAGFlow构建了四阶段处理流水线,其检索系统采用双路召回+重排序的混合架构: S c o r e f i n a l = α ⋅ B M...

5月22总结

P1024 [NOIP 2001 提高组] 一元三次方程求解 题目描述 有形如&#xff1a;$ a x^3 b x^2 c x d 0 $ 这样的一个一元三次方程。给出该方程中各项的系数&#xff08;$ a,b,c,d $ 均为实数&#xff09;&#xff0c;并约定该方程存在三个不同实根&#xff08;根的范围在 $ -1…...

Java设计模式之桥接模式:从入门到精通

1. 桥接模式概述 1.1 定义与核心思想 桥接模式(Bridge Pattern)是一种结构型设计模式,它将抽象部分与实现部分分离,使它们可以独立变化。这种模式通过提供桥梁结构(Bridge)将抽象和实现解耦。 专业定义:桥接模式将抽象部分与它的实现部分分离,使它们都可以独立地变化…...

uni-app学习笔记九-vue3 v-for指令

v-for 指令基于一个数组来渲染一个列表。v-for 指令的值需要使用 item in items 形式的特殊语法&#xff0c;其中 items 是源数据的数组&#xff0c;而 item 是迭代项的别名&#xff1a; <template><view v-for"(item,index) in 10" :key"index"…...

MAC电脑中右键后复制和拷贝的区别

在Mac电脑中&#xff0c;右键菜单中的“复制”和“拷贝”操作在功能上有所不同&#xff1a; 复制 功能&#xff1a;在选定的位置创建一个与原始文件相同的副本。快捷键&#xff1a;CommandD用于在当前位置快速复制文件&#xff0c;CommandC用于将内容复制到剪贴板。效果&…...

Regmap子系统之六轴传感器驱动-编写icm20607.c驱动

&#xff08;一&#xff09;在驱动中要操作很多芯片相关的寄存器&#xff0c;所以需要先新建一个icm20607.h的头文件&#xff0c;用来定义相关寄存器值。 #ifndef ICM20607_H #define ICM20607_H /*************************************************************** 文件名 : i…...

常见高危端口解析:网络安全中的“危险入口”

目录 1. 经典高危端口列表 2. 典型漏洞案例&#xff1a;445端口与永恒之蓝 攻击原理 防御方案 Linux命令 2. 防护策略建议 三、扩展思考&#xff1a;从端口到攻防体系 结语 1. 经典高危端口列表 端口号 协议/服务 风险场景 21 FTP 明文传输凭据、弱密码爆破、匿名…...

华为2025年校招笔试手撕真题教程(二)

一、题目 大湾区某城市地铁线路非常密集&#xff0c;乘客很难一眼看出选择哪条线路乘坐比较合适&#xff0c;为了解决这个问题&#xff0c;地铁公司希望你开发一个程序帮助乘客挑选合适的乘坐线路&#xff0c;使得乘坐时间最短&#xff0c;地铁公司可以提供的数据是各相邻站点…...

征程 6 J6E/M linear 双int16量化支持替代方案

1.背景简介 当发现使用 plugin 精度 debug 工具定位到是某个 linear 敏感时&#xff0c;示例如下&#xff1a; op_name sensitive_type op_type L1 quant_dty…...

深度学习模块缝合拼接方法套路+即插即用模块分享

前言 在深度学习中&#xff0c;模型的设计往往不是从头开始&#xff0c;而是通过组合不同的模块来构建。这种“模块缝合”技术&#xff0c;就像搭积木一样&#xff0c;把不同的功能模块拼在一起&#xff0c;形成一个强大的模型。今天&#xff0c;我们就来聊聊四种常见的模块缝…...