Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/subhangisati/identification-of-gemstone-using-mobilenetv2-and-transfer-learning
The project focuses on Identification of various Gemstone. The dataset consists of 87 classes.It shows the whole progress and model used to achieve final accuracy. You will gain knowledge of Computer Vision, The model used are CNN(Convolutional Neural Network), MobileNetV2 and VGGNet,The final model used was transfer learning with model MobileNetV2
https://github.com/subhangisati/identification-of-gemstone-using-mobilenetv2-and-transfer-learning
artificial-intelligence classification computer-vision convolutional-neural-networks cv2-library data-science deep-learning deep-neural-networks keras-neural-networks keras-tensorflow machine-learning multiclass-image-classification numpy-library pandas-dataframe python scikit-learn seaborn-python tensorflow
Last synced: about 3 hours ago
JSON representation
The project focuses on Identification of various Gemstone. The dataset consists of 87 classes.It shows the whole progress and model used to achieve final accuracy. You will gain knowledge of Computer Vision, The model used are CNN(Convolutional Neural Network), MobileNetV2 and VGGNet,The final model used was transfer learning with model MobileNetV2
- Host: GitHub
- URL: https://github.com/subhangisati/identification-of-gemstone-using-mobilenetv2-and-transfer-learning
- Owner: SubhangiSati
- Created: 2024-02-02T09:22:47.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-05T17:35:23.000Z (6 months ago)
- Last Synced: 2024-11-08T14:48:39.597Z (about 2 months ago)
- Topics: artificial-intelligence, classification, computer-vision, convolutional-neural-networks, cv2-library, data-science, deep-learning, deep-neural-networks, keras-neural-networks, keras-tensorflow, machine-learning, multiclass-image-classification, numpy-library, pandas-dataframe, python, scikit-learn, seaborn-python, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 1.58 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Gemstone Classification using Transfer Learning with MobileNetV2
## Overview
This code implements a gemstone classification model using transfer learning with the MobileNetV2 architecture. The model is trained on a dataset of gemstone images, and its performance is evaluated using various metrics, including accuracy, loss, and a confusion matrix.
## Prerequisites
- Python 3.x
- TensorFlow 2.x
- Matplotlib
- Seaborn
- Scikit-learn## Installation
Ensure you have the required dependencies installed using:
```bash
pip install tensorflow matplotlib seaborn scikit-learn
```## Usage
1. Download the gemstone dataset and organize it into train and test directories.
2. Update the `train_data_path` and `test_data_path` variables with the correct paths to your train and test datasets.
3. Optionally, set the `image_to_predict_path` variable to the path of a specific image for prediction.
4. Run the script to train the model, evaluate its performance, and make predictions.
```bash
python gemstone_classification.py
```## Code Structure
- **Data Preprocessing:**
- Images are loaded and preprocessed using data augmentation for training (`ImageDataGenerator`).
- **Model Architecture:**
- MobileNetV2 is used as the base model with additional custom top layers for classification.
- The model is compiled with categorical cross-entropy loss and Adam optimizer.- **Training:**
- The model is trained using the specified learning rate schedule and early stopping.- **Evaluation:**
- The model is evaluated on the test set, and accuracy and loss curves are plotted.- **Prediction:**
- A sample image is loaded, preprocessed, and the model makes predictions.- **Confusion Matrix:**
- Confusion matrix and classification report are generated for evaluating model performance.## Hyperparameters
- `input_shape`: Input image dimensions (224x224x3).
- `num_classes`: Number of gemstone classes (87).
- `batch_size`: Batch size for training and testing (32).
- `epochs`: Number of training epochs (50).## Customization
- Adjust the hyperparameters to suit your specific dataset and computing resources.
- Modify the learning rate schedule, early stopping parameters, or model architecture as needed.## License
This code is licensed under the [MIT License](LICENSE).