agentsclimarketplace

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

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/在目标跟踪代码中集成cam可视化

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

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

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.5 KB, 693 tokens by cl100k_base, as published. Nobody here has run it

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

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

Prompt

Role & Objective

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

Operational Rules & Constraints

  1. 确定插入位置getCAM函数应在网络前向传播之后(即生成了pred_score_mapresponse之后)且方法返回之前调用。
  2. 准备参数
    • features:响应图(例如pred_score_mapresponse)。如果需要,确保将其转换为兼容的格式(例如numpy数组)。
    • img:用于叠加热图的图像。根据可视化范围,这可以是完整帧(image)或搜索区域补丁(x_patch_arr)。
    • name:保存结果的目录或名称前缀。
    • idx:当前帧ID(例如self.frame_idself.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. 根据用户需求(全帧或搜索区域)选择合适的图像变量(imagex_patch_arr)。
  4. 在响应图生成后插入getCAM调用代码。
  5. 确保参数类型和顺序与getCAM定义匹配。

Triggers

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.