Complete Ascend NPU inference candidate for the pinned ProFusion pose-regression
model siyan824/profusion_pr. The final forward runs entirely on a physical
Ascend 910B device (npu:5) with torch_npu; CPU is limited to orchestration,
verified deserialization, and non-model preprocessing. There is no CPU fallback.
PROFusion (ICRA 2026) is a camera-tracking and dense-reconstruction system that combines a learned metric-aware relative camera pose regression network with optimization-based refinement. This delivery adapts the pose-regression module only: given two RGB-D frames it regresses the relative camera pose (rotation + translation) in metric scale.
siyan824/profusion_pr (pinned HF revision 5bd11607231178d5310dd4dfa2c239dfa9cbadfc)PROFusionPoseRegression (native vendored official code revision 24f2d9ce0f48cf35c8b5dbc6203fe927a9499faa, CC BY-NC-SA 4.0)model.safetensors — 2,162,313,472 bytes — SHA256 7038d232e19d3137b96946eebfb98c1d4458bbf58e8f78f89d2ea2adfd0a7b7cmissing=0, unexpected=0)(1, 4, 4) — a homogeneous 4x4 transformation (SO(3) rotation + translation)The complete inference path uses the deterministic, redistributable synthetic RGB-D input described in the test case below; no Unity, Gym, simulation, server, or robot hardware is launched.
Tested on the following hardware/toolchain (Ascend NPU):
| Component | Version |
|---|---|
| NPU | Ascend910B4-1 (physical npu:5, npu-smi 25.5.1) |
| torch | 2.9.0+cpu (container image, CANN-matched, never replaced) |
| torch_npu | 2.9.0 (container image, never replaced) |
| Python | 3.11.14 |
| numpy | 1.26.4 |
| safetensors | 0.8.0 |
| scipy | 1.17.1 |
| tqdm | 4.70.0 |
| huggingface_hub | 1.28.0 |
requirements.txt deliberately lists non-torch dependencies only. The CANN-matched
torch 2.9.0+cpu / torch_npu 2.9.0 pair is provided by the base image and must not be
replaced with ordinary PyPI wheels. Install only the additional dependencies from the
Aliyun mirror:
export PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
export PIP_TRUSTED_HOST=mirrors.aliyun.com
python -m pip install -r requirements.txt/work/pipeline/models/rl26/profusion-pr/model.safetensors
(or pass --model-path), and keep the delivery tree as-is so
pose_regression/ is importable from inference.py.logs/npu_result.json.npu:5:cd profusion-pr-npu
PYTHONDONTWRITEBYTECODE=1 python3 inference.py --device npu:5 --hold-seconds 20The script:
npu:5;npu-smi can correlate the inference PID (see
logs/npu_smi_before.txt → logs/npu_smi_capture.txt),logs/npu_inference.log and logs/npu_result.json.| Argument | Default | Meaning |
|---|---|---|
--device | npu:5 | Target NPU device |
--model-path | /work/pipeline/models/rl26/profusion-pr/model.safetensors | Local checkpoint |
--image-size | 224 | Synthetic RGB-D image size |
--seed | 0 | Deterministic input seed |
--hold-seconds | 8.0 | Post-forward hold for npu-smi correlation |
--skip-sha256 | off | Skip SHA256 verification (not recommended) |
Command (final acceptance run):
cd /work/pipeline/jobs/rl26/profusion-pr/profusion-pr-npu
PYTHONDONTWRITEBYTECODE=1 python3 inference.py --device npu:5 --hold-seconds 20Exit code: 0 (RESULT_OK exit_code=0)
Test input: deterministic, redistributable synthetic two-frame RGB-D
(source: "deterministic synthetic RGB-D (redistributable)", generated in-script, no
external data required). Ground-truth relative pose is embedded in the pointmaps:
rotation about Y by 12°, translation t=(0.05, -0.03, 0.10) m.
Environment (from logs/npu_inference.log):
[env] torch=2.9.0+cpu torch_npu=2.9.0 python=3.11.14
[env] device_count=8
[npu] current_device=5
[npu] device_name=Ascend910B4-1
[artifact] bytes=2162313472 sha256=7038d232e19d3137b96946eebfb98c1d4458bbf58e8f78f89d2ea2adfd0a7b7c
[load] STRICT LOAD OK: loaded 897/897 tensors (missing=0 unexpected=0)
[placement] all 540555020 model parameters on npu:5
[output] pose device=npu:5 shape=(1, 4, 4)Meaningful output (relative camera pose, device npu:5):
R_pred = [[ 0.9869, 0.0076, 0.1612],
[-0.0082, 0.99996, 0.0028],
[-0.1612, -0.0041, 0.9869]]
t_pred = [-0.1147, -0.0204, 0.1429]
det(R_pred) = 1.000000
rotation_error_deg = 2.7667
translation_error_m = 0.1704
relative_pose_meaningful = trueTiming: artifact hash 1.80 s, model build 4.23 s, strict load 5.70 s, forward 12.26 s, total 29.50 s.
PID correlation (live npu-smi during the post-forward hold):
[npu-smi] PRE-RUN device=5 idle (no process rows)
[npu-smi] correlated: python_pid=63537 npu_smi_pid=1417520 row={'pid': 1417520, 'name': '', 'mem_mb': 2564}logs/npu_smi_before.txt — captured before any NPU init: NPU 5 idle.logs/npu_smi_capture.txt — captured during the hold: exactly one process row on
NPU 5 (host-side PID 1417520, 2564 MB), matching the loaded model footprint.npu-smi reports no running processes on NPU 5.Note: inside this PID namespace the Python
os.getpid()(63537) differs from the host-side PID reported bynpu-smi(1417520). Correlation is established by device exclusivity and the memory footprint, as documented inlogs/npu_result.json(npu_process_evidence).
npu-smi, versions, devices).profusion-pr-npu/
├── inference.py # NPU inference (fail-closed on NPU)
├── README.md # this file
├── readme.md # byte-identical copy
├── requirements.txt # non-torch deps (Aliyun mirror only)
├── LICENSE # CC BY-NC-SA 4.0
├── CODE_REVISION.txt # official PROFusion code revision
├── SHA256SUMS # SHA256 of every deliverable
├── pose_regression/ # native vendored official pose-regression source
├── assets/
│ ├── agent_workflow.png
│ ├── modelagent_live_session.png
│ ├── npu_device_call.png
│ └── model_result.png
└── logs/
├── npu_inference.log
├── npu_result.json
├── npu_smi_before.txt
├── npu_smi_capture.txt
├── npu_stdout_capture.txt # raw sanitized runner stdout from the real run
└── fusion_result.json # CANN graph-fusion statistics from the real run5bd11607231178d5310dd4dfa2c239dfa9cbadfc24f2d9ce0f48cf35c8b5dbc6203fe927a9499faaLICENSE)