wenmin-wu/ds-skills/bev-conv1-channel-expansion
Claude Code and agent skill by wenmin-wu/ds-skills
- community
Checking that the SKILL.md file is still in the repository.
Replace a pretrained ResNet's conv1 with a wider input conv to accept stacked BEV raster channels (semantic map + agent history) while keeping downstream weights
Install
npx vskill@latest install wenmin-wu/ds-skills/bev-conv1-channel-expansionSKILL.md
Overview
Pretrained ImageNet backbones expect 3 RGB channels. Bird's-eye-view motion prediction rasters need many more: 3 for the semantic map plus (history_frames + 1) * 2 channels for stacked ego + agent masks at past timesteps — typically 10-30 channels. Instead of retraining from scratch, swap only the first conv to the new input width. Downstream layers (conv2, blocks, etc.) retain ImageNet pretraining and still converge fast. The new conv1 is randomly initialized, so give it a slightly higher learning rate during warmup.
Quick Start
Workflow
- Compute
num_in_channels = map_channels + (history_frames + 1) * 2 - Instantiate the pretrained backbone, then replace only
conv1with a newConv2dmatching the old kernel size/stride/padding but the newin_channels - (Optional) Copy the old 3-channel conv weights onto the first 3 input planes to preserve RGB pretraining
- Fine-tune normally — the new conv1 learns in the first few thousand steps
- Keep the rest of the backbone unchanged; its weights stay useful because they see the same feature maps downstream
Key Decisions
- Replace conv1 only: replacing more layers throws away pretraining. One conv swap is enough.
- Copy or random init: copying the 3 RGB planes helps if the semantic map is rendered as RGB. Random init works fine if it's not.
- No bias: match the original ResNet which uses
bias=False(BN follows). - vs. 1x1 adapter: a 1x1 channel-reducer before conv1 preserves pretrained weights fully but adds a layer and is slower in practice.
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cv/bev-conv1-channel-expansion/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wenmin-wu/ds-skills/bev-conv1-channel-expansion)