Files

82 lines
4.7 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 280" width="700" height="280" font-family="Arial, sans-serif">
<defs>
<marker id="vqa-arrow" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto">
<path d="M0,0 L8,3 L0,6" fill="#666"/>
</marker>
<marker id="vqa-arrow-blue" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto">
<path d="M0,0 L8,3 L0,6" fill="#3498db"/>
</marker>
<marker id="vqa-arrow-red" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto">
<path d="M0,0 L8,3 L0,6" fill="#e74c3c"/>
</marker>
</defs>
<!-- Title -->
<text x="350" y="24" font-size="14" font-weight="bold" fill="#333" text-anchor="middle">Visual Question Answering Pipeline</text>
<!-- Image placeholder -->
<rect x="20" y="55" width="90" height="70" rx="4" fill="#eee" stroke="#ccc" stroke-width="1"/>
<rect x="30" y="65" width="25" height="20" rx="2" fill="#3498db" fill-opacity="0.3"/>
<rect x="60" y="70" width="20" height="15" rx="2" fill="#27ae60" fill-opacity="0.3"/>
<rect x="35" y="90" width="40" height="18" rx="2" fill="#e74c3c" fill-opacity="0.2"/>
<text x="65" y="130" font-size="9" fill="#666" text-anchor="middle">Image</text>
<!-- Question text -->
<text x="65" y="175" font-size="9" fill="#666" text-anchor="middle">"What color</text>
<text x="65" y="187" font-size="9" fill="#666" text-anchor="middle">is the car?"</text>
<text x="65" y="205" font-size="9" fill="#999" text-anchor="middle">Question</text>
<!-- Arrow: Image to Vision Encoder -->
<line x1="110" y1="90" x2="155" y2="90" stroke="#3498db" stroke-width="1.5" marker-end="url(#vqa-arrow-blue)"/>
<!-- Vision Encoder -->
<rect x="160" y="60" width="120" height="55" rx="8" fill="#3498db" fill-opacity="0.12" stroke="#3498db" stroke-width="1.5"/>
<text x="220" y="84" font-size="11" fill="#333" text-anchor="middle">Vision Encoder</text>
<text x="220" y="100" font-size="9" fill="#666" text-anchor="middle">(ViT / ResNet)</text>
<!-- Arrow: Question to Text Encoder -->
<line x1="110" y1="185" x2="155" y2="185" stroke="#e74c3c" stroke-width="1.5" marker-end="url(#vqa-arrow-red)"/>
<!-- Text Encoder -->
<rect x="160" y="160" width="120" height="55" rx="8" fill="#e74c3c" fill-opacity="0.12" stroke="#e74c3c" stroke-width="1.5"/>
<text x="220" y="184" font-size="11" fill="#333" text-anchor="middle">Text Encoder</text>
<text x="220" y="200" font-size="9" fill="#666" text-anchor="middle">(BERT / GPT)</text>
<!-- Image features label -->
<line x1="280" y1="87" x2="320" y2="87" stroke="#3498db" stroke-width="1.2"/>
<text x="300" y="78" font-size="8" fill="#3498db" text-anchor="middle">image</text>
<text x="300" y="100" font-size="8" fill="#3498db" text-anchor="middle">features</text>
<!-- Text features label -->
<line x1="280" y1="187" x2="320" y2="187" stroke="#e74c3c" stroke-width="1.2"/>
<text x="300" y="178" font-size="8" fill="#e74c3c" text-anchor="middle">text</text>
<text x="300" y="200" font-size="8" fill="#e74c3c" text-anchor="middle">features</text>
<!-- Arrows converging to Fusion -->
<line x1="320" y1="87" x2="365" y2="125" stroke="#3498db" stroke-width="1.5" marker-end="url(#vqa-arrow)"/>
<line x1="320" y1="187" x2="365" y2="150" stroke="#e74c3c" stroke-width="1.5" marker-end="url(#vqa-arrow)"/>
<!-- Fusion box -->
<rect x="370" y="110" width="120" height="55" rx="8" fill="#9b59b6" fill-opacity="0.12" stroke="#9b59b6" stroke-width="1.5"/>
<text x="430" y="134" font-size="11" fill="#333" text-anchor="middle">Multimodal</text>
<text x="430" y="150" font-size="11" fill="#333" text-anchor="middle">Fusion</text>
<!-- Arrow to Classifier -->
<line x1="490" y1="137" x2="530" y2="137" stroke="#9b59b6" stroke-width="1.5" marker-end="url(#vqa-arrow)"/>
<!-- Classifier -->
<rect x="535" y="110" width="80" height="55" rx="8" fill="#f39c12" fill-opacity="0.12" stroke="#f39c12" stroke-width="1.5"/>
<text x="575" y="134" font-size="11" fill="#333" text-anchor="middle">Answer</text>
<text x="575" y="150" font-size="11" fill="#333" text-anchor="middle">Head</text>
<!-- Arrow to Answer -->
<line x1="615" y1="137" x2="640" y2="137" stroke="#f39c12" stroke-width="1.5" marker-end="url(#vqa-arrow)"/>
<!-- Answer -->
<rect x="645" y="118" width="45" height="38" rx="6" fill="#27ae60" fill-opacity="0.15" stroke="#27ae60" stroke-width="1.5"/>
<text x="667" y="133" font-size="9" font-weight="bold" fill="#27ae60" text-anchor="middle">Red</text>
<text x="667" y="147" font-size="8" fill="#666" text-anchor="middle">Answer</text>
<!-- Bottom legend -->
<text x="350" y="258" font-size="9" fill="#999" text-anchor="middle">Modality-specific encoders → Cross-modal fusion → Task-specific prediction</text>
</svg>