diff --git a/createNeuralNetworkDatabase.py b/createNeuralNetworkDatabase.py index 4a36f49..24fcf92 100644 --- a/createNeuralNetworkDatabase.py +++ b/createNeuralNetworkDatabase.py @@ -16,6 +16,7 @@ for img in os.listdir(path_potatoes): pic = cv2.resize(pic,(size,size)) training_data_potatoes.append([pic]) + np.save(os.path.join('neural_network','potatoes-dataset'),np.array(training_data_potatoes)) saved_potatoes = np.load(os.path.join('neural_network','potatoes-dataset.npy')) @@ -32,6 +33,10 @@ np.save(os.path.join('neural_network','beetroot-dataset'),np.array(training_data saved_potatoes = np.load(os.path.join('neural_network','beetroot-dataset.npy')) -# for i in range(5): -# plt.imshow(np.array(training_data_potatoes[i]).reshape(size,size,3)) -# plt.show() \ No newline at end of file +dict = { + 'beetroots': training_data_beetroot, + 'potatoes': training_data_potatoes +} + +print(dict) +np.save(os.path.join('neural_network','dataset'), np.array(dict)) \ No newline at end of file