Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update check_images.py #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions intropyproject-classify-pet-images/check_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# */AIPND-revision/intropyproject-classify-pet-images/check_images.py
#
# TODO 0: Add your information below for Programmer & Date Created.
# PROGRAMMER:
# DATE CREATED:
# PROGRAMMER: Atsede Fente
# DATE CREATED: 11-23-2024
# REVISED DATE:
# PURPOSE: Classifies pet images using a pretrained CNN model, compares these
# classifications to the true identity of the pets in the images, and
Expand Down Expand Up @@ -60,7 +60,7 @@ def main():
# get_pet_labels(in_arg.dir)
# This function creates the results dictionary that contains the results,
# this dictionary is returned from the function call as the variable results
results = get_pet_labels(None)
results = get_pet_labels(in_arg.dir)

# Function that checks Pet Images in the results Dictionary using results
check_creating_pet_image_labels(results)
Expand All @@ -74,7 +74,7 @@ def main():
# classify_images(in_arg.dir, results, in_arg.arch)
# Creates Classifier Labels with classifier function, Compares Labels,
# and adds these results to the results dictionary - results
classify_images(None, results, None)
classify_images(in_arg.dir, results, in_arg.arch)

# Function that checks Results Dictionary using results
check_classifying_images(results)
Expand All @@ -88,7 +88,7 @@ def main():
# Adjusts the results dictionary to determine if classifier correctly
# classified images as 'a dog' or 'not a dog'. This demonstrates if
# model can correctly classify dog images as dogs (regardless of breed)
adjust_results4_isadog(results, None)
adjust_results4_isadog(results, in_arg.dogfile)

# Function that checks Results Dictionary for is-a-dog adjustment using results
check_classifying_labels_as_dogs(results)
Expand All @@ -113,7 +113,7 @@ def main():
# print_results(results, results_stats, in_arg.arch, True, True)
# Prints summary results, incorrect classifications of dogs (if requested)
# and incorrectly classified breeds (if requested)
print_results(results, results_stats, None, True, True)
print_results(results, results_stats, in_arg.arch, True, True)

# TODO 0: Measure total program runtime by collecting end time
end_time = time()
Expand Down
Loading