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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
博客园 - 叶小钗
AI
AI
T
Tor Project blog
Forbes - Security
Forbes - Security
W
WeLiveSecurity
博客园_首页
爱范儿
爱范儿
J
Java Code Geeks
B
Blog
G
GRAHAM CLULEY
aimingoo的专栏
aimingoo的专栏
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
H
Help Net Security
博客园 - 三生石上(FineUI控件)
C
Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
Spread Privacy
Spread Privacy
F
Fortinet All Blogs
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Security Latest
Security Latest
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog

博客园 - 无左无右

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 相机坐标系转车辆坐标系以及相反, RT矩阵,旋转变换P_cam = rot_car2cam * P_car + trans_car2cam; P_cam = rot * (P_car - trans) 连续200帧的ego的RT矩阵R_prevel2wld,shape是[200,4,4],目标的rt矩阵的R_curpt2curvels的shape是[87, 200, 4, 4], 87是目标数量, 把t11时刻的目标对齐到t0, numpy实现 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角度
点云绕不同的轴旋转可视化,roll,pitch,yaw
无左无右 · 2026-01-29 · via 博客园 - 无左无右

image

import numpy as np
import cv2

==================== load ====================

def load_bin(bin_file):
points = np.fromfile(bin_file, dtype=np.float32)[1:].reshape(-1, 4)
mask = np.all(~np.isnan(points), axis=1)
points = points[mask]
points = points[1 : ((len(points) - 1) // 4) * 4 + 1].reshape(-1, 4)
points = points[~np.isnan(points[:, 0]), :]
return points

==================== single-axis ====================

def apply_yaw_perturb(pts, delta_yaw_rad):
c, s = np.cos(delta_yaw_rad), np.sin(delta_yaw_rad)
R = np.array([[ c, -s, 0],
[ s, c, 0],
[ 0, 0, 1]])
pts_new = pts.copy()
pts_new[:, :3] = pts[:, :3] @ R.T
return pts_new

def apply_roll_perturb(pts, delta_roll_rad):
c, s = np.cos(delta_roll_rad), np.sin(delta_roll_rad)
R = np.array([[1, 0, 0],
[0, c, -s],
[0, s, c]])
pts_new = pts.copy()
pts_new[:, :3] = pts[:, :3] @ R.T
return pts_new

def apply_pitch_perturb(pts, delta_pitch_rad):
c, s = np.cos(delta_pitch_rad), np.sin(delta_pitch_rad)
R = np.array([[ c, 0, s],
[ 0, 1, 0],
[-s, 0, c]])
pts_new = pts.copy()
pts_new[:, :3] = pts[:, :3] @ R.T
return pts_new

==================== NEW: rpy together ====================

def apply_rpy_perturb(pts, delta_roll, delta_pitch, delta_yaw):
"""
同时绕 X(roll) / Y(pitch) / Z(yaw) 旋转
顺序: roll -> pitch -> yaw
"""
cr, sr = np.cos(delta_roll), np.sin(delta_roll)
cp, sp = np.cos(delta_pitch), np.sin(delta_pitch)
cy, sy = np.cos(delta_yaw), np.sin(delta_yaw)

Rx = np.array([[1, 0, 0],
[0, cr, -sr],
[0, sr, cr]])

Ry = np.array([[ cp, 0, sp],
[ 0, 1, 0],
[-sp, 0, cp]])

Rz = np.array([[cy, -sy, 0],
[sy, cy, 0],
[ 0, 0, 1]])

R = Rz @ Ry @ Rx # yaw ∘ pitch ∘ roll

pts_new = pts.copy()
pts_new[:, :3] = pts[:, :3] @ R.T
return pts_new

==================== filter ====================

grid_conf = {
'xbound': [-80.0, 120.0, 1],
'ybound': [-40.0, 40.0, 1],
'zbound': [-2.0, 4.0, 1.0]
}

def filter_pts(pts, tdt_flag=True):
mask = (
(pts[:, 0] > grid_conf['xbound'][0]) &
(pts[:, 1] > grid_conf['ybound'][0]) &
(pts[:, 2] > grid_conf['zbound'][0]) &
(pts[:, 0] < grid_conf['xbound'][1]) &
(pts[:, 1] < grid_conf['ybound'][1]) &
(pts[:, 2] < grid_conf['zbound'][1])
)
return pts[mask]

==================== visualize ====================

def show_bin(pts, save_path="./0.jpg", scale=3.0):
x_range = [0, 120]
y_range = [-40, 40]
h = int((x_range[1] - x_range[0]) * scale)
w = int((y_range[1] - y_range[0]) * scale)
img = np.zeros((h, w), dtype=np.uint8)

for x, y, _, _ in pts:
px = (y_range[1] - y) * scale
py = (x_range[1] - x) * scale
cv2.circle(img, (int(px), int(py)), 1, 255, -1)

cv2.imwrite(save_path, img)

==================== main ====================

path_bin = "./2857062165.500.bin"

pts = load_bin(path_bin)
pts = filter_pts(pts)
pts_xyz1 = np.hstack([pts[:, :3], np.ones((pts.shape[0], 1))])

原始

show_bin(pts_xyz1, "/logs/20260127_tmp/origin.jpg")

单轴

show_bin(apply_yaw_perturb(pts_xyz1, np.deg2rad(15)),
"/logs/20260127_tmp/yaw.jpg")

三轴同时

pts_rpy = apply_rpy_perturb(
pts_xyz1,
delta_roll=np.deg2rad(5),
delta_pitch=np.deg2rad(3),
delta_yaw=np.deg2rad(15)
)
show_bin(pts_rpy, "/logs/20260127_tmp/rpy.jpg")

print("====>> success!")

pitch向下为正,向上为负
yaw向左为正,向右为负
roll向左为正,向右为负