Skip to content

KumarRaju1313/coral-image-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺΈ Coral Image Classification

This project focuses on classifying coral images into two categories: healthy corals and bleached corals. Various machine learning models are trained after extensive preprocessing and augmentation to improve classification performance.


πŸ“‚ Dataset

The dataset includes coral images categorized into:

  • healthy_corals/
  • bleached_corals/

Images are resized, preprocessed, and augmented to create a robust training set.


πŸ› οΈ Installation

To run this project, make sure the following Python libraries are installed:

pip install numpy pandas matplotlib seaborn scikit-learn opencv-python Pillow tqdm

🧼 Image Preprocessing

Each image undergoes the following preprocessing steps:

  • πŸ”„ Resizing: All images resized to 64Γ—64 pixels for consistency and reduced computation.
  • πŸ“‰ Duplicate Removal: Duplicate files detected and deleted to avoid bias.
  • πŸ” Augmentation: Applied transformations like mirroring and rotation to increase dataset diversity.
  • πŸŒ‘ Grayscale Conversion: Reduced color complexity to focus on structure.
  • πŸŽ›οΈ Contrast & Brightness Adjustment: Enhanced visibility and balance across images.

πŸ€– Models and Hyperparameter Tuning

We trained and optimized the following models using GridSearchCV:

  • βœ… Support Vector Machine (SVM)
  • βœ… Random Forest
  • βœ… K-Nearest Neighbors (KNN)
  • βœ… Logistic Regression

πŸ“ Evaluation Metrics

The models were evaluated on:

  • Accuracy
  • Precision
  • Recall
  • F1 Score
  • Confusion Matrix

πŸ“Š Results

Each model’s performance (including accuracy and precision) is printed during execution.
You can use this information to compare models and select the best one for your coral classification task.


πŸ“Œ Conclusion

The best-performing model can be selected based on validation scores and metric comparisons.

βœ… Proper image preprocessing and augmentation significantly improved the model's ability to distinguish between healthy and bleached coral.

About

Classifying healthy vs. bleached coral images using SVM, Random Forest, and KNN with image preprocessing and augmentation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors