Commit 4cfd45f7 authored by Kai Chen's avatar Kai Chen
Browse files

minor fix

parent 6d623cf1
......@@ -16,7 +16,6 @@ video
--------------
.. automodule:: mmcv.video
:members:
:exclude-members: VideoWriter_fourcc
arraymisc
--------------
......
......@@ -109,7 +109,7 @@ def bbox_scaling(bboxes, scale, clip_shape=None):
return scaled_bboxes
def imcrop(img, bboxes, scale_ratio=1.0, pad_fill=None):
def imcrop(img, bboxes, scale=1.0, pad_fill=None):
"""Crop image patches.
3 steps: scale the bboxes -> clip bboxes -> crop and pad.
......@@ -117,7 +117,7 @@ def imcrop(img, bboxes, scale_ratio=1.0, pad_fill=None):
Args:
img (ndarray): Image to be cropped.
bboxes (ndarray): Shape (k, 4) or (4, ), location of cropped bboxes.
scale_ratio (float, optional): Scale ratio of bboxes, the default value
scale (float, optional): Scale ratio of bboxes, the default value
1.0 means no padding.
pad_fill (number or list): Value to be filled for padding, None for
no padding.
......@@ -132,7 +132,7 @@ def imcrop(img, bboxes, scale_ratio=1.0, pad_fill=None):
assert len(pad_fill) == chn
_bboxes = bboxes[None, ...] if bboxes.ndim == 1 else bboxes
scaled_bboxes = bbox_scaling(_bboxes, scale_ratio).astype(np.int32)
scaled_bboxes = bbox_scaling(_bboxes, scale).astype(np.int32)
clipped_bbox = bbox_clip(scaled_bboxes, img.shape)
patches = []
......
......@@ -381,6 +381,7 @@ class Runner(object):
"""Register default hooks for training.
Default hooks include:
- LrUpdaterHook
- OptimizerStepperHook
- CheckpointSaverHook
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment