Created
August 12, 2021 17:00
-
-
Save Rodio346/40258ffdcff1fdde1adb459c8e9d8be4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = [] | |
labels = [] | |
for img in Whales: | |
try: | |
img_read = plt.imread('Final Whale Dataset/Yes/' + img) | |
img_resize = cv2.resize(img_read, (50, 50)) | |
img_array = img_to_array(img_resize) | |
data.append(img_array) | |
labels.append(1) | |
except: | |
None | |
for img in Not_whales: | |
try: | |
img_read = plt.imread('Final Whale Dataset/No/' + img) | |
img_resize = cv2.resize(img_read, (50, 50)) | |
img_array = img_to_array(img_resize) | |
data.append(img_array) | |
labels.append(0) | |
except: | |
None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment