Gogul09 / image-classification-python

Using global feature descriptors and machine learning to perform image classification
MIT License
84 stars 80 forks source link

issue with saving the data as .h5 #4

Open OlgaMatt opened 5 years ago

OlgaMatt commented 5 years ago

I am trying to save the output files as .h5 files as instructed, but I keep getting the error "TypeError: Object dtype dtype('O') has no native HDF5 equivalent"

Anyone know how to fix it, or an alternative way of saving this data?

abhising10p14 commented 5 years ago

Change the line to this in loop over the training data sub-folders for training_name in train_labels:

join the training data path and each species training folder

dir = os.path.join(train_path, training_name)

# get the current training label
current_label = training_name

file = dir + "/image_" + str(x) + ".jpg"