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

Fix failing densepose tests #297

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ tests = [
"wheel",
]
densepose = [
"torch<2.1.0", # densepose broken after 2.1.0; https://github.com/facebookresearch/detectron2/issues/5110
"detectron2-densepose @ git+https://github.com/facebookresearch/detectron2@main#subdirectory=projects/DensePose"
]

Expand Down
12 changes: 10 additions & 2 deletions tests/test_densepose.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def test_image(model, chimp_image_path, tmp_path):
)

# output to disk
assert anatomy_info.shape == (2, 44)
assert anatomy_info.shape in [
(2, 44),
(1, 44),
] # depends on number of chimps identified; varies by version
assert (anatomy_info > 0).any().any()
assert (tmp_path / f"anatomized_{model}.csv").stat().st_size > 0

Expand Down Expand Up @@ -106,7 +109,12 @@ def test_video(model, chimp_video_path, tmp_path):
)

# output to disk
assert anatomy_info.shape == (10, 46)
assert anatomy_info.shape[0] in [
8,
9,
10,
] # depends on number of chimps identified; varies by version
assert anatomy_info.shape[1] == 46
assert (anatomy_info > 0).any().any()
assert (tmp_path / f"anatomized_{model}.csv").stat().st_size > 0

Expand Down
Loading