Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions slowfast/datasets/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def random_short_side_scale_jitter(
corresponding boxes.
Args:
images (tensor): images to perform scale jitter. Dimension is
`num frames` x `channel` x `height` x `width`.
`channel` x `num frames` x `height` x `width`.
Comment thread
Zehui-Lin marked this conversation as resolved.
min_size (int): the minimal size to scale the frames.
max_size (int): the maximal size to scale the frames.
boxes (ndarray): optional. Corresponding boxes to images.
Expand Down Expand Up @@ -120,7 +120,7 @@ def random_crop(images, size, boxes=None):
Perform random spatial crop on the given images and corresponding boxes.
Args:
images (tensor): images to perform random crop. The dimension is
`num frames` x `channel` x `height` x `width`.
`channel` x `num frames` x `height` x `width`.
Comment thread
Zehui-Lin marked this conversation as resolved.
size (int): the size of height and width to crop on the image.
boxes (ndarray or None): optional. Corresponding boxes to images.
Dimension is `num boxes` x 4.
Expand Down Expand Up @@ -157,12 +157,12 @@ def horizontal_flip(prob, images, boxes=None):
Args:
prob (float): probility to flip the images.
images (tensor): images to perform horizontal flip, the dimension is
`num frames` x `channel` x `height` x `width`.
`channel` x `num frames` x `height` x `width`.
boxes (ndarray or None): optional. Corresponding boxes to images.
Dimension is `num boxes` x 4.
Returns:
images (tensor): images with dimension of
`num frames` x `channel` x `height` x `width`.
`channel` x `num frames` x `height` x `width`.
flipped_boxes (ndarray or None): the flipped boxes with dimension of
`num boxes` x 4.
"""
Expand Down
2 changes: 1 addition & 1 deletion slowfast/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def spatial_sampling(
with the given spatial_idx.
Args:
frames (tensor): frames of images sampled from the video. The
dimension is `num frames` x `height` x `width` x `channel`.
dimension is `channel` x `num frames` x `height` x `width`.
spatial_idx (int): if -1, perform random spatial sampling. If 0, 1,
or 2, perform left, center, right crop if width is larger than
height, and perform top, center, buttom crop if height is larger
Expand Down