Flode-Labs / vid2densepose

Convert your videos to densepose and use it on MagicAnimate
MIT License
957 stars 122 forks source link

有关依赖DensePose安装的建议(recommendations about reliable DensePose installation) #14

Open jjandnn opened 6 months ago

jjandnn commented 6 months ago

pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose

选择v0.6,而不是main,main在linux下没问题。但是windows下无法编译。

其次,提醒大家,cv2的typing目录下的init.py文件要修改严谨。 如:D:\anaconda3\Lib\site-packages\cv2\typing__init.py 第68-83行所有的赋值都缺了单引号‘‘,不严谨,会报错,应该改成: if numpy.lib.NumpyVersion(numpy.version) > "1.20.0" and sys.version_info >= (3, 9): NumPyArrayGeneric = 'numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]]' else: NumPyArrayGeneric = 'numpy.ndarray' if numpy.lib.NumpyVersion(numpy.version) > "1.20.0" and sys.version_info >= (3, 9): NumPyArrayFloat32 = 'numpy.ndarray[typing.Any, numpy.dtype[numpy.float32]]' else: NumPyArrayFloat32 = 'numpy.ndarray' if numpy.lib.NumpyVersion(numpy.version__) > "1.20.0" and sys.version_info >= (3, 9): NumPyArrayFloat64 = 'numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]' else: NumPyArrayFloat64 = 'numpy.ndarray'

这样detectron2在windows上就没相关问题了。

rookiestar28 commented 6 months ago

根據大佬提供的指令: pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose 出現以下報錯,是因為沒有修改init.py文件的關係嗎? 求指導 QQ

螢幕擷取畫面 2023-12-10 135036

ogladkov commented 6 months ago

Same issue here

jjandnn commented 6 months ago

detectron2.这个包编译安装,要求:windows c++库你得装着。 然后依赖: black, cloudpickle, future, fvcore, hydra-core, iopath, matplotlib, omegaconf, Pillow, pycocotools, pydot, tabulate, tensorboard, termcolor, tqdm, yacs 上面的依赖中pycocotools千万别漏了。 接着DensePose的安装依赖detectron2(Required-by: detectron2-densepose),所以: 1,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6 2,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose

xiohulp commented 6 months ago

detectron2.这个包编译安装,要求:windows c++库你得装着。 然后依赖: black, cloudpickle, future, fvcore, hydra-core, iopath, matplotlib, omegaconf, Pillow, pycocotools, pydot, tabulate, tensorboard, termcolor, tqdm, yacs 上面的依赖中pycocotools千万别漏了。 接着DensePose的安装依赖detectron2(Required-by: detectron2-densepose),所以: 1,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6 2,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose

需要装哪些c++运行库?

xiohulp commented 6 months ago

after following the installation guide, when i run the app, got the error message: (venv) D:\vid2densepose>python app.py Traceback (most recent call last): File "app.py", line 2, in from detectron2.config import get_cfg File "D:\vid2densepose\venv\lib\site-packages\detectron2__init.py", line 5, in setup_environment() File "D:\vid2densepose\venv\lib\site-packages\detectron2\utils\env.py", line 108, in setup_environment _configure_libraries() File "D:\vid2densepose\venv\lib\site-packages\detectron2\utils\env.py", line 72, in _configure_libraries import cv2 File "D:\vid2densepose\venv\lib\site-packages\cv2__init.py", line 181, in bootstrap() File "D:\vid2densepose\venv\lib\site-packages\cv2__init.py", line 175, in bootstrap if load_extra_py_code_for_module("cv2", submodule, DEBUG): File "D:\vid2densepose\venv\lib\site-packages\cv2\init.py", line 28, in load_extra_py_code_for_module py_module = importlib.import_module(module_name) File "C:\Users\xiohu.conda\envs\python38\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "D:\vid2densepose\venv\lib\site-packages\cv2\typing\init__.py", line 68, in if numpy.lib.NumpyVersion(numpy.version) > "1.20.0" and sys.version_info >= (3, 9): File "D:\vid2densepose\venv\lib\site-packages\numpy\lib_version.py", line 57, in init__ ver_main = re.match(r'\d+.\d+.\d+', vstring) File "C:\Users\xiohu.conda\envs\python38\lib\re.py", line 191, in match return _compile(pattern, flags).match(string) TypeError: expected string or bytes-like object

tadeodonegana commented 6 months ago

detectron2.这个包编译安装,要求:windows c++库你得装着。 然后依赖: black, cloudpickle, future, fvcore, hydra-core, iopath, matplotlib, omegaconf, Pillow, pycocotools, pydot, tabulate, tensorboard, termcolor, tqdm, yacs 上面的依赖中pycocotools千万别漏了。 接着DensePose的安装依赖detectron2(Required-by: detectron2-densepose),所以: 1,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6 2,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose

Hi @jjandnn, does this solved the issue? I am looking to determine if this is the correct solution and have an answer in English.

Thanks in advance.

Starzilla29 commented 6 months ago

detectron2.这个包编译安装,要求:windows c++库你得装着。 然后依赖: black, cloudpickle, future, fvcore, hydra-core, iopath, matplotlib, omegaconf, Pillow, pycocotools, pydot, tabulate, tensorboard, termcolor, tqdm, yacs 上面的依赖中pycocotools千万别漏了。 接着DensePose的安装依赖detectron2(Required-by: detectron2-densepose),所以: 1,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6 2,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose

Hi @jjandnn, does this solved the issue? I am looking to determine if this is the correct solution and have an answer in English.

Thanks in advance.

I had this issue and doing this solved it for me.

niffelheim87 commented 5 months ago

detectron2.这个包编译安装,要求:windows c++库你得装着。 然后依赖: black, cloudpickle, future, fvcore, hydra-core, iopath, matplotlib, omegaconf, Pillow, pycocotools, pydot, tabulate, tensorboard, termcolor, tqdm, yacs 上面的依赖中pycocotools千万别漏了。 接着DensePose的安装依赖detectron2(Required-by: detectron2-densepose),所以: 1,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6 2,pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose

Hi @jjandnn, does this solved the issue? I am looking to determine if this is the correct solution and have an answer in English.

Thanks in advance.

Maybe a bit late but tried the fix today.

Working on Windows right now

if you get an error launching python app.py on site-packages\detectron2\data\transforms\transform.py line 46 change from LINEAR to BILINEAR and now works

Captura de pantalla 2024-01-30 002416