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 opencv 4.5.2 compatibility #635

Merged
merged 2 commits into from
May 11, 2021

Conversation

ly015
Copy link
Member

@ly015 ly015 commented May 10, 2021

  • opencv-python 4.5.2 compatibility
    BottomUpRandomAffine fails with opencv-python>=4.5.2 because a
    single valued numpy.ndarray is no longer a valid data type for
    image_size in cv2.warpAffine. This commit fix it by repacing
    image_size with image_size.item().

  • smplx 0.1.27 compatibility
    smplx>=0.1.27 requires loguru, which will not be automatically installed
    when installing smplx. So we add loguru into mmpose requirements.

BottomUpRandomAffine fails with opencv-python>=4.5.2 because a \
single valued numpy.ndarray is no longer a valid data type for \
image_size in cv2.warpAffine. This commit fix it by repacing   \
image_size with image_size.item().
@ly015 ly015 mentioned this pull request May 10, 2021
@ly015 ly015 requested a review from zengwang430521 May 10, 2021 13:10
@@ -1,4 +1,5 @@
albumentations>=0.3.2
loguru
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zengwang430521 Do you think we should add loguru into requirements to support smplx>=0.1.27, or just limit smplx==0.1.26?

Copy link
Collaborator

@zengwang430521 zengwang430521 May 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update smplx to 0.1.27. I think this updating will not change the performance.

@codecov
Copy link

codecov bot commented May 10, 2021

Codecov Report

Merging #635 (d65ebf0) into master (b0acfc4) will decrease coverage by 0.15%.
The diff coverage is 100.00%.

❗ Current head d65ebf0 differs from pull request most recent head 2e512cc. Consider uploading reports for the commit 2e512cc to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #635      +/-   ##
==========================================
- Coverage   82.51%   82.35%   -0.16%     
==========================================
  Files         167      167              
  Lines       11992    11872     -120     
  Branches     1927     1927              
==========================================
- Hits         9895     9777     -118     
+ Misses       1620     1618       -2     
  Partials      477      477              
Flag Coverage Δ
unittests 82.35% <100.00%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmpose/datasets/pipelines/bottom_up_transform.py 79.65% <100.00%> (-0.41%) ⬇️
mmpose/datasets/dataset_wrappers.py 50.00% <0.00%> (-4.55%) ⬇️
mmpose/models/detectors/base.py 53.65% <0.00%> (-4.12%) ⬇️
mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py 22.41% <0.00%> (-2.59%) ⬇️
mmpose/core/fp16/hooks.py 25.00% <0.00%> (-2.28%) ⬇️
mmpose/core/camera/camera_base.py 78.57% <0.00%> (-1.43%) ⬇️
mmpose/datasets/datasets/face/face_base_dataset.py 76.47% <0.00%> (-1.31%) ⬇️
mmpose/core/utils/regularizations.py 80.00% <0.00%> (-1.25%) ⬇️
mmpose/datasets/pipelines/loading.py 85.71% <0.00%> (-0.96%) ⬇️
mmpose/datasets/pipelines/top_down_transform.py 61.51% <0.00%> (-0.92%) ⬇️
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0acfc4...2e512cc. Read the comment docs.

@innerlee
Copy link
Contributor

smplx>=0.1.27 requires loguru, which will not be automatically installed

Is this a bug of smplx? Please make a fix there

@ly015
Copy link
Member Author

ly015 commented May 11, 2021

smplx>=0.1.27 requires loguru, which will not be automatically installed

Is this a bug of smplx? Please make a fix there

Yeah, I submitted an issue there. We still need a work-around in mmpose before it's fixed in smplx.

@ly015
Copy link
Member Author

ly015 commented May 11, 2021

Maybe just use smplx==0.1.26 for safety? We haven't tested our mesh model with smplx==0.1.27 anyway.

@innerlee
Copy link
Contributor

Adding loguru to requirements is better than pining smplx version. If you pin it now, then it is hard to unpin it later.

@zengwang430521
Copy link
Collaborator

I think it's okay to update the smpl version and it will not change the performance.

@ly015 ly015 merged commit 3e2a7ac into open-mmlab:master May 11, 2021
@innerlee innerlee mentioned this pull request May 13, 2021
minoki pushed a commit to minoki/mmpose that referenced this pull request Jul 13, 2021
* fix opencv-python 4.5.2 compatibility
BottomUpRandomAffine fails with opencv-python>=4.5.2 because a
single valued numpy.ndarray is no longer a valid data type for
image_size in cv2.warpAffine. This commit fix it by repacing
image_size with image_size.item().

* fix smplx 0.1.27 compatibility
smplx>=0.1.27 requires loguru, which will not be automatically installed
when installing smplx. So we add loguru into mmpose requirements.
@ly015 ly015 deleted the fix_opencv_compatibility branch October 8, 2021 04:28
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
* fix opencv-python 4.5.2 compatibility
BottomUpRandomAffine fails with opencv-python>=4.5.2 because a
single valued numpy.ndarray is no longer a valid data type for
image_size in cv2.warpAffine. This commit fix it by repacing
image_size with image_size.item().

* fix smplx 0.1.27 compatibility
smplx>=0.1.27 requires loguru, which will not be automatically installed
when installing smplx. So we add loguru into mmpose requirements.
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
* fix opencv-python 4.5.2 compatibility
BottomUpRandomAffine fails with opencv-python>=4.5.2 because a
single valued numpy.ndarray is no longer a valid data type for
image_size in cv2.warpAffine. This commit fix it by repacing
image_size with image_size.item().

* fix smplx 0.1.27 compatibility
smplx>=0.1.27 requires loguru, which will not be automatically installed
when installing smplx. So we add loguru into mmpose requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants