Академический Документы
Профессиональный Документы
Культура Документы
Process
Create testing data folders including subfolders with different geological phenomena
Create training data folders including subfolders with different geological phenomena
def load_data(data_directory):
Process
Create testing data folders including subfolders with different geological phenomena
Create training data folders including subfolders with different geological phenomena
“””
Step 2 – data inspection of the ndim and size attributes of the images array:
“””
“””
Step 3 – data inspection of the ndim and size attributes of the labels array
“””
# Print the `labels` dimensions
print(labels.ndim)
“””
Step 5 – Exploratory data analysis
Review the size of the images – are they equal or unequal?
Is there an equal or unequal distribution of images – we can assign random numbers to
images?
“””
# Set a counter
i = 1
“””
Step 6 – Feature Extraction - classification
Note Colour matters less in classification questions. For detection questions, colour matters
bigly!
Rescale the images and convert the images that are held in the images array to grayscale
using skimage or Scikit-Image library. Use the resize() function in the transform module to
resize each image to 28 by 28 pixels. Once again, you see that the way you actually form the
list: for every image that you find in the images array, you’ll perform the transformation
operation that you borrow from the skimage library. Finally, you store the result in the
images28 variable:
“””
# Import the `transform` module from `skimage`
from skimage import transform