Skip to content

PointerKnight/Cat-Dog-RecognitionModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cat and Dog Recognition AI Model

A simple Convolutional Neural Network (CNN) built with TensorFlow/Keras to distinguish between cats and dogs.

Project Structure

  • download_images.py: Downloads 100 images (50 cats, 50 dogs) from public APIs.
  • train_model.py: Preprocesses images and trains the CNN model.
  • predict.py: Script to run inference on individual images.
  • requirements.txt: List of dependencies.
  • cat_dog_model.h5: The trained model file (generated after training).

Setup Instructions

1. Install Dependencies

pip install -r requirements.txt

2. Train the Model

Train the AI model on the downloaded images:

python train_model.py

3. Run Predictions

Use the prediction script to identify an image:

python predict.py path/to/your/image.jpg

How it Works

The model uses a sequential CNN architecture with:

  • Rescaling layer (normalization)
  • 3 Convolutional blocks with MaxPooling
  • A Dense layer with 128 units
  • A final output layer for 2 classes (Cats, Dogs)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages