Skip to content

Commit

Permalink
bgr to rgb format when using cv2
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 27, 2023
1 parent dfd79cf commit 286d4de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions magvit2_pytorch/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def video_to_tensor(
frames_torch = torch.tensor(frames).float()

frames_torch /= 255.
frames_torch = frames_torch.flip(dims = (0,)) # BGR -> RGB format

return frames_torch[:, :num_frames, :, :]

Expand Down
2 changes: 1 addition & 1 deletion magvit2_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.41'
__version__ = '0.1.42'

0 comments on commit 286d4de

Please sign in to comment.