提交 89629ed9 编写于 作者: C Corey Hu 提交者: Waleed

spellcheck config.py

上级 8075ecc1
......@@ -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]
......@@ -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.
......@@ -2101,10 +2101,10 @@ class MaskRCNN():
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
......@@ -2238,7 +2238,7 @@ class MaskRCNN():
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__))
......@@ -2306,7 +2306,7 @@ class MaskRCNN():
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),
......@@ -2385,10 +2385,10 @@ class MaskRCNN():
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
......@@ -2550,7 +2550,7 @@ class MaskRCNN():
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
......@@ -2678,7 +2678,7 @@ class MaskRCNN():
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.
......@@ -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.
"""
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册