Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on ruff linter, fix final 7 bugs #78

Merged
merged 6 commits into from
Jul 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fill in missing T
sritchie committed Jul 24, 2024
commit d90f80d4537a258988baba79378eba193771af12
12 changes: 11 additions & 1 deletion src/b3d/io/utils.py
Original file line number Diff line number Diff line change
@@ -173,6 +173,14 @@ def video_input_from_mp4(
reverse_color_channel=False,
):
info = load_video_info(video_fname)

if info is None:
return None

if times is None:
T = info.timesteps
times = np.arange(T, step=step)

intr = np.load(intrinsics_fname, allow_pickle=True)
vid = load_video_to_numpy(
video_fname,
@@ -181,7 +189,9 @@ def video_input_from_mp4(
reverse_color_channel=reverse_color_channel,
)

return VideoInput(rgb=vid, camera_intrinsics_rgb=intr, fps=info.fps)
fps = info.fps / (times[1] - times[0])

return VideoInput(rgb=vid, camera_intrinsics_rgb=intr, fps=fps)


def plot_video_summary(