atlasleong/profusion-pr-npu
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

PROFusion Pose-Regression NPU Inference (siyan824/profusion_pr)

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.

Model introduction

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.

  • Model: siyan824/profusion_pr (pinned HF revision 5bd11607231178d5310dd4dfa2c239dfa9cbadfc)
  • Architecture: PROFusionPoseRegression (native vendored official code revision 24f2d9ce0f48cf35c8b5dbc6203fe927a9499faa, CC BY-NC-SA 4.0)
  • Weights: model.safetensors — 2,162,313,472 bytes — SHA256 7038d232e19d3137b96946eebfb98c1d4458bbf58e8f78f89d2ea2adfd0a7b7c
  • Parameters: 540,555,020 (all 897 checkpoint tensors strictly loaded, missing=0, unexpected=0)
  • Output: relative pose (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.

Environment dependencies

Tested on the following hardware/toolchain (Ascend NPU):

ComponentVersion
NPUAscend910B4-1 (physical npu:5, npu-smi 25.5.1)
torch2.9.0+cpu (container image, CANN-matched, never replaced)
torch_npu2.9.0 (container image, never replaced)
Python3.11.14
numpy1.26.4
safetensors0.8.0
scipy1.17.1
tqdm4.70.0
huggingface_hub1.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

Inference steps

  1. Place the pinned checkpoint at /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.
  2. Verify the expected revision/bytes/SHA256 are recorded in the script header and in logs/npu_result.json.
  3. Run one end-to-end inference on npu:5:
cd profusion-pr-npu
PYTHONDONTWRITEBYTECODE=1 python3 inference.py --device npu:5 --hold-seconds 20

The script:

  • fails nonzero if NPU initialization, placement, or execution fails (no CPU fallback);
  • hashes and byte-verifies the checkpoint, builds the exact official architecture, and strictly loads all 897 tensors;
  • moves every model parameter, every numeric input, and every tensor output to npu:5;
  • runs the real pose-regression forward, synchronizes NPU timing, and records the meaningful relative pose plus statistics;
  • holds after the forward so npu-smi can correlate the inference PID (see logs/npu_smi_before.txt → logs/npu_smi_capture.txt),
  • writes logs/npu_inference.log and logs/npu_result.json.

Arguments

ArgumentDefaultMeaning
--devicenpu:5Target NPU device
--model-path/work/pipeline/models/rl26/profusion-pr/model.safetensorsLocal checkpoint
--image-size224Synthetic RGB-D image size
--seed0Deterministic input seed
--hold-seconds8.0Post-forward hold for npu-smi correlation
--skip-sha256offSkip SHA256 verification (not recommended)

Complete test case and output

Command (final acceptance run):

cd /work/pipeline/jobs/rl26/profusion-pr/profusion-pr-npu
PYTHONDONTWRITEBYTECODE=1 python3 inference.py --device npu:5 --hold-seconds 20

Exit 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 = true

Timing: 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.
  • After the run, 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 by npu-smi (1417520). Correlation is established by device exclusivity and the memory footprint, as documented in logs/npu_result.json (npu_process_evidence).

Evidence and screenshots

  • assets/agent_workflow.png — sanitized ModelAgent workflow (inspection → implementation → test → independent acceptance).
  • assets/modelagent_live_session.png — detailed sanitized ModelAgent interaction plus final independent acceptance.
  • assets/npu_device_call.png — real hardware/toolchain and NPU placement/process evidence (npu-smi, versions, devices).
  • assets/model_result.png — actual final model output, timing, PID, and success status.

Files in this delivery

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 run

Source, revision, and license

  • Model source: https://huggingface.co/siyan824/profusion_pr
  • Pinned model revision: 5bd11607231178d5310dd4dfa2c239dfa9cbadfc
  • Official code: https://github.com/siyandong/PROFusion at 24f2d9ce0f48cf35c8b5dbc6203fe927a9499faa
  • Test input: deterministic synthetic RGB-D (redistributable, generated in-script)
  • License: CC BY-NC-SA 4.0 (see LICENSE)