ee602b6f68f0bdd19f449a86955697f8f0a2d54c,gluoncv/data/transforms/video.py,VideoCenterCrop,forward,#VideoCenterCrop#Any#,250
Before Change
y1 = int(round((h - th) / 2.))
scaled_clips = nd.zeros((th, tw, c))
num_imgs = int(c / 3)
for frame_id in range(num_imgs):
cur_img = clips[:, :, frame_id*3:frame_id*3+3]
crop_img = cur_img[y1:y1+th, x1:x1+tw, :]
assert(crop_img.shape == (th, tw, 3))
scaled_clips[:, :, frame_id*3:frame_id*3+3] = crop_img
return scaled_clips
class VideoTenCrop(Block):
Crop 10 regions from an array.
After Change
y1 = int(round((h - th) / 2.))
new_clips = []
for cur_img in clips:
new_clips.append(cur_img[y1:y1+th, x1:x1+tw, :])
return new_clips
class VideoThreeCrop(Block):
This method crops 3 regions. All regions will be in shape
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: dmlc/gluon-cv
Commit Name: ee602b6f68f0bdd19f449a86955697f8f0a2d54c
Time: 2019-09-21
Author: yizhu59@gmail.com
File Name: gluoncv/data/transforms/video.py
Class Name: VideoCenterCrop
Method Name: forward
Project Name: dmlc/gluon-cv
Commit Name: fdd55d36c05c747643fc98430a7f9b787b6cec16
Time: 2019-08-29
Author: yizhu59@gmail.com
File Name: gluoncv/data/transforms/video.py
Class Name: VideoCenterCrop
Method Name: forward
Project Name: dmlc/gluon-cv
Commit Name: fdd55d36c05c747643fc98430a7f9b787b6cec16
Time: 2019-08-29
Author: yizhu59@gmail.com
File Name: gluoncv/data/transforms/video.py
Class Name: VideoMultiScaleCrop
Method Name: forward