panel_segmentation.panel_train.TrainPanelSegmentationModel¶
-
class
panel_segmentation.panel_train.TrainPanelSegmentationModel(batch_size, no_epochs, learning_rate)[source]¶ A class for training a deep learning architecture to perform image segmentation on satellite images to detect solar arrays in the image.
-
__init__(batch_size, no_epochs, learning_rate)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(batch_size, no_epochs, learning_rate)Initialize self.
diceCoeff(y_true, y_pred[, smooth])Accuracy metric is overly optimistic.
diceCoeffLoss(y_true, y_pred)This function is a loss function that can be used when training the segmentation model.
loadImagesToNumpyArray(image_file_path)Load in a set of images from a folder into a 4D numpy array, with dimensions (number images, 640, 640, 3).
trainMountingConfigClassifier(train_path, …)This function uses Faster R-CNN ResNet50 FPN as the base network and as a transfer learning framework to train a model that performs object detection on the mounting configuration of solar arrays.
trainPanelClassifier(train_path, val_path[, …])This function uses VGG16 as the base network and as a transfer learning framework to train a model that predicts the presence of solar panels in a satellite image.
trainSegmentation(train_data, train_mask, …)This function uses VGG16 as the base network and as a transfer learning framework to train a model that segments solar panels from a satellite image.
trainingStatistics(results, mode)This function prints the training statistics such as training loss and accuracy and validation loss and accuarcy.
-