This project implements a Content-Based Image Retrieval (CBIR) system specifically designed for retinal fundus images using the High-Resolution Fundus (HRF) dataset. The system employs advanced computer vision techniques and handcrafted feature engineering to enable efficient retrieval of similar retinal images based on visual content.
- Develop a robust CBIR system for medical image analysis
- Extract and combine multiple handcrafted features for comprehensive image representation
- Compare different feature engineering techniques for retinal image classification
- Provide insights into feature importance and model performance
HRF (High-Resolution Fundus) Dataset
- Total Images: 45 high-resolution retinal fundus images
- Categories:
- Healthy: 15 images
- Diabetic Retinopathy: 15 images
- Glaucoma: 15 images
- Resolution: High-quality fundus photographs
- Format: JPEG/JPG images
- HOG (Histogram of Oriented Gradients): Captures edge and gradient information
- LBP (Local Binary Patterns): Analyzes local texture patterns
- Edge Detection: Sobel, Canny, and Laplacian edge features
- Gabor Filters: Texture analysis using frequency domain features
- GLCM (Gray-Level Co-occurrence Matrix): Statistical texture descriptors
- Color Histograms: RGB and HSV color distribution features
- Individual feature performance analysis
- Feature concatenation and fusion techniques
- Dimensionality reduction using PCA
- Feature selection using statistical methods
- Random Forest Classifier
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
- Logistic Regression
- Classification accuracy
- Precision, Recall, F1-score
- Confusion matrices
- Feature importance visualization
- Cross-validation performance
- Python 3.8 or higher
- pip package manager
- Clone the repository
git clone https://github.com/yourusername/HRF-Retinal-Edge-Retrieval.git
cd HRF-Retinal-Edge-Retrieval- Create virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate- Install dependencies
pip install -r requirements.txtThe project dependencies are specified in requirements.txt:
opencv-python>=4.8.0
scikit-image>=0.25.0
scikit-learn>=1.3.0
numpy>=1.24.0
pandas>=2.0.0
matplotlib>=3.7.0
seaborn>=0.12.0
jupyter>=1.0.0
tqdm>=4.65.0
pillow>=10.0.0
scipy>=1.10.0
joblib>=1.3.0
ipykernel>=6.25.0
notebook>=7.0.0
jupyter notebook HRF-Retinal-Edge-Retrieval.ipynb- Data Loading and Exploration
- Feature Extraction Pipeline
- Model Training and Evaluation
- Performance Comparison
- Feature Importance Analysis
- Results Visualization
Note: Results will be updated after running the complete analysis.
The notebook provides comprehensive analysis of different feature combinations and their performance on the HRF dataset.
- Feature combination strategies and their effectiveness
- Comparative analysis of different machine learning models
- Feature importance rankings for retinal image classification
- Performance metrics across different classification scenarios
The project implements a comprehensive feature extraction pipeline combining multiple computer vision techniques for robust retinal image analysis.
- Stratified K-Fold Cross-Validation
- Statistical significance testing
- Feature importance ranking
- Comprehensive visualization
HRF-Retinal-Edge-Retrieval/
βββ HRF/ # Dataset directory
β βββ healthy/ # Healthy retinal images (15 images)
β βββ diabetic_retinopathy/ # DR images (15 images)
β βββ glaucoma/ # Glaucoma images (15 images)
βββ venv/ # Virtual environment
βββ Connection Sensitive Attention U-NET...pdf # Reference paper
βββ HRF-Retinal-Edge-Retrieval.ipynb # Main notebook
βββ README.md # Project documentation
βββ requirements.txt # Dependencies
This project demonstrates:
- Handcrafted feature engineering in computer vision
- Medical image analysis techniques
- Content-based image retrieval systems
- Feature fusion and selection strategies
- Performance evaluation methodologies
- Reference Paper: Connection Sensitive Attention U-NET for Accurate Retinal Vessel Segmentation (included in repository)
- Dataset: HRF (High-Resolution Fundus) database for vessel segmentation studies
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- HRF Dataset: Thanks to the creators of the High-Resolution Fundus dataset
- OpenCV Community: For excellent computer vision tools
- scikit-image: For comprehensive image processing capabilities
- scikit-learn: For machine learning implementations
For questions or collaboration opportunities, please open an issue in this repository.
Star this repository if you found it helpful!