UFM-Base-Confidence 是 UniFlowMatch(UFM)基础置信度模型(transformers transformer,回归像素位移,用于光流与宽基线匹配)。本仓完成其在昇腾 Ascend910 NPU 上的真实推理适配与 CPU/NPU 精度对拍。
uniflowmatch.models.ufm,GitHub: UniFlowMatch/UFM + castacks/UniCeption)model.safetensors(1.8 GB,SHA-256 见 validation/weight.sha256)cls_default_noretrieval.json 配置(noretrieval 模式,避免 CUDA-only retrieval 依赖)| 指标 | CPU | NPU (Ascend910 npu:0) |
|---|---|---|
| 平均延迟 | 845.92 ms | 263.40 ms |
| 输出 shape | [1,2,56,56] | [1,2,56,56] |
精度对拍(CPU vs NPU,fp32):
| 指标 | 值 |
|---|---|
| cosine similarity | 0.99563123 |
| max_abs_error | 5.033e-01 |
| mean_abs_error | 8.652e-02 |
| precision_pass | true |



python3 inference.py --device cpu # CPU 推理
python3 inference.py --device npu # NPU 推理(需 Ascend910 + torch_npu)依赖:torch、transformers、numpy、huggingface_hub、kditransform(LimiX 推理所需)。