骨架数据预处理方法
一. NTU论文中的预处理方法
We translate them to the body coordinate system with its origin on the “middle of the spine” joint (number 2 in Figure 1), followed by a 3D rotation to fix the X axis parallel to the 3D vector from “right shoulder” to “left shoulder”, and Y axis towards the 3D vector from “spine base” to “spine”. The Z axis is fixed as the new X × Y. In the last step of normalization, we scale all the 3D points based on the distance between “spine base” and “spine” joints. In the cases of having more than one body in the scene, we transform all of them with regard to the main actor’s skeleton.
总结就是,每个视频分别处理:
- 以“middle of the spine”为原点;
- 改变xyz坐标轴;
- 用“spine base” 到 “spine”的距离来normalization。
二. HCN论文中的预处理方法
该方法来自论文2018IJCAI-Co-occurrence Feature Learning from Skeleton Data for Action Recognition and Detection with Hierarchical Aggregation.
该论文用卷积的方法来处理骨架数据,它对骨架的预处理方法,以NTU骨架数据集为例就是,所有视频同时处理:
- 把所有骨架数据变为一个5维数组,每个视频长度为300帧,不够300帧的视频在后面补零;
- 在所有骨架数据中分别找出XYZ的最大最小值,然后用最大最小值归一化。
代码实现链接:https://github.com/huguyuehuhu/HCN-pytorch/blob/master/feeder/feeder.py
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通