From 71da8734ea9a049eb7bc3ad028e65a00529b7773 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:19:56 -0700 Subject: [PATCH 01/16] Fix typos: `achitectures` | `architectures` `architectores` | `architectures` `apears` | `appears` --- lib/cmake/Cuda.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cmake/Cuda.cmake b/lib/cmake/Cuda.cmake index dfbd3d4a3..33eb773ed 100644 --- a/lib/cmake/Cuda.cmake +++ b/lib/cmake/Cuda.cmake @@ -4,8 +4,8 @@ # This cmake file is called from Dependencies.cmake. You do not need to # manually invoke it. -# Known NVIDIA GPU achitectures Caffe2 can be compiled for. -# Default is set to cuda 9. If we detect the cuda architectores to be less than +# Known NVIDIA GPU architectures Caffe2 can be compiled for. +# Default is set to cuda 9. If we detect the cuda architectures to be less than # 9, we will lower it to the corresponding known archs. set(Caffe2_known_gpu_archs "30 35 50 52 60 61 70") # for CUDA 9.x set(Caffe2_known_gpu_archs8 "20 21(20) 30 35 50 52 60 61") # for CUDA 8.x @@ -197,7 +197,7 @@ else() message(FATAL_ERROR "Cannot find libnvrtc.so. Please file an issue on https://github.com/caffe2/caffe2 with your build output.") endif() -# disable some nvcc diagnostic that apears in boost, glog, glags, opencv, etc. +# disable some nvcc diagnostic that appears in boost, glog, glags, opencv, etc. foreach(diag cc_clobber_ignored integer_sign_change useless_using_declaration set_but_not_used) list(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=${diag}) endforeach() From d8ca67ca40c2494910fa2c25f79302fd4a9b0a8a Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:21:03 -0700 Subject: [PATCH 02/16] Fix typos: `Eeach` | `Each` `realtive` | `relative` `Infered` | `Inferred` `infering` | `inferring` `DEPCRECATED` | `DEPRECATED` --- lib/core/config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/config.py b/lib/core/config.py index f6dc18279..190141e55 100644 --- a/lib/core/config.py +++ b/lib/core/config.py @@ -394,7 +394,7 @@ __C.TEST.KPS_AUG.SCALE_SIZE_DEP = False __C.TEST.KPS_AUG.AREA_TH = 180**2 -# Eeach aspect ratio is realtive to image width +# Each aspect ratio is relative to image width __C.TEST.KPS_AUG.ASPECT_RATIOS = () # Horizontal flip at each aspect ratio @@ -663,7 +663,7 @@ # ---------------------------------------------------------------------------- # __C.RPN = AttrDict() -# [Infered value; do not set directly in a config] +# [Inferred value; do not set directly in a config] # Indicates that the model contains an RPN subnetwork __C.RPN.RPN_ON = False @@ -836,7 +836,7 @@ # the minibatch is discarded) __C.KRCNN.MIN_KEYPOINT_COUNT_FOR_VALID_MINIBATCH = 20 -# When infering the keypoint locations from the heatmap, don't scale the heatmap +# When inferring the keypoint locations from the heatmap, don't scale the heatmap # below this minimum size __C.KRCNN.INFERENCE_MIN_SIZE = 0 @@ -972,7 +972,7 @@ # If an option is removed from the code and you don't want to break existing # yaml configs, you can add the full config key as a string to the set below. # ---------------------------------------------------------------------------- # -_DEPCRECATED_KEYS = set( +_DEPRECATED_KEYS = set( ( 'FINAL_MSG', 'MODEL.DILATION', @@ -1118,7 +1118,7 @@ def _merge_a_into_b(a, b, stack=None): def _key_is_deprecated(full_key): - if full_key in _DEPCRECATED_KEYS: + if full_key in _DEPRECATED_KEYS: logger.warn( 'Deprecated config key (ignoring): {}'.format(full_key) ) From d0b2bb1d503f54bcc487710a5dc1038fb5a7382e Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:21:48 -0700 Subject: [PATCH 03/16] Fix typo: `detectionon` | `detection on` --- lib/core/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/test.py b/lib/core/test.py index 2a8e206a6..39efe8762 100644 --- a/lib/core/test.py +++ b/lib/core/test.py @@ -704,7 +704,7 @@ def im_detect_keypoints_aspect_ratio( ): """Detects keypoints at the given width-relative aspect ratio.""" - # Perform keypoint detectionon the transformed image + # Perform keypoint detection on the transformed image im_ar = image_utils.aspect_ratio_rel(im, aspect_ratio) boxes_ar = box_utils.aspect_ratio(boxes, aspect_ratio) From eee75d2f794c1bc9c84b351b2e15fb8b3afafaf0 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:22:09 -0700 Subject: [PATCH 04/16] Fix typo: `porposals` | `proposals` --- lib/modeling/detector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modeling/detector.py b/lib/modeling/detector.py index e62558a2e..ff7d9c782 100644 --- a/lib/modeling/detector.py +++ b/lib/modeling/detector.py @@ -102,7 +102,7 @@ def AffineChannel(self, blob_in, blob_out, share_with=None, inplace=False): return self.net.AffineChannel([blob_in, scale, bias], blob_out) def GenerateProposals(self, blobs_in, blobs_out, anchors, spatial_scale): - """Op for generating RPN porposals. + """Op for generating RPN proposals. blobs_in: - 'rpn_cls_probs': 4D tensor of shape (N, A, H, W), where N is the From c5c85a39bf3bd031eee1e261b08e3c6be735f923 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:22:31 -0700 Subject: [PATCH 05/16] Fix typo: `revsersed` | `reversed` --- lib/modeling/FPN.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modeling/FPN.py b/lib/modeling/FPN.py index ddf0f7dac..81bf09294 100644 --- a/lib/modeling/FPN.py +++ b/lib/modeling/FPN.py @@ -96,7 +96,7 @@ def add_fpn_onto_conv_body( ): """Add the specified conv body to the model and then add FPN levels to it. """ - # Note: blobs_conv is in revsersed order: [fpn5, fpn4, fpn3, fpn2] + # Note: blobs_conv is in reversed order: [fpn5, fpn4, fpn3, fpn2] # similarly for dims_conv: [2048, 1024, 512, 256] # similarly for spatial_scales_fpn: [1/32, 1/16, 1/8, 1/4] From 037eca413e25ade7eb4802cb315f3bc0a7dafc38 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:22:47 -0700 Subject: [PATCH 06/16] Fix typo: `relevent` | `relevant` --- lib/modeling/name_compat.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/modeling/name_compat.py b/lib/modeling/name_compat.py index 7899ea6e0..084eeb65d 100644 --- a/lib/modeling/name_compat.py +++ b/lib/modeling/name_compat.py @@ -38,16 +38,16 @@ _RENAME = { - # Removed "ResNet_" from the name because it wasn't relevent + # Removed "ResNet_" from the name because it wasn't relevant 'mask_rcnn_heads.ResNet_mask_rcnn_fcn_head_v1up4convs': 'mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs', - # Removed "ResNet_" from the name because it wasn't relevent + # Removed "ResNet_" from the name because it wasn't relevant 'mask_rcnn_heads.ResNet_mask_rcnn_fcn_head_v1up': 'mask_rcnn_heads.mask_rcnn_fcn_head_v1up', - # Removed "ResNet_" from the name because it wasn't relevent + # Removed "ResNet_" from the name because it wasn't relevant 'mask_rcnn_heads.ResNet_mask_rcnn_fcn_head_v0upshare': 'mask_rcnn_heads.mask_rcnn_fcn_head_v0upshare', - # Removed "ResNet_" from the name because it wasn't relevent + # Removed "ResNet_" from the name because it wasn't relevant 'mask_rcnn_heads.ResNet_mask_rcnn_fcn_head_v0up': 'mask_rcnn_heads.mask_rcnn_fcn_head_v0up', # Removed head_builder module in favor of the more specific fast_rcnn name From 74b3186b84ad4dd6af254724ffa08e2f187e9431 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:23:28 -0700 Subject: [PATCH 07/16] Fix typos: `achors` | `anchors` `Broacast` | `Broadcast` --- lib/ops/generate_proposals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ops/generate_proposals.py b/lib/ops/generate_proposals.py index 350225c42..8d49977fb 100644 --- a/lib/ops/generate_proposals.py +++ b/lib/ops/generate_proposals.py @@ -55,7 +55,7 @@ def forward(self, inputs, outputs): # predicted probability of fg object for each RPN anchor scores = inputs[0].data - # predicted achors transformations + # predicted anchors transformations bbox_deltas = inputs[1].data # input image (height, width, scale), in which scale is the scale factor # applied to the original dataset image to get the network input image @@ -71,7 +71,7 @@ def forward(self, inputs, outputs): shifts = np.vstack((shift_x.ravel(), shift_y.ravel(), shift_x.ravel(), shift_y.ravel())).transpose() - # Broacast anchors over shifts to enumerate all anchors at all positions + # Broadcast anchors over shifts to enumerate all anchors at all positions # in the (H, W) grid: # - add A anchors of shape (1, A, 4) to # - K shifts of shape (K, 1, 4) to get From b7233393009d3c8078fd3b1c1801ca395ff048de Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:23:57 -0700 Subject: [PATCH 08/16] Fix typos: `minibtach` | `minibatch` `Broacast` | `Broadcast` --- lib/roi_data/data_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roi_data/data_utils.py b/lib/roi_data/data_utils.py index 076f963d4..695b98465 100644 --- a/lib/roi_data/data_utils.py +++ b/lib/roi_data/data_utils.py @@ -13,7 +13,7 @@ # limitations under the License. ############################################################################## -"""Common utility functions for RPN and RetinaNet minibtach blobs preparation. +"""Common utility functions for RPN and RetinaNet minibatch blobs preparation. """ from __future__ import absolute_import @@ -76,7 +76,7 @@ def get_field_of_anchors( shift_y = shift_y.ravel() shifts = np.vstack((shift_x, shift_y, shift_x, shift_y)).transpose() - # Broacast anchors over shifts to enumerate all anchors at all positions + # Broadcast anchors over shifts to enumerate all anchors at all positions # in the (H, W) grid: # - add A cell anchors of shape (1, A, 4) to # - K shifts of shape (K, 1, 4) to get From 43cb9b920ed153c8af79c28ef73f9b67386397b4 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:24:25 -0700 Subject: [PATCH 09/16] Fix typos: `respecitive` | `respective` `sepcifies` | `specifies` --- lib/roi_data/fast_rcnn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roi_data/fast_rcnn.py b/lib/roi_data/fast_rcnn.py index d76566a33..696789a87 100644 --- a/lib/roi_data/fast_rcnn.py +++ b/lib/roi_data/fast_rcnn.py @@ -15,7 +15,7 @@ """Construct minibatches for Fast R-CNN training. Handles the minibatch blobs that are specific to Fast R-CNN. Other blobs that are generic to RPN, etc. -are handled by their respecitive roi_data modules. +are handled by their respective roi_data modules. """ from __future__ import absolute_import @@ -52,7 +52,7 @@ def get_fast_rcnn_blob_names(is_training=True): # targets per class blob_names += ['bbox_targets'] # bbox_inside_weights blob: At most 4 targets per roi are active - # this binary vector sepcifies the subset of active targets + # this binary vector specifies the subset of active targets blob_names += ['bbox_inside_weights'] blob_names += ['bbox_outside_weights'] if is_training and cfg.MODEL.MASK_ON: From fb1685d08d3afe072a73677d5813066e27c1c175 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:24:53 -0700 Subject: [PATCH 10/16] Fix typo: `respecitive` | `respective` --- lib/roi_data/keypoint_rcnn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roi_data/keypoint_rcnn.py b/lib/roi_data/keypoint_rcnn.py index 465e20d32..d800330d0 100644 --- a/lib/roi_data/keypoint_rcnn.py +++ b/lib/roi_data/keypoint_rcnn.py @@ -16,7 +16,7 @@ """Construct minibatches for Mask R-CNN training when keypoints are enabled. Handles the minibatch blobs that are specific to training Mask R-CNN for keypoint detection. Other blobs that are generic to RPN or Fast/er R-CNN are -handled by their respecitive roi_data modules. +handled by their respective roi_data modules. """ from __future__ import absolute_import From 4d91d5933d393a9609c5aafdcb25fc9df54a1476 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:25:14 -0700 Subject: [PATCH 11/16] Fix typo: `respecitive` | `respective` --- lib/roi_data/mask_rcnn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roi_data/mask_rcnn.py b/lib/roi_data/mask_rcnn.py index 147063e91..b9a9f10cc 100644 --- a/lib/roi_data/mask_rcnn.py +++ b/lib/roi_data/mask_rcnn.py @@ -15,7 +15,7 @@ """Construct minibatches for Mask R-CNN training. Handles the minibatch blobs that are specific to Mask R-CNN. Other blobs that are generic to RPN or -Fast/er R-CNN are handled by their respecitive roi_data modules. +Fast/er R-CNN are handled by their respective roi_data modules. """ from __future__ import absolute_import From b3eb2a477e39fa6249284497927d6ce02489d479 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:25:46 -0700 Subject: [PATCH 12/16] Fix typos: `specfic` | `specific` `curret` | `current` --- lib/roi_data/retinanet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roi_data/retinanet.py b/lib/roi_data/retinanet.py index 20d12852d..4b4a11b95 100644 --- a/lib/roi_data/retinanet.py +++ b/lib/roi_data/retinanet.py @@ -130,7 +130,7 @@ def add_retinanet_blobs(blobs, im_scales, roidb, image_width, image_height): loc_stride *= (cfg.MODEL.NUM_CLASSES - 1) anchor_ind = foa.octave * num_aspect_ratios + foa.aspect # v[:, 1] is the class label [range 0-80] if we do - # class-specfic bbox otherwise it is 0. In case of class + # class-specific bbox otherwise it is 0. In case of class # specific, based on the label, the location of current # anchor is class_label * 4 and then we take into account # the anchor_ind if the anchors @@ -153,7 +153,7 @@ def add_retinanet_blobs(blobs, im_scales, roidb, image_width, image_height): # and length of this list is N x A where # N = num_images, A = num_anchors for example, N = 2, A = 9 # Each element of the list has the shape 1 x 1 x H x W where H, W are - # spatial dimension of curret fpn lvl. Let a{i} denote the element + # spatial dimension of current fpn lvl. Let a{i} denote the element # corresponding to anchor i [9 anchors total] in the list. # The elements in the list are in order [[a0, ..., a9], [a0, ..., a9]] # however the network will make predictions like 2 x (9 * 80) x H x W From 89c0374db6210879ef3384e91836359fa26972d5 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:26:08 -0700 Subject: [PATCH 13/16] Fix typo: `coorespondence` | `correspondence` --- lib/utils/keypoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/keypoints.py b/lib/utils/keypoints.py index c7caa1c03..d53998c87 100644 --- a/lib/utils/keypoints.py +++ b/lib/utils/keypoints.py @@ -28,7 +28,7 @@ def get_keypoints(): - """Get the COCO keypoints and their left/right flip coorespondence map.""" + """Get the COCO keypoints and their left/right flip correspondence map.""" # Keypoints are not available in the COCO json for the test split, so we # provide them here. keypoints = [ From b9d0ce51ed63a565aed4e965cc69f32287f780f4 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:26:28 -0700 Subject: [PATCH 14/16] Fix typo: `mininum` | `minimum` --- lib/utils/segms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/segms.py b/lib/utils/segms.py index 9b0804dd7..d2264284d 100644 --- a/lib/utils/segms.py +++ b/lib/utils/segms.py @@ -199,7 +199,7 @@ def rle_mask_nms(masks, dets, thresh, mode='IOU'): """Performs greedy non-maximum suppression based on an overlap measurement between masks. The type of measurement is determined by `mode` and can be either 'IOU' (standard intersection over union) or 'IOMA' (intersection over - mininum area). + minimum area). """ if len(masks) == 0: return [] From 4bfba71ccb249b1bca8ab26feba4010aaa9224db Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:26:45 -0700 Subject: [PATCH 15/16] Fix typo: `orignal` | `original` --- tools/pickle_caffe_blobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pickle_caffe_blobs.py b/tools/pickle_caffe_blobs.py index af6bf2bae..6f30c54d9 100644 --- a/tools/pickle_caffe_blobs.py +++ b/tools/pickle_caffe_blobs.py @@ -16,7 +16,7 @@ ############################################################################## """Script for converting Caffe (<= 1.0) models into the the simple state dict -format used by Detectron. For example, this script can convert the orignal +format used by Detectron. For example, this script can convert the original ResNet models released by MSRA. """ From 1b3494ccde5e710b6c7df78d1f7c1ab00b0bc498 Mon Sep 17 00:00:00 2001 From: delirious-lettuce Date: Tue, 23 Jan 2018 11:27:03 -0700 Subject: [PATCH 16/16] Fix typo: `reasonble` | `reasonable` --- tools/train_net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/train_net.py b/tools/train_net.py index ea4c35f2a..3207ec139 100755 --- a/tools/train_net.py +++ b/tools/train_net.py @@ -189,7 +189,7 @@ def main(): logger.info(pprint.pformat(cfg)) # Note that while we set the numpy random seed network training will not be # deterministic in general. There are sources of non-determinism that cannot - # be removed with a reasonble execution-speed tradeoff (such as certain + # be removed with a reasonable execution-speed tradeoff (such as certain # non-deterministic cudnn functions). np.random.seed(cfg.RNG_SEED) # Execute the training run