Skip to content

jigglewiggle101/Identify-dog-breeds

Repository files navigation

Here's a well-structured README.md to guide users through the setup and usage of the dog show registration classifier:


Dog Show Registration Classifier

Project Description

Your city is hosting a citywide dog show, and this system will support the organizing committee with contestant registration. Each participant submits an image and biographical information about their dog. The registration system will verify whether each participant is indeed a dog, using a pre-built Python image classifier.

The classifier applies convolutional neural networks (CNNs) trained on ImageNet data to accurately tag dog images, identify breeds, and filter out images of non-dog pets. You’ll use your Python skills to evaluate different classifier algorithms, determine the most accurate model, and assess the trade-offs between runtime and accuracy.

Goals and Tasks

  1. Dog Classification: Use the provided classifier to distinguish between "dog" and "not dog" images.
  2. Breed Classification: Evaluate which classification algorithm most accurately identifies specific dog breeds.
  3. Runtime and Performance: Time each algorithm’s runtime to understand the trade-offs between model accuracy and computational efficiency.
  4. Comparison of CNN Architectures: Analyze the performance of three CNN architectures—AlexNet, VGG, and ResNet—to determine which best meets the needs of the registration system.

Prerequisites

  1. Python 3.6+
  2. Deep Learning Libraries: This project assumes access to a deep learning environment with libraries like torch or tensorflow compatible with the CNN models.
  3. Classifier: The classifier function is provided in classifier.py. You do not need to create the classifier itself.

Usage

Step 1: Load the Classifier

The classifier.py contains functions to classify images using different CNN architectures. An example program demonstrating the use of this classifier is included in test_classifier.py.

Step 2: Run the Classifier on Images

Use test_classifier.py as a template to apply the classifier to a set of images. Example usage:

from classifier import classify_image

# Example to classify an image
result = classify_image("path/to/dog_image.jpg", model="resnet")
print(result)

Step 3: Analyze Results

  1. Determine Accuracy: Assess each model’s accuracy on dog vs. non-dog classification.
  2. Breed Identification: Evaluate how accurately each model distinguishes between similar breeds, such as:
    • Great Pyrenees vs. Kuvasz
    • German Shepherd vs. Malinois
    • Beagle vs. Walker Hound
  3. Measure Runtime: Record the runtime of each CNN model (AlexNet, VGG, ResNet) to understand the trade-off between accuracy and computational cost.

Important Considerations

  • ImageNet Pre-trained Models: CNNs trained on ImageNet, which contains over 1.2 million images, will be used for this task.
  • Similarity of Breeds: Certain breeds (e.g., Great Pyrenees and Kuvasz) may be challenging to distinguish due to visual similarity. Increased training data for similar-looking breeds improves classification accuracy.

Example Evaluation

After running each model on the provided dataset, compare the accuracy and runtime results to identify the optimal model for this application.

Model Accuracy (Dog/Non-Dog) Accuracy (Breed) Runtime (seconds)
AlexNet 88% 75% 2.3
VGG 92% 78% 5.1
ResNet 95% 83% 3.7

License

This project is licensed under the MIT License. See the LICENSE file for details.


It is also available.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published