Skip to content

GhoulKingR/cat-dog-classifier

Repository files navigation

cat-dog-classifier

This project consists of a DNN that can distinguish between images of a cat and images of a Dog with 87% accuracy.

Cat 1 Cat 2
Dog 1 Dog 2

Importing the classifier

To import the classifier into your project, you'll need to do these things:

  1. Install dependencies into your project:
pip install -r requirements.txt
  1. Copy the weights file (model_weights.weights.h5) and the lib file (lib.py) to your project. You can rename the lib file and place it wherever you want in your project, you only need to make sure that the lib and weight files are in the same directory.
  2. Import the cat_or_dog function to your project, and pass a path to the image file. Then you'll get an output 'dog' if it's a dog and 'cat' if it's a cat:
from lib import cat_or_dog

result = cat_or_dog('./internet_images/images.jpeg')
print(result)        # -> dog

About

An AI model for classifying cat and dog images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published