Last active
March 30, 2020 04:28
-
-
Save soumya997/3e02b31806495553a143cf9348d30fcf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Z,X=[],[] | |
| IMG_SIZE=150 | |
| FLOWER_SUNFLOWER_DIR='../input/flowers-recognition/flowers/flowers/sunflower' | |
| def assign_label(img,flower_type): | |
| return flower_type | |
| def make_train_data(flower_type,DIR): | |
| for img in tqdm(os.listdir(DIR)): | |
| label=assign_label(img,flower_type) | |
| path = os.path.join(DIR,img) | |
| img = cv2.imread(path,cv2.IMREAD_COLOR) | |
| img = cv2.resize(img, (IMG_SIZE,IMG_SIZE))#Resizing the image | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment