
GRIFD MATLAB Implementation - README
--------------------------------------
This package implements the GRIFD framework described in the paper "Graded Region-Wise Dissection and Cross-Pooling RNN Framework for Diabetic Retinopathy Detection".

REQUIREMENTS:
- MATLAB R2020 or newer
- Image Processing Toolbox
- Statistics and Machine Learning Toolbox

FILES:
- main.m: Main MATLAB script that preprocesses fundus images, extracts features, simulates RNN with variation tracking, and applies cross-pooling.
- dataset/: Directory where you must place the Mendeley fundus image dataset (*.jpg files).

STEPS TO USE:
1. Download the Mendeley dataset from the link in the paper.
2. Create a folder named 'dataset' in the same directory as main.m.
3. Place the fundus image `.jpg` files into `dataset/Mendeley/`.
4. Run `main.m` in MATLAB.
5. The script will output Accuracy, Precision, and Specificity metrics.

FEATURES IMPLEMENTED:
✓ Region-of-Interest dissection via block-level pixel analysis
✓ Feature-based intensity and edge descriptors
✓ RNN-simulated sequential variation tracking
✓ Cross-pooling consistency check to reduce false positives
✓ Performance metrics: Accuracy, Precision, Specificity

NOTE:
- This version uses feature-based simulation of RNN logic. For deep learning with LSTM, replace with MATLAB's Deep Learning Toolbox sequences.
