m
mengsihan/wifi-densepose-pretrained
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

ruvnet/wifi-densepose-pretrained on Ascend NPU

模型与任务

  • 模型:ruvnet/wifi-densepose-pretrained
  • Revision:a8a71fe866a13eb2743184ed51d09ea878f93afc
  • 适配路线:csi-encoding
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "python": "3.11.14",
  "platform": "Linux-5.10.0-182.0.0.95.r2220_156.hce2.aarch64-aarch64-with-glibc2.35"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "signal_type": "CSI feature vector",
  "shape": [
    32,
    8
  ],
  "dtype": "float32",
  "sampling_rate": "1Hz",
  "window_length": 1,
  "channels": 8,
  "feature_names": [
    "presence",
    "motion",
    "breathing",
    "heart_rate",
    "phase_var",
    "person_count",
    "fall",
    "rssi"
  ],
  "batch": 32,
  "sha256_first_window": "b6005cebfa4e96ba",
  "source": "synthetic standardized fixture seeded 42 with presence/motion/empty prototypes",
  "normalization": "standardized per-feature (mean 0, std 1 as emitted by RuView sensing-server type:feature)"
}

真实推理结果

{
  "task": "csi-encoding -> 128-dim L2-normalized embedding",
  "output_shape": [
    32,
    128
  ],
  "dtype": "float32",
  "device": "npu:0",
  "sample_embedding_first5": [
    0.15568511188030243,
    -0.02914920262992382,
    -0.0893702581524849,
    -0.11796224117279053,
    -0.06608064472675323
  ],
  "l2norm": 1.0,
  "presence_logit_sample": 7.8175811767578125
}

CPU-NPU 一致性

{
  "cpu_vs_npu": {
    "max_abs_diff": 0.0007328391075134277,
    "mean_abs_diff": 1.21520179163781e-05,
    "cosine_min": 1.0,
    "cosine_mean": 1.0,
    "atol": 0.001,
    "rtol": 0.001,
    "passed": true
  },
  "presence_logit_max_diff": 0.000553,
  "threshold": "cosine >=0.999 and max_diff <0.01"
}

性能

{
  "device": "npu:0",
  "dtype": "float32",
  "batch": 32,
  "single_window_ms": 0.225,
  "avg_ms_per_batch": 0.244,
  "windows_per_sec": 131277.1,
  "embeddings_per_sec": 131277.1,
  "measurement": "torch.npu.synchronize() before/after, warmup 3, stable 10 runs, excludes CPU preprocessing",
  "peak_memory_hbm_mb": 3109
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 量化 int4 变体 (4.56KB) 未在 NPU 实测,fp32 为验证载体。
  • 单记录合成 fixture,时间 disjoint 完整评测需多房间多节点数据。

标签

#NPU #Ascend #Ascend910