Files

89 lines
5.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg width="700" height="320" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="unet-arrow" markerWidth="7" markerHeight="5" refX="7" refY="2.5" orient="auto">
<polygon points="0 0, 7 2.5, 0 5" fill="#555"/>
</marker>
<marker id="unet-skip" markerWidth="7" markerHeight="5" refX="7" refY="2.5" orient="auto">
<polygon points="0 0, 7 2.5, 0 5" fill="#9b59b6"/>
</marker>
</defs>
<text x="350" y="22" fill="#333" font-size="14" font-weight="bold" text-anchor="middle">U-Net: Encoder-Decoder with Skip Connections</text>
<!-- Encoder (left side, going down) -->
<text x="100" y="45" fill="#3498db" font-size="11" font-weight="bold" text-anchor="middle">Encoder</text>
<!-- Level 1 encoder -->
<rect x="40" y="55" width="120" height="35" rx="4" fill="#3498db" opacity="0.15" stroke="#3498db" stroke-width="1.5"/>
<text x="100" y="77" fill="#3498db" font-size="9" text-anchor="middle">Conv 64 (256²)</text>
<!-- Down arrow -->
<line x1="100" y1="90" x2="100" y2="108" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="115" y="103" fill="#e74c3c" font-size="7">↓ pool</text>
<!-- Level 2 encoder -->
<rect x="55" y="112" width="100" height="35" rx="4" fill="#3498db" opacity="0.2" stroke="#3498db" stroke-width="1.5"/>
<text x="105" y="134" fill="#3498db" font-size="9" text-anchor="middle">Conv 128 (128²)</text>
<!-- Down arrow -->
<line x1="105" y1="147" x2="105" y2="165" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="120" y="160" fill="#e74c3c" font-size="7">↓ pool</text>
<!-- Level 3 encoder -->
<rect x="70" y="170" width="80" height="35" rx="4" fill="#3498db" opacity="0.25" stroke="#3498db" stroke-width="1.5"/>
<text x="110" y="192" fill="#3498db" font-size="9" text-anchor="middle">Conv 256 (64²)</text>
<!-- Down arrow -->
<line x1="110" y1="205" x2="110" y2="223" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="125" y="218" fill="#e74c3c" font-size="7">↓ pool</text>
<!-- Bottleneck -->
<rect x="230" y="228" width="240" height="40" rx="6" fill="#f39c12" opacity="0.15" stroke="#f39c12" stroke-width="2"/>
<text x="350" y="253" fill="#f39c12" font-size="10" text-anchor="middle" font-weight="bold">Bottleneck: Conv 512 (32²)</text>
<line x1="110" y1="227" x2="230" y2="248" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<!-- Decoder (right side, going up) -->
<text x="600" y="45" fill="#27ae60" font-size="11" font-weight="bold" text-anchor="middle">Decoder</text>
<!-- Level 3 decoder -->
<rect x="550" y="170" width="80" height="35" rx="4" fill="#27ae60" opacity="0.15" stroke="#27ae60" stroke-width="1.5"/>
<text x="590" y="192" fill="#27ae60" font-size="9" text-anchor="middle">Conv 256 (64²)</text>
<!-- Up arrow from bottleneck -->
<line x1="470" y1="248" x2="590" y2="208" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="540" y="230" fill="#27ae60" font-size="7">↑ upsample</text>
<!-- Level 2 decoder -->
<rect x="545" y="112" width="100" height="35" rx="4" fill="#27ae60" opacity="0.2" stroke="#27ae60" stroke-width="1.5"/>
<text x="595" y="134" fill="#27ae60" font-size="9" text-anchor="middle">Conv 128 (128²)</text>
<!-- Up arrow -->
<line x1="590" y1="170" x2="595" y2="150" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="615" y="162" fill="#27ae60" font-size="7">↑ up</text>
<!-- Level 1 decoder -->
<rect x="540" y="55" width="120" height="35" rx="4" fill="#27ae60" opacity="0.15" stroke="#27ae60" stroke-width="1.5"/>
<text x="600" y="77" fill="#27ae60" font-size="9" text-anchor="middle">Conv 64 (256²)</text>
<!-- Up arrow -->
<line x1="595" y1="112" x2="600" y2="93" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="620" y="105" fill="#27ae60" font-size="7">↑ up</text>
<!-- Skip connections (horizontal dashed arrows) -->
<line x1="160" y1="72" x2="535" y2="72" stroke="#9b59b6" stroke-width="1.8" stroke-dasharray="6,3" marker-end="url(#unet-skip)"/>
<text x="350" y="66" fill="#9b59b6" font-size="9" text-anchor="middle" font-weight="bold">skip (concat)</text>
<line x1="155" y1="130" x2="540" y2="130" stroke="#9b59b6" stroke-width="1.8" stroke-dasharray="6,3" marker-end="url(#unet-skip)"/>
<text x="350" y="124" fill="#9b59b6" font-size="9" text-anchor="middle" font-weight="bold">skip (concat)</text>
<line x1="150" y1="188" x2="545" y2="188" stroke="#9b59b6" stroke-width="1.8" stroke-dasharray="6,3" marker-end="url(#unet-skip)"/>
<text x="350" y="182" fill="#9b59b6" font-size="9" text-anchor="middle" font-weight="bold">skip (concat)</text>
<!-- Output -->
<line x1="660" y1="72" x2="685" y2="72" stroke="#555" stroke-width="1" marker-end="url(#unet-arrow)"/>
<text x="692" y="70" fill="#333" font-size="8" text-anchor="start">1×1</text>
<text x="692" y="80" fill="#333" font-size="8" text-anchor="start">conv</text>
<!-- Bottom note -->
<rect x="100" y="280" width="500" height="30" rx="6" fill="#f5f5f5" stroke="#333" stroke-width="1"/>
<text x="350" y="300" fill="#333" font-size="10" text-anchor="middle">Skip connections concatenate encoder features with decoder features at each level.</text>
</svg>