惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
C
Cybersecurity and Infrastructure Security Agency CISA
G
Google Developers Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
TaoSecurity Blog
TaoSecurity Blog
V
Visual Studio Blog
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
博客园 - Franky
S
Security @ Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
T
Troy Hunt's Blog
B
Blog RSS Feed
A
About on SuperTechFans
IT之家
IT之家
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
J
Java Code Geeks
S
Securelist
T
Threatpost
SecWiki News
SecWiki News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Forbes - Security
Forbes - Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
Docker
N
News and Events Feed by Topic
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
月光博客
月光博客
C
CXSECURITY Database RSS Feed - CXSecurity.com
罗磊的独立博客
H
Hacker News: Front Page
N
News and Events Feed by Topic
N
Netflix TechBlog - Medium
AWS News Blog
AWS News Blog
P
Privacy International News Feed
Scott Helme
Scott Helme
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Vulnerabilities – Threatpost
The Register - Security
The Register - Security

博客园 - 无左无右

mmdetection3d-1.0.0rc0 安裝 左乘和右乘,行向量和列向量 grep -rl "math\.tan" /media/data_1/everyday/2025_down --include="*.py" - 无左无右 已知相机到车的rt 4x4矩阵,求pitch和yaw角度 torch.where(condition, x, y) 是一个三元运算符:如果条件为真,取 x 的值;如果条件为假,保持 y(即原本的 weights)不变。 for decoder_idx, (cls, reg) in enumerate(zip(cls_scores, reg_preds)): log_str += ', '.join(log_items) 左乘与右乘 GridMask--随机用“网格状”的遮挡去盖住图片的一部分,迫使模型学习更鲁棒的特征。 obtain_sensor2top函数, sensor → ego_s → global → ego_lidar → lidar assert osp.exists(self.table_root), 'Database version not found: {}'.format(self.table_root) Deformable-DETR 网页绘图,无需注册 value = value.masked_fill(input_padding_mask[..., None], float(0)) DETR 点云绕不同的轴旋转可视化,roll,pitch,yaw 相机坐标系转车辆坐标系以及相反, RT矩阵,旋转变换P_cam = rot_car2cam * P_car + trans_car2cam; P_cam = rot * (P_car - trans) vscode launch.json debug 带caffe库的工程代码 标注工具--抹除目标 ubuntu1804安装 mmdet3d 0.17.1 报错与解决 np.stack(a,axis=x), x=0,1,2 外参扰动 car_noise2cam = car2cam @ car_noise2car BEVDet-net部分 TP, FP, precision, recall bevdepth- 数据处理部分 ubuntu 硬盘挂载,重启后硬盘掉了 create_frustum 分析 (frustum = torch.stack((x_coords, y_coords, d_coords, paddings), -1)) sweep_lidar_depth = sweep_lidar_depth.reshape(batch_size * num_cams, *sweep_lidar_depth.shape[2:]) torch.where(condition, x, y) 自动驾驶,单目3D中的alpha角度
连续200帧的ego的RT矩阵R_prevel2wld,shape是[200,4,4],目标的rt矩阵的R_curpt2curvels的shape是[87, 200, 4, 4], 87是目标数量, 把t11时刻的目标对齐到t0, numpy实现
无左无右 · 2025-12-02 · via 博客园 - 无左无右

下面给你最小、正确且高效的 numpy 实现,把t11 时刻的 87 个目标齐次矩阵对齐到 t0 坐标系
重点:齐次矩阵变换的顺序


🧠 已知

  • ego 坐标 → world 坐标
    R_prevel2wld[t]
    shape: [200, 4, 4]

  • object local → ego 坐标
    R_curpt2curvels[obj, t]
    shape: [87, 200, 4, 4]

你要把 t=11 的所有目标坐标 变换到 t=0 的坐标系


🚗🚗🚗 座标变换链路

对象坐标 → world → 另一 ego → 另一对象坐标

具体:

目标 @ t11 → ego11 → world → ego0 → 目标在 t0 坐标


公式(关键)

设:

  • T_pt2ego[t] = R_curpt2curvels[:,t]
  • T_ego2world[t] = R_prevel2wld[t]

则:

T_object_11_in_ego0 =
    inv(T_ego2world[0])        @
    T_ego2world[11]           @
    T_pt2ego[11]

🧮 numpy实现(无循环、只对 t=11)

import numpy as np

t = 11
obj_num = R_curpt2curvels.shape[0]

T_e0_w = R_prevel2wld[0]      # (4,4)
T_e11_w = R_prevel2wld[t]     # (4,4)
T_obj11_e11 = R_curpt2curvels[:, t]  # (87,4,4)

# world->ego0
T_w_e0 = np.linalg.inv(T_e0_w)

# 87 × 4 × 4
T_obj11_e0 = T_w_e0 @ T_e11_w @ T_obj11_e11

输出 shape = (87,4,4)


👍这样就对齐到了 t0 ego 坐标

以后继续对齐到 t0,只需把 t 换掉:

t = k
T_obj_k_e0 = inv(T_e0_w) @ T_e_k_w @ T_objk_ek

🚫错误写法(常犯)

不要这样:

  • inv(inv(A)@B)
  • inv(A@B)@C
  • 使用两个连续的 @inv() 这种高成本操作

会造成数值不稳定,而且会慢。


⭐完全向量化(对全部 200 帧)

如果你希望一次性把所有 t 下的目标对齐到 t0

T_w_e0 = np.linalg.inv(R_prevel2wld[0])   # (4,4)

# (200,4,4)
T_e_t = R_prevel2wld

# (87,200,4,4)
T_obj = R_curpt2curvels

# broadcast → (87,200,4,4)
T_all = T_w_e0 @ T_e_t @ T_obj

🧨数值与性能注意

  • 不要频繁 np.linalg.inv → 用 solve 更稳定
  • T_w_e0 @ T_e_t @ T_obj 是 batched broadcast → 不需要循环
  • 如果需要 GPU → 推荐 torch.linalg.solve

如你需要 torch 向量化版本或把旋转从 4×4 降为 SE2(3×3),我可以直接给成完整函数 👍