πποΈ Car vs Bike Image Classifier
This repository contains a Convolutional Neural Network (CNN) model trained to classify whether an image contains a car or a bike.
π Model Overview
- Input: RGB image resized to 128x128
- Output: Binary classification (0 = Bike, 1 = Car)
- Framework: TensorFlow / Keras
- Model Format:
.h5(HDF5)
π§ Architecture Summary
- Conv2D β ReLU β MaxPooling
- Conv2D β ReLU β MaxPooling
- Flatten β Dense(128) β Dropout
- Dense(1) with sigmoid activation
β Performance
- Accuracy: ~96% on validation data
- Loss: ~0.12 (binary crossentropy)
π§ͺ Example Usage (Python)
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing import image
import numpy as np
# Load model
model = load_model("car_vs_bike_model.h5")
# Load and preprocess image
img = image.load_img("test.jpg", target_size=(128, 128))
img_array = image.img_to_array(img) / 255.0
img_array = np.expand_dims(img_array, axis=0)
# Predict
prediction = model.predict(img_array)
if prediction > 0.5:
print("Prediction: π Car")
else:
print("Prediction: ποΈ Bike")
π Files in This Repo
car_vs_bike_model.h5β Trained model fileREADME.mdβ Project description & usage- (Optional)
example_images/β Sample test images
π₯ Download Instructions
Clone this repo and use Git LFS for large model files:
git lfs install
git clone https://huggingface.co/D-Neeraja/car_vs_bike_classifier
π§° Requirements
- Python 3.7+
- TensorFlow β₯ 2.5
- NumPy
πββοΈ Author
Neeraja Dakkata
π§ dakkataneeraja0031@gmail.com
π GitHub: github.com/D-Neeraja
Feel free to use this model for educational purposes or integrate it into your own projects.
- Downloads last month
- -
Evaluation results
- Accuracyself-reported0.960