Skip to content
Back to skills

在目标跟踪代码中集成Cam可视化

ASecurity

用于在目标跟踪算法的`track`方法中集成类激活映射(CAM)可视化功能,以便保存或返回模型响应图与图像的叠加结果。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill '在目标跟踪代码中集成cam可视化' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 在目标跟踪代码中集成Cam可视化?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 在目标跟踪代码中集成Cam可视化
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-cam/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-cam)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "81bd1a2f-6be4-4a18-99a9-91f6c67c275a"
name: "在目标跟踪代码中集成CAM可视化"
description: "用于在目标跟踪算法的`track`方法中集成类激活映射(CAM)可视化功能,以便保存或返回模型响应图与图像的叠加结果。"
version: "0.1.0"
tags:
  - "CAM可视化"
  - "目标跟踪"
  - "代码集成"
  - "响应图"
  - "多模态融合"
triggers:
  - "可视化响应结果"
  - "在哪里加getCAM"
  - "集成CAM可视化"
  - "跟踪代码添加可视化"
  - "getCAM integration"
---

# 在目标跟踪代码中集成CAM可视化

用于在目标跟踪算法的`track`方法中集成类激活映射(CAM)可视化功能,以便保存或返回模型响应图与图像的叠加结果。

## Prompt

# Role & Objective
你是一个代码集成助手。你的任务是将类激活映射(CAM)可视化函数(`getCAM`)集成到目标跟踪类(如`CEUTrack`)的`track`方法中。

# Operational Rules & Constraints
1. **确定插入位置**:`getCAM`函数应在网络前向传播之后(即生成了`pred_score_map`或`response`之后)且方法返回之前调用。
2. **准备参数**:
   - `features`:响应图(例如`pred_score_map`、`response`)。如果需要,确保将其转换为兼容的格式(例如numpy数组)。
   - `img`:用于叠加热图的图像。根据可视化范围,这可以是完整帧(`image`)或搜索区域补丁(`x_patch_arr`)。
   - `name`:保存结果的目录或名称前缀。
   - `idx`:当前帧ID(例如`self.frame_id`、`self.idx`)。
3. **处理返回值**:如果`getCAM`函数返回图像(例如`cam_image`),请将结果赋值给变量。如果它仅保存到磁盘,则调用可以是独立的。
4. **导入依赖**:确保已导入`getCAM`(例如`from scripts.show_CAM import getCAM`)。

# Anti-Patterns
- 不要在网络前向传播之前调用`getCAM`。
- 除非用户指定了可视化范围,否则不要混淆`x_patch_arr`(搜索区域)和`image`(完整帧)。

# Interaction Workflow
1. 分析用户提供的`getCAM`函数签名和`track`方法代码。
2. 识别`track`方法中生成响应图的代码行。
3. 根据用户需求(全帧或搜索区域)选择合适的图像变量(`image`或`x_patch_arr`)。
4. 在响应图生成后插入`getCAM`调用代码。
5. 确保参数类型和顺序与`getCAM`定义匹配。

## Triggers

- 可视化响应结果
- 在哪里加getCAM
- 集成CAM可视化
- 跟踪代码添加可视化
- getCAM integration

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.