ee602b6f68f0bdd19f449a86955697f8f0a2d54c,gluoncv/data/transforms/video.py,VideoNormalize,forward,#VideoNormalize#Any#,69
Before Change
def forward(self, clips):
c, _, _ = clips.shape
num_images = int(c / 3)
clip_mean = self.mean * num_images
clip_std = self.std * num_images
clip_mean = nd.array(np.asarray(clip_mean).reshape((c, 1, 1)))
clip_std = nd.array(np.asarray(clip_std).reshape((c, 1, 1)))
return (clips - clip_mean) / clip_std
class VideoRandomHorizontalFlip(Block):
After Change
self.std = np.asarray(std).reshape((len(std), 1, 1))
def forward(self, clips):
new_clips = []
for cur_img in clips:
new_clips.append((cur_img - self.mean) / self.std)
return new_clips
class VideoRandomHorizontalFlip(Block):
Randomly flip the images left to right with a probability.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
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: VideoNormalize
Method Name: forward
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: VideoMultiScaleCrop
Method Name: forward
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