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

minor fix

parent 6d623cf1
...@@ -16,7 +16,6 @@ video ...@@ -16,7 +16,6 @@ video
-------------- --------------
.. automodule:: mmcv.video .. automodule:: mmcv.video
:members: :members:
:exclude-members: VideoWriter_fourcc
arraymisc arraymisc
-------------- --------------
......
...@@ -109,7 +109,7 @@ def bbox_scaling(bboxes, scale, clip_shape=None): ...@@ -109,7 +109,7 @@ def bbox_scaling(bboxes, scale, clip_shape=None):
return scaled_bboxes 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. """Crop image patches.
3 steps: scale the bboxes -> clip bboxes -> crop and pad. 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): ...@@ -117,7 +117,7 @@ def imcrop(img, bboxes, scale_ratio=1.0, pad_fill=None):
Args: Args:
img (ndarray): Image to be cropped. img (ndarray): Image to be cropped.
bboxes (ndarray): Shape (k, 4) or (4, ), location of cropped bboxes. 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. 1.0 means no padding.
pad_fill (number or list): Value to be filled for padding, None for pad_fill (number or list): Value to be filled for padding, None for
no padding. no padding.
...@@ -132,7 +132,7 @@ def imcrop(img, bboxes, scale_ratio=1.0, pad_fill=None): ...@@ -132,7 +132,7 @@ def imcrop(img, bboxes, scale_ratio=1.0, pad_fill=None):
assert len(pad_fill) == chn assert len(pad_fill) == chn
_bboxes = bboxes[None, ...] if bboxes.ndim == 1 else bboxes _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) clipped_bbox = bbox_clip(scaled_bboxes, img.shape)
patches = [] patches = []
......
...@@ -381,6 +381,7 @@ class Runner(object): ...@@ -381,6 +381,7 @@ class Runner(object):
"""Register default hooks for training. """Register default hooks for training.
Default hooks include: Default hooks include:
- LrUpdaterHook - LrUpdaterHook
- OptimizerStepperHook - OptimizerStepperHook
- CheckpointSaverHook - 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