| 项目 | 内容 |
|---|---|
| 模型 ID | damo/cv_resnet50_fast-instance-segmentation_coco |
| 框架 | PyTorch |
| 任务 | 实例分割 (Instance Segmentation) |
| 骨干网络 | ResNet-50 |
| 解码器 | FastInst Decoder (3 layers, 100 queries) |
| 输入分辨率 | 800x800 |
| 类别数 | 80 (COCO) |
| 指标 | 值 |
|---|---|
| Cosine Similarity (pred_logits) | 0.999375 |
| Cosine Similarity (pred_masks) | 0.988843 |
| Max Abs Error | 8.5024 |
| 平均延迟 | 15.11 ms |
| 峰值显存 | 0.44 GB |
| 设备 | Ascend 910B4 |
| 精度 | FP32 |
pip install -r requirements.txtpython -c "from modelscope import snapshot_download; snapshot_download('damo/cv_resnet50_fast-instance-segmentation_coco', cache_dir='./models')"python inference.py --model-dir ./models/damo/cv_resnet50_fast-instance-segmentation_coco --device npu:0python evaluate.py --model-dir ./models/damo/cv_resnet50_fast-instance-segmentation_coco --device npu:0 --output report.json以下为 NPU 推理实际输出(inference.py --device npu:0):
模型目录: models/damo/cv_resnet50_fast-instance-segmentation_coco
设备: npu:0
精度: float16
检测到 1 张图片的结果
检测到 100 个实例
Top-5 分数: [0. 0. 0. 0. 0.]
Top-5 类别: [ 0 0 33 31 33]
✓ 推理完成使用相同随机输入(torch.manual_seed(42)),CPU (FP32) 输出作为基准,NPU (FP32) 输出与之对比:
| 输出层 | Cosine Similarity | Max Abs Error | 形状 |
|---|---|---|---|
| proposal_cls_logits | 1.000000 | 0.0131 | [1, 81, 50, 50] |
| pred_logits (分类) | 0.999375 | 8.5024 | [1, 100, 81] |
| pred_masks (掩码) | 0.988843 | 35.3433 | [1, 100, 100, 100] |
FastInst 是一种高效的实例分割模型,使用 ResNet-50 作为骨干网络,配合 Pyramid Pooling Module FPN 编码器和 FastInst 解码器。解码器使用 100 个查询来检测图像中的实例,每个查询预测类别分数和分割掩码。
本适配由 vision-encoder-npu-adapt Agent Skill 自动完成,包含:
@article{fastinst2023,
title={FastInst: A Simple and Efficient Baseline for Instance Segmentation},
author={Various},
year={2023}
}