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
PATH = "C:/Users/ADMIN/Desktop/Project/1/train/Sc/Sc_1.bmp" | |
image = mpimg.imread(PATH) | |
plt.show() | |
plt.imshow(image) | |
plt.savefig('scratch.png') |
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
PATH = "C:/Users/ADMIN/Desktop/Project/1/train/RS/RS_1.bmp" | |
image = mpimg.imread(PATH) | |
plt.show() | |
plt.imshow(image) | |
plt.savefig('rolled_in_scale.png') |
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
PATH = "C:/Users/ADMIN/Desktop/Project/1/train/Ps/PS_1.bmp" | |
image = mpimg.imread(PATH) | |
plt.show() | |
plt.imshow(image) | |
plt.savefig('pitted_surface.png') |
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
PATH = "C:/Users/ADMIN/Desktop/Project/1/train/Pa/Pa_1.bmp" | |
image = mpimg.imread(PATH) | |
plt.show() | |
plt.imshow(image) | |
plt.savefig('patch.png') |
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
PATH = "C:/Users/ADMIN/Desktop/Project/1/train/In/In_1.bmp" | |
image = mpimg.imread(PATH) | |
plt.show() | |
plt.imshow(image) | |
plt.savefig('inclusion.png') |
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
PATH = "C:/Users/ADMIN/Desktop/Project/1/train/Cr/Cr_1.bmp" | |
image = mpimg.imread(PATH) | |
plt.show() | |
plt.imshow(image) | |
plt.savefig('Crazing.png') |
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
plt.plot(epochs_range, loss, label='Training Loss') | |
plt.plot(epochs_range, val_loss, label='Validation Loss') | |
plt.legend(loc='upper right') | |
plt.title('Training and Validation Loss') | |
plt.show() |
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
plt.plot(epochs_range, loss, label='Training Loss') | |
plt.plot(epochs_range, val_loss, label='Validation Loss') | |
plt.legend(loc='upper right') | |
plt.title('Training and Validation Loss') | |
plt.show() |
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
acc = history.history['accuracy'] | |
val_acc = history.history['val_accuracy'] | |
loss = history.history['loss'] | |
val_loss = history.history['val_loss'] | |
epochs_range = range(epochs) | |
plt.plot(epochs_range, acc, label='Training Accuracy') | |
plt.plot(epochs_range, val_acc, label='Validation Accuracy') |
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
Epoch 1/20 | |
48/48 [==============================] - 15s 320ms/step - loss: 1.9151 - accuracy: 0.2396 - val_loss: 1.6345 - val_accuracy: 0.3139 | |
Epoch 2/20 | |
48/48 [==============================] - 15s 314ms/step - loss: 1.4954 - accuracy: 0.3917 - val_loss: 1.3522 - val_accuracy: 0.4722 | |
Epoch 3/20 | |
48/48 [==============================] - 16s 330ms/step - loss: 1.1761 - accuracy: 0.5528 - val_loss: 1.1349 - val_accuracy: 0.5389 | |
Epoch 4/20 | |
48/48 [==============================] - 16s 339ms/step - loss: 0.8542 - accuracy: 0.6958 - val_loss: 0.6563 - val_accuracy: 0.7194 | |
Epoch 5/20 | |
48/48 [==============================] - 16s 340ms/step - loss: 0.6892 - accuracy: 0.7417 - val_loss: 0.7053 - val_accuracy: 0.7472 |
NewerOlder