huggingface / controlnet_aux

Apache License 2.0
400 stars 86 forks source link

Simplify DWPose #114

Closed reallyigor closed 1 day ago

reallyigor commented 1 week ago

Hey there ✋

Problem ℹī¸: The current implementation of DWPose is hard to use:

  1. It's impossible to install on Mac.
  2. This reqs is really hard to install on Linux, I face lots of dependency issues:
    pip install -U openmim
    mim install mmengine
    mim install "mmcv>=2.0.1"
    mim install "mmdet>=3.1.0"
    mim install "mmpose>=1.1.0"
  3. To support DWPose which is dependent on MMDetection, MMCV and MMPose do...

None! of this reqs^ is actually needed!

  1. DWPose class lacks OpenPose flags include_face, include_hands.

Solution 🧑‍🏭 : I made my own wrapper for DWPose with clean code and only needed dependencies. https://github.com/reallyigor/easy_dwpose

Tests đŸ’ģ :

pytest

Successfully passed for DWPose!

Input tests/outputs


reallyigor commented 1 week ago

Please, take a look 🙏 @sayakpaul @patrickvonplaten @asomoza

asomoza commented 1 week ago

Hi, thanks for your contribution, you're deleting a lot of code which is fine, but you also removed all the credits, is your code original from you or you copied or based it someone else's code? Either way can you add the respective credits and the license to the directory? if its from you, you should also add your info or your original repo.

The only reason I didn't update the code before was because the controlnet (not the mm one) is also non-commercial, the only code that was true open source at the time was the one that you can use with the onnx model.

reallyigor commented 1 week ago

but you also removed all the credits, is your code original from you or you copied or based it someone else's code?

based on someone else's code + heavily rewritten, you're right that I should add the proper credentials

Either way can you add the respective credits and the license to the directory

Sure, I'll add it. By the way there was no license in the dwpose dir before

the only code that was true open source at the time was the one that you can use with the onnx model.

easy_dwpose uses the onnx model

reallyigor commented 1 week ago

@asomoza can you please clarify what do you mean by

if its from you, you should also add your info or your original repo.

where should I add it?

asomoza commented 1 week ago

the ones you deleted were here.

You can put something similar in all the files that you modified, it's just to make sure to give credits to the original authors and also to ensure that this repo it's mostly a compilation from other sources and we don't hold or claim the rights to them.

reallyigor commented 1 week ago

Sure, my question was about the license

Either way can you add the respective credits and the license to the directory?

and the license to the directory?

asomoza commented 1 week ago

Sure, my question was about the license

Either way can you add the respective credits and the license to the directory?

and the license to the directory?

you can just add the LICENSE file in the same directory, for example on how it's done in the lineart one

reallyigor commented 1 week ago

Got it, thanks!

reallyigor commented 6 days ago

Hey @asomoza

I was thinking about

Consider that also another alternative if you want to promote or preserve your repo can be that we just link to your implementation in the main README file so people know that for dwpose there's a better and simpler solution.

If you'd prefer to keep everything self-contained without relying on external repositories, I would appreciate it if you could mention my implementation in the README (if that works for you).

The only problem that bothers me a bit is that the current implementation of DWPose is also not standalone, as it needs

pip install -U openmim
...
mim install "mmpose>=1.1.0"

I opened an another PR:

115

Let me know if it works

asomoza commented 6 days ago

The only problem that bothers me a bit is that the current implementation of DWPose is also not standalone, as it needs

pip install -U openmim
...
mim install "mmpose>=1.1.0"

I opened an another PR: #115

Let me know if it works

I agree with you, so regarding this I commented in your new PR. This change works just fine.

reallyigor commented 1 day ago

See #115