Skip to content

Commit

Permalink
handle 720p with dali
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassine Benzakour committed May 27, 2024
1 parent c91d7ae commit 0c17d6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ rny002_gsm
lightning_logs
run.sbatch
*.out
datasets_jsons/*
environment.yml


log/*
Expand Down
9 changes: 6 additions & 3 deletions oslactionspotting/datasets/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,9 @@ def video_pipe(
video (torch.tensor): The frames processed.
label : the list of labels (corresponding to events) corresponding with the extracted frames.
"""
video, label, frame_num = fn.readers.video(
video, label, frame_num = fn.readers.video_resize(
device="gpu",
size=(TARGET_HEIGHT,TARGET_WIDTH),
file_list=file_list,
sequence_length=sequence_length,
random_shuffle=True,
Expand Down Expand Up @@ -1440,8 +1441,9 @@ def video_pipe(
video (torch.tensor): The frames processed.
label : the index of the clip in the list of clips.
"""
video, label = fn.readers.video(
video, label = fn.readers.video_resize(
device="gpu",
size=(TARGET_HEIGHT,TARGET_WIDTH),
file_list=file_list,
sequence_length=sequence_length,
random_shuffle=False,
Expand All @@ -1456,7 +1458,6 @@ def video_pipe(
skip_vfr_check=True,
)

# video = fn.resize(size=(224,398))
video = fn.crop_mirror_normalize(
video,
dtype=types.FLOAT,
Expand All @@ -1468,3 +1469,5 @@ def video_pipe(
)

return video, label
def get_dims(video):
print(video.shape)

0 comments on commit 0c17d6d

Please sign in to comment.