🏆 Best Paper Award at the 38th SIBGRAPI Conference on Graphics, Patterns and Images (2025).
DGCG- Density-Guided Correlation Graph for Graph Convolutional Networks in Image Classification:
Repository for the Scientific Initiation project that explores the construction of image similarity graphs using rank correlation functions, with subsequent classification via Graph Convolutional Networks (GCN).
This work investigates an alternative to the traditional construction of neighbor graphs (like k-NN) for semi-supervised image classification tasks. The central hypothesis is that the similarity between two images can be more robustly defined by the correlation between their respective neighbor lists, rather than solely by the direct distance between them.
To achieve this, we implemented rank correlation methods, such as RBO (Rank-Biased Overlap) and Jaccard, to calculate the weight of the graph edges. Once constructed, the graph is used to train an SGC (Simple Graph Convolution) model, a GCN variant, to classify the images in the dataset.
The code has been modularized to ensure clarity and maintainability, following the structure below:
/
├── data/ # Folder for storing datasets
├── main.py # Main script to run experiments
├── config.py # Control panel with hyperparameters
├── data_loader.py # Module for loading data
├── graph_builder.py # Module with graph construction functions (BallTree, RBO, etc.)
├── gcn_model.py # Module with the GCN model definition and class
├── utils.py # Helper functions (K-Fold, etc.)
└── README.md # This file
Follow the steps below to set up the environment and run the project.
1. Clone the repository:
git clone https://github.com/Bagiel1/SIBGRAPI-2025.git2. Create and activate a virtual environment (recommended):
# On Windows
python -m venv venv
.\venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate3. Install the dependencies:
pip install -r requirements.txtAll experiments are controlled and executed from the main.py script. To configure a run, open main.py and edit the "Control Panel" at the beginning of the main() function.
Example of the Control Panel in main.py:
def main():
# --- EXPERIMENT CONTROL PANEL ---
DATASET_TO_USE = 'flowers'
FEATURES_EXTRACTOR = 'resnet'
CORRELATION_FUNCTION_TO_USE = 'rbo'
USE_AUTOMATIC_THRESHOLD = True
MANUAL_THRESHOLD = 0.4
# ------------------------------------
# ... rest of the code ...After setting the desired parameters, run the script from the terminal (in the project's root folder):
python main.pyExperiments were conducted on the Flowers-17 dataset, using features extracted by different CNN architectures. The table below summarizes the main accuracy results (mean ± standard deviation over 10-fold cross-validation).
| Feature Extractor | Correlation Function | Threshold | Final Accuracy |
|---|---|---|---|
| ResNet | JaccardK | Auto | 85.41% ± 1.30% |
| ResNet | RBO | Auto | 84.33% ± 2.37% |
- Author: G. B. Maia
- Advisor: L. P. Valem
If you use this code in your research, please cite our SIBGRAPI 2025 paper:
Text: G. M. Brito and L. P. Valem, "Density-Guided Rank Correlation Graphs for Graph Convolutional Networks in Image Classification," 2025 38th SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI), Salvador, Brazil, 2025, pp. 1-6.
BibTeX:
@inproceedings{brito2025density,
author = {Brito, G. M. and Valem, L. P.},
title = {Density-Guided Rank Correlation Graphs for Graph Convolutional Networks in Image Classification},
booktitle = {2025 38th SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI)},
year = {2025},
pages = {1--6},
address = {Salvador, Brazil},
doi = {10.1109/SIBGRAPI67909.2025.11223391}
}
'''