Skip to content

Commit

Permalink
spellcheck config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyhu authored and waleedka committed Jul 12, 2018
1 parent 8075ecc commit 89629ed
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions mrcnn/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ def data_generator(dataset, config, shuffle=True, augment=False, augmentation=No
defined in the Dataset class.
Returns a Python generator. Upon calling next() on it, the
generator returns two lists, inputs and outputs. The containtes
generator returns two lists, inputs and outputs. The contents
of the lists differs depending on the received arguments:
inputs list:
- images: [batch, H, W, C]
Expand Down Expand Up @@ -1693,7 +1693,7 @@ def data_generator(dataset, config, shuffle=True, augment=False, augmentation=No
config.BACKBONE_STRIDES,
config.RPN_ANCHOR_STRIDE)

# Keras requires a generator to run indefinately.
# Keras requires a generator to run indefinitely.
while True:
try:
# Increment index to pick next image. Shuffle if at the start of an epoch.
Expand Down Expand Up @@ -2101,10 +2101,10 @@ def find_last(self):
return checkpoint

def load_weights(self, filepath, by_name=False, exclude=None):
"""Modified version of the correspoding Keras function with
"""Modified version of the corresponding Keras function with
the addition of multi-GPU support and the ability to exclude
some layers from loading.
exlude: list of layer names to excluce
exclude: list of layer names to exclude
"""
import h5py
# Conditional import to support versions of Keras before 2.2
Expand Down Expand Up @@ -2238,7 +2238,7 @@ def set_trainable(self, layer_regex, keras_model=None, indent=0, verbose=1):
layer.layer.trainable = trainable
else:
layer.trainable = trainable
# Print trainble layer names
# Print trainable layer names
if trainable and verbose > 0:
log("{}{:20} ({})".format(" " * indent, layer.name,
layer.__class__.__name__))
Expand Down Expand Up @@ -2306,7 +2306,7 @@ def train(self, train_dataset, val_dataset, learning_rate, epochs, layers,
flips images right/left 50% of the time. You can pass complex
augmentations as well. This augmentation applies 50% of the
time, and when it does it flips images right/left half the time
and adds a Gausssian blur with a random sigma in range 0 to 5.
and adds a Gaussian blur with a random sigma in range 0 to 5.
augmentation = imgaug.augmenters.Sometimes(0.5, [
imgaug.augmenters.Fliplr(0.5),
Expand Down Expand Up @@ -2385,10 +2385,10 @@ def train(self, train_dataset, val_dataset, learning_rate, epochs, layers,
def mold_inputs(self, images):
"""Takes a list of images and modifies them to the format expected
as an input to the neural network.
images: List of image matricies [height,width,depth]. Images can have
images: List of image matrices [height,width,depth]. Images can have
different sizes.
Returns 3 Numpy matricies:
Returns 3 Numpy matrices:
molded_images: [N, h, w, 3]. Images resized and normalized.
image_metas: [N, length of meta data]. Details about each image.
windows: [N, (y1, x1, y2, x2)]. The portion of the image that has the
Expand Down Expand Up @@ -2550,7 +2550,7 @@ def detect_molded(self, molded_images, image_metas, verbose=0):
the model.
molded_images: List of images loaded using load_image_gt()
image_metas: image meta data, also retruned by load_image_gt()
image_metas: image meta data, also returned by load_image_gt()
Returns a list of dicts, one dict per image. The dict contains:
rois: [N, (y1, x1, y2, x2)] detection bounding boxes
Expand Down Expand Up @@ -2678,7 +2678,7 @@ def run_graph(self, images, outputs, image_metas=None):
outputs.
image_metas: If provided, the images are assumed to be already
molded (i.e. resized, padded, and noramlized)
molded (i.e. resized, padded, and normalized)
outputs: List of tuples (name, tensor) to compute. The tensors are
symbolic TensorFlow tensors and the names are for easy tracking.
Expand Down Expand Up @@ -2803,7 +2803,7 @@ def parse_image_meta_graph(meta):


def mold_image(images, config):
"""Expects an RGB image (or array of images) and subtraces
"""Expects an RGB image (or array of images) and subtracts
the mean pixel and converts it to float. Expects image
colors in RGB order.
"""
Expand All @@ -2820,7 +2820,7 @@ def unmold_image(normalized_images, config):
############################################################

def trim_zeros_graph(boxes, name=None):
"""Often boxes are represented with matricies of shape [N, 4] and
"""Often boxes are represented with matrices of shape [N, 4] and
are padded with zeros. This removes zero boxes.
boxes: [N, 4] matrix of boxes.
Expand Down

0 comments on commit 89629ed

Please sign in to comment.