def randomflip(self, buffer):
"""Horizontally flip the given image and ground truth randomly with a probability of 0.5."""
if np.random.random() < 0.5:
for i, frame in enumerate(buffer):
frame = cv2.flip(buffer[i], flipCode=1)
buffer[i] = cv2.flip(frame, flipCode=1)
return buffer
Flip the frame horizontally first, but flip the frame horizontally again in the buffer[i]. Wouldn't that have no effect?
https://github.com/jfzhang95/pytorch-video-recognition/blob/master/dataloaders/dataset.py#L198
Flip the
frame
horizontally first, but flip theframe
horizontally again in the buffer[i]. Wouldn't that have no effect?