Installs detectron2 from source in an Ascend NPU container for instance segmentation and object detection development. Verifies no CUDA version is present.
Ships in external-gitcode-ascend-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
在昇腾NPU容器中从源码安装 detectron2(NPU兼容版本)
确保 mmcv 已安装:
python -c "import mmcv; print(mmcv.__version__)"
关键:在NPU环境下必须从源码安装,不能使用预编译的CUDA版本!
source /opt/conda/bin/activate <conda-env-name>
pip install git+https://github.com/facebookresearch/detectron2.git
python -c "import detectron2; print('detectron2 installed')"
NPU验证(关键步骤):
python -c "import site; print([p for p in site.getsitepackages() if 'cuda' in p.lower()])"
# 应输出空列表,确保没有安装CUDA版本
如果输出包含 cuda 相关路径,说明安装的是 CUDA 版本,需要卸载并重新从源码安装:
pip uninstall detectron2 -y
pip install git+https://github.com/facebookresearch/detectron2.git
向用户提问:
安装后必须验证:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/external-gitcode-ascend-skills:external-gitcode-ascend-detectron2from external-gitcode-ascend-skills
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin external-gitcode-ascend-skills91 skills in this plugin
/external-gitcode-ascend-analyse-coverage分析测试覆盖率盲区,生成覆盖率分析报告/external-gitcode-ascend-arxiv-recommendation-npu自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。/external-gitcode-ascend-ascendc-operator-code-gen根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。Other plugins' skills for the same job