This project consists of a DNN that can distinguish between images of a cat and images of a Dog with 87% accuracy.
To import the classifier into your project, you'll need to do these things:
- Install dependencies into your project:
pip install -r requirements.txt
- 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. - 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