One-Shot-Learning-with-Siamese-Networks icon indicating copy to clipboard operation
One-Shot-Learning-with-Siamese-Networks copied to clipboard

issue when using custom dataset

Open vainaixr opened this issue 6 years ago • 7 comments

I attempted to run this siamese network on a custom dataset of comic character faces, but got the error "all input arrays must have the same shape"

I am using the moeimouto-faces dataset, and ran this jupyter notebook on it. Dataset - https://www.kaggle.com/mylesoneill/tagged-anime-illustrations/home

how to solve this issue?

vainaixr avatar Mar 21 '19 11:03 vainaixr

I am interesting in this issue too, I tried to train model on at&t facedatabase and I catch this error. Did you cope with the problem?

eldarovich99 avatar Apr 03 '19 07:04 eldarovich99

Check your margin in try-catch block, my error was caused by this.

eldarovich99 avatar Apr 03 '19 08:04 eldarovich99

@eldarovich99 what did you do? where you able to run on custom dataset?

vainaixr avatar Apr 06 '19 15:04 vainaixr

@vainaijr , please check the shape of your dataset images. It must have all the same shape. Please try this code: for object_folder in os.listdir(path): print(object_folder) image_path = os.path.join(path,object_folder) for image_name in os.listdir(image_path): image_path_1 = os.path.join(image_path, image_name) image = imread(image_path_1) print(image_name, image.shape)

Emirismail avatar Apr 22 '19 08:04 Emirismail

how can i make all images of same shape

manmohansingh01 avatar Aug 08 '19 17:08 manmohansingh01

how can i make all images of same shape

use imresize

kbmeena avatar May 20 '20 11:05 kbmeena

Check size of your dataset images. Change layer dimension accordingly.

ShrideviReddy avatar Jul 05 '20 04:07 ShrideviReddy