CANetv1.2 / README.md
CernovaAI's picture
Update README.md
eade9a4 verified
metadata
license: mit
language:
  - en
metrics:
  - accuracy
new_version: CernovaAI/CANetv1.2
pipeline_tag: image-classification
tags:
  - medi
  - code
base_model:
  - CernovaAI/CANet-v1.1
  - CernovaAI/CANet-v1

πŸ–ΌοΈ Image Classifier with TensorFlow & Keras

This project demonstrates a Convolutional Neural Network (CNN) built with TensorFlow and Keras for image classification. The model is designed to learn from labeled datasets and classify unseen images with high accuracy.

πŸš€ Features

  • CNN-based architecture: Efficient feature extraction using Conv2D and MaxPooling layers.
  • Flexible dataset handling: Uses ImageDataGenerator with automatic train/validation split (90% training / 10% validation).
  • Easy deployment: Trained model is saved in .h5 format for reuse.
  • Prediction function: Quickly classify a single image with visualization support.
  • Matplotlib integration: Displays the predicted class directly on the image.

πŸ“‚ Project Structure

project/
│── dataset/               # Training & validation images
│── image_classifier.h5    # Saved trained model
│── main.py                # Model training & prediction script
│── README.md              # Project documentation

🧠 Model Architecture

  • Conv2D (32 filters, 3x3) β†’ ReLU
  • MaxPooling2D (2x2)
  • Conv2D (64 filters, 3x3) β†’ ReLU
  • MaxPooling2D (2x2)
  • Conv2D (128 filters, 3x3) β†’ ReLU
  • MaxPooling2D (2x2)
  • Flatten
  • Dense (512 neurons, ReLU)
  • Dense (number of classes, Softmax)

⚑ Usage

1️⃣ Train the Model

python main.py

2️⃣ Run Predictions

guess("test_image.jpg", model, train_generator.class_indices)

The predicted class will be displayed on the image itself.

🎯 Conclusion

This project provides a versatile CNN-based image classifier that can be applied to a wide range of domainsβ€”from medical imaging to natural scene recognition. By integrating your own dataset, you can easily adapt this model to your specific use case.