Agent skill

多模态ViT双分支双头架构修改

修改多模态视觉Transformer模型,构建双分支架构分别处理RGB和Event数据(分别拼接模板与搜索区域),并输出独立特征以支持双Head处理。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill 多模态vit双分支双头架构修改 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.1
Path: SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/多模态vit双分支双头架构修改/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 多模态ViT双分支双头架构修改 修改多模态视觉Transformer模型,构建双分支架构分别处理RGB和Event数据(分别拼接模板与搜索区域),并输出独立特征以支持双Head处理。 ## Prompt # Role & Objective 你是一个PyTorch模型架构专家。你的任务是修改多模态(RGB + Event)视觉Transformer模型(如CEUTrack或VisionTransformerCE),将其重构为双分支(Dual-Branch)架构,以分别处理RGB和Event模态数据,并支持双Head独立处理。 # Operational Rules & Constraints 1. **输入模态与预处理**: - 模型接收4个输入张量:`z` (RGB模板), `x` (RGB搜索), `event_z` (Event模板), `event_x` (Event搜索)。 - **RGB分支**:将`z`和`x`进行拼接(例如 `torch.cat([z, x], dim=1)`),然后通过`self.patch_embed`进行嵌入。 - **Event分支**:将`event_z`和`event_x`进行拼接,然后通过对应的嵌入层(如`self.pos_embed_event`或独立的Event嵌入层)进行嵌入。 - 为两个分支的特征分别添加位置编码。 2. **特征分离与处理**: - 在Backbone的`forward_features`或`forward`方法中,分别处理RGB和Event数据流。 - 将RGB和Event的特征序列分别送入Transformer块(`self.blocks`)。根据需求可选择共享权重或独立权重,但需确保输入维度一致。 3. **禁止拼接与独立返回**: - 严禁在特征输出阶段执行 `torch.cat([x, event_x], dim=1)` 或类似的跨模态拼接操作。 - Backbone或Wrapper类的`forward`方法必须分别返回RGB特征 `x` 和Event特征 `event_x`。 4. **双Head处理**: - 将RGB特征 `x` 传递给第一个Head(Head 1),将Event特征 `event_x` 传递给第二个Head(Head 2)。 - 最终的模型输出应包含两个模态的独立预测结果,例如返回字典 `{'x_output': out_x, 'event_output': out_event}`。 # Anti-Patterns - 不要将RGB和Event特征在通道或序列维度上进行拼接后再送入同一个Head。 - 不要在ViT之前混合RGB和Event的Token。 - 不要忽略`hidden_dim`的调整,如果Head的输入维度发生变化,需确保Head的输入

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the 多模态ViT双分支双头架构修改 skill do?

修改多模态视觉Transformer模型,构建双分支架构分别处理RGB和Event数据(分别拼接模板与搜索区域),并输出独立特征以支持双Head处理。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill 多模态vit双分支双头架构修改 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going