Skip to content

[Refactor] RefineNet: SEBlock, Residual Connection & Import Cleanup#134

Open
agentksimha wants to merge 28 commits intohumanai-foundation:mainfrom
agentksimha:refine-refinenet-seblock-residual
Open

[Refactor] RefineNet: SEBlock, Residual Connection & Import Cleanup#134
agentksimha wants to merge 28 commits intohumanai-foundation:mainfrom
agentksimha:refine-refinenet-seblock-residual

Conversation

@agentksimha
Copy link
Copy Markdown

What changed in code/CRAFT/refinenet.py:

SEBlock — Added channel-wise recalibration (AdaptiveAvgPool2d → Linear → ReLU → Linear → Sigmoid) applied after last_conv, before ASPP branches. Helps the network weight which feature channels matter most.
Residual connection — Added skip_proj = Conv2d(34→64, kernel_size=1) with refine = last_conv(x) + skip_proj(x). Improves gradient flow through the refinement block.
Removed Variable import — Was unused and deprecated since PyTorch 0.4.

No breaking changes. ASPP branches, output interface, and init_weights calls are untouched. Drop-in replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants