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

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

Open
jjandnn opened this issue Dec 9, 2023 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@jjandnn
Copy link

jjandnn commented Dec 9, 2023

pip install git+https://github.com/facebookresearch/[email protected]#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
Copy link

rookiestar28 commented Dec 10, 2023

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

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

@ogladkov
Copy link

Same issue here

@jjandnn
Copy link
Author

jjandnn commented Dec 12, 2023

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/[email protected]
2,pip install git+https://github.com/facebookresearch/[email protected]#subdirectory=projects/DensePose

@xiohulp
Copy link

xiohulp commented Dec 25, 2023

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/[email protected] 2,pip install git+https://github.com/facebookresearch/[email protected]#subdirectory=projects/DensePose

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

@xiohulp
Copy link

xiohulp commented Dec 25, 2023

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
Copy link
Member

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/[email protected] 2,pip install git+https://github.com/facebookresearch/[email protected]#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.

@tadeodonegana tadeodonegana self-assigned this Dec 26, 2023
@tadeodonegana tadeodonegana added the question Further information is requested label Dec 26, 2023
@Starzilla29
Copy link

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/[email protected] 2,pip install git+https://github.com/facebookresearch/[email protected]#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
Copy link

niffelheim87 commented Jan 29, 2024

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/[email protected] 2,pip install git+https://github.com/facebookresearch/[email protected]#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants