facebook/convnext-xlarge-224-22k-1k 是 Meta 提出的 ConvNeXt-XLarge 图像分类模型,在 ImageNet-22K 上预训练后微调到 ImageNet-1K,输入分辨率 224x224,包含 1000 个类别。本项目将其适配到华为昇腾 NPU (Ascend910) 上运行。
pip install -r requirements.txt
python inference.py推理结果 (NPU Top-5):
日志保存在 logs/inference.log。
对单张测试图片进行 CPU 与 NPU 一致性验证:
| 指标 | 数值 |
|---|---|
| relative_error | 0.6983% |
| cosine_similarity | 0.999987 |
| threshold | 1.0% |
| 结果 | PASS |
| 指标 | 数值 |
|---|---|
| avg_latency | 24.95 ms |
| min_latency | 24.87 ms |
| max_latency | 25.08 ms |
| p50_latency | 24.93 ms |
| p90_latency | 25.02 ms |
| p95_latency | 25.05 ms |
| images_per_sec | 40.08 |
本项目包含单图 smoke consistency 验证,非官方 ImageNet 完整验证集评测。
见 screenshots/self_verification.png。
logs/inference.log — 推理输出日志logs/accuracy.log — 精度验证日志logs/benchmark.log — 性能基准日志