Skip to content

Commit 5637dbe

Browse files
dependency version updates (#324)
1 parent 073a1db commit 5637dbe

File tree

8 files changed

+193
-172
lines changed

8 files changed

+193
-172
lines changed

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ sphinx-design
77
aniposelib
88
h5py
99
hydra-core
10-
imgaug
10+
imaug
1111
kaleido
1212
kornia
1313
lightning
1414
matplotlib
15-
moviepy<2.0.0
16-
numpy<2.0.0
15+
moviepy>=2.0.0
16+
numpy>=2.0.0
1717
opencv-python
1818
pandas
1919
pillow

lightning_pose/utils/cropzoom.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66
import pandas as pd
77
import tqdm
8-
from moviepy.editor import VideoFileClip
8+
from moviepy import VideoFileClip
99
from omegaconf import DictConfig
1010
from PIL import Image
1111
from typeguard import typechecked
@@ -210,8 +210,7 @@ def crop_frame(get_frame, t):
210210

211211
return cv2.resize(cropped_frame, (w, h))
212212

213-
# renamed image_transform in 2.0.0
214-
cropped_clip = clip.fl(crop_frame, apply_to="mask")
213+
cropped_clip = clip.transform(crop_frame, apply_to="mask")
215214

216215
cropped_clip.write_videofile(str(output_file), codec="libx264")
217216

lightning_pose/utils/predictions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import numpy as np
1616
import pandas as pd
1717
import torch
18-
from moviepy.editor import VideoFileClip
18+
from moviepy import VideoFileClip
1919
from omegaconf import DictConfig, OmegaConf
2020
from torchtyping import TensorType
2121
from typeguard import typechecked
@@ -703,7 +703,7 @@ def create_labeled_video(
703703
upsample_factor = 1
704704

705705
if upsample_factor > 1:
706-
clip = clip.resize((upsample_factor * nx, upsample_factor * ny))
706+
clip = clip.resized((upsample_factor * nx, upsample_factor * ny))
707707
nx, ny = clip.size
708708

709709
print(f"Duration of video [s]: {np.round(dur, 2)}, recorded at {np.round(fps_og, 2)} fps!")
@@ -783,7 +783,7 @@ def add_marker_and_timestamps(get_frame, t):
783783
)
784784
return frame
785785

786-
clip_marked = clip.fl(add_marker_and_timestamps)
786+
clip_marked = clip.transform(add_marker_and_timestamps)
787787
clip_marked.write_videofile(
788788
output_video_path, codec="libx264", fps=fps or fps_og or 20.0
789789
)

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[project]
66
name = "lightning-pose"
7-
version = "2.0.0"
7+
version = "2.0.1"
88
description = "Semi-supervised pose estimation using pytorch lightning"
99
license = "MIT"
1010
readme = "README.md"
@@ -34,13 +34,13 @@ dependencies = [
3434
"aniposelib",
3535
"h5py",
3636
"hydra-core",
37-
"imgaug",
37+
"imaug",
3838
"kaleido",
3939
"kornia",
4040
"lightning",
4141
"matplotlib",
42-
"moviepy (<2.0.0)",
43-
"numpy (<2.0.0)",
42+
"moviepy (>=2.0.0)",
43+
"numpy (>=2.0.0)",
4444
"opencv-python-headless",
4545
"pandas (>=2.0.0)",
4646
"pillow",

tests/api/test_model.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def test_predict_on_video_file_singleview(tmp_path, request, toy_data_dir):
103103

104104
# Test labeled_video generation.
105105
model.predict_on_video_file(
106-
Path(toy_data_dir) / "videos" / "test_vid.mp4", generate_labeled_video=True
106+
Path(toy_data_dir) / "videos" / "test_vid.mp4",
107+
generate_labeled_video=True,
107108
)
108109
assert (model.labeled_videos_dir() / "test_vid_labeled.mp4").is_file()
109110

@@ -113,7 +114,8 @@ def test_predict_on_video_file_method_multiview_model(tmp_path, request, toy_mda
113114

114115
# Test prediction on a test video.
115116
model.predict_on_video_file(
116-
Path(toy_mdata_dir) / "videos" / "test_vid_top.mp4", generate_labeled_video=True
117+
Path(toy_mdata_dir) / "videos" / "test_vid_top.mp4",
118+
generate_labeled_video=True,
117119
)
118120
assert (model.video_preds_dir() / "test_vid_top.csv").is_file()
119121
assert (model.video_preds_dir() / "test_vid_top_temporal_norm.csv").is_file()

0 commit comments

Comments
 (0)