πŸš—πŸοΈ 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 file
  • README.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
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support