rlleshi / phar

deep learning sex position classifier
Apache License 2.0
217 stars 25 forks source link

Installation problem #13

Closed jobyclash2 closed 7 months ago

jobyclash2 commented 7 months ago

Hi i was interested in this project and wanted to try it out in my windows machine. i am new to python and i followed your manual installation tutorial and reached endless chaos of issues. i think the read me is either outdated or wrong.

Clone this repo and its submodules: git clone --recurse-submodules git@github.com:rlleshi/phar.git and then create and environment with python 3.8+.

Install torch (of course, it is recommended that you have CUDA & CUDNN installed).

i cloned your project i installed python (Python 3.9.13) installed cuda and cuDNN from nvidea installed pytorch (pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121)

Install the correct version of mmcv based on your CUDA & Torch, e.g. pip install mmcv-full==1.3.18 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/index.html

i navigated to project main directory (where src etc... are located) i went below link and installed mmcv mmdet,mmaction etc... https://mmaction2.readthedocs.io/en/latest/get_started/installation.html#best-practices

Install extra dependencies: pip install -r requirements/extra.txt.

done

now when i run the project like below python src/demo/multimodial_demo.py video.mp4 demo.json --timestamps

i am getting errors

there is a requirements.txt inside requirements folder . am i supposed to install that as well? in documentation there is only mention about extra.txt

these are the errors i get do you know why this happen

Traceback (most recent call last): File "src/demo/multimodial_demo.py", line 20, in from demo_skeleton import frame_extraction File "C:\zprojects\test\phar\src\demo\demo_skeleton.py", line 11, in from mmcv import DictAction ImportError: cannot import name 'DictAction' from 'mmcv' (C:\Users\admin.conda\envs\openmmlab\lib\site-packages\mmcv__init__.py)

rlleshi commented 7 months ago

Hello @jobyclash2

It looks like you've installed the latest version of mmaction2, which includes breaking changes, and this open-source project wasn't updated to run on its latest version (hence why it's important to clone the exact versions of the sub-libs that this repo defines).

Anyway, why not try to use the docker image provided in the instructions? Would remove a lot of the hassle with the step-by-step installation.