Welcome to the Image Recognition Project by Keval Ravani! π
This project uses a Convolutional Neural Network (CNN) to classify images from the CIFAR-10 dataset, which contains 60,000 32x32 color images across 10 classes, such as π©οΈ airplanes, π automobiles, π¦ birds, π± cats, and more.
The project follows a well-defined pipeline:
- Dataset Loading: CIFAR-10 dataset is loaded using TensorFlow.
- Preprocessing: Images are normalized for better model performance.
- Model Construction: A CNN is built using TensorFlow/Keras.
- Training: The model is trained on the dataset.
- Evaluation: The model's accuracy is tested on unseen data.
- Visualization: Random samples are visualized with predictions.
- π Image classification using CNNs
- π Model training and evaluation
- πΌοΈ Visualization of sample predictions
- π·οΈ Classes: Airplane, Automobile, Bird, Cat, Deer, Dog, Frog, Horse, Ship, Truck
Ensure you have the following Python libraries installed:
tensorflow
(compatible with Python 3.11)matplotlib
random
Install them using:
This project requires Python 3.11.x for compatibility with TensorFlow.
- Clone the repository:
- Install dependencies:
- Run the script:
The CIFAR-10 dataset is loaded and split into training and testing sets: Images are normalized to scale pixel values between 0 and 1:
Random samples from the training set are visualized with their labels:
The CNN consists of three convolutional layers followed by max-pooling layers and dense layers:
The model is compiled and trained for two epochs: Evaluation on the test set:
Random samples from the test set are visualized with their actual and predicted labels:
Metric | Value |
---|---|
Training Accuracy | ~59% |
Test Accuracy | ~60% |
- Train the model for more epochs to improve accuracy.
- Experiment with data augmentation techniques.
- Implement transfer learning using pre-trained models like ResNet or VGG.
Keval Ravani
π Email: kevalravani06@gmail.com
π
Date: April 13, 2025
This project is licensed under the MIT License.
Special thanks to the TensorFlow team for providing an easy-to-use framework and to the creators of the CIFAR-10 dataset.
Feel free to open issues or submit pull requests for improvements. Contributions are always welcome! π