<p>I currently work on similar topic and here is my observation of what works</p>
<p>Step 1: Use SLIC segmentation to get the superpixels of the image<br>
Step 2: Region adjacency graph can be build form the superpixel labels (output is networkx graph)<br>
Step 3: Encode any special feature to discriminate your graph (just like the images) eg. px intensities of rgb channels can be embedded as node features using a vector etc<br></p>
<pre><code>superpixels_labels = segmentation.slic(fmri, compactness=30, n_segments=72, multichannel=False) + 1 

def build_rag(labels, image):
    g = nx.Graph()
    footprint = ndi.generate_binary_structure(labels.ndim, connectivity=1)
    _ = ndi.generic_filter(labels, add_edge_filter, footprint=footprint,
                           mode='nearest', extra_arguments=(g,))
    for n in g:
        g.nodes[n]['total color'] = np.zeros(34, np.double)
        g.nodes[n]['pixel count'] = 0
    for index in np.ndindex(labels.shape):
        n = labels[index]
        g.nodes[n]['total color'] += image[index]
        g.nodes[n]['pixel count'] += 1
    return g


#to add node features from image
nx.set_node_attributes(g, [0.2, 0.7, 0.5], &quot;ndata&quot;)
g.nodes[1][&quot;ndata&quot;]
</code></pre>
<p><strong>Useful Reference</strong></p>
<ol>
<li><a href="https://arxiv.org/abs/2201.12633" rel="nofollow noreferrer">https://arxiv.org/abs/2201.12633</a></li>
<li><a href="https://graph-neural-networks.github.io/static/file/chapter20.pdf" rel="nofollow noreferrer">https://graph-neural-networks.github.io/static/file/chapter20.pdf</a></li>
<li><a href="https://distill.pub/2021/gnn-intro/" rel="nofollow noreferrer">https://distill.pub/2021/gnn-intro/</a></li>
</ol>
Graph Neural Network for Image Classification
<p>I have a task about image classification using Graph Neural Network. Can you give me some references for it? I just found on the internet GCN is used for CSV data classification. thanks :)</p>