Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liyinshuo committed May 12, 2021
1 parent 8a3b37d commit ab64e55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mmedit/datasets/pipelines/crop.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mmcv
import numpy as np
from PIL.Image import NONE
from torch.nn.modules.utils import _pair

from ..registry import PIPELINES
Expand Down Expand Up @@ -537,15 +536,16 @@ def __call__(self, results):

@PIPELINES.register_module()
class CropLike:
"""Crop/pad a key according to the size of another key.
"""Crop/pad the image in the target_key according to the size of image
in the reference_key .
Args:
target_key (str): The key needs to be cropped.
reference_key (str | None): The reference key, need its size.
Default: None.
"""

def __init__(self, target_key, reference_key=NONE):
def __init__(self, target_key, reference_key=None):

assert reference_key and target_key
self.target_key = target_key
Expand Down

0 comments on commit ab64e55

Please sign in to comment.