libfacedetection.train icon indicating copy to clipboard operation
libfacedetection.train copied to clipboard

Not able to setup the training environment

Open Gopal518 opened this issue 2 years ago • 9 comments

I encountered an issue while attempting to train the Yunet model. Following the repository's instructions, I successfully cloned the repository. However, I faced a roadblock when I tried to proceed, as the requirement.txt file mentioned a dependency on the mmpycocotools library that I couldn't resolve. Screenshot from 2023-10-22 17-18-36

Gopal518 avatar Oct 25 '23 10:10 Gopal518

@Gopal518 Hello, please strictly follow the steps in the readme to create the environment, ensuring that python=3.7, pytorch=1.7, MMCV=1.3.17. I have not tested other environments, so I am not sure what could cause errors.

Wwupup avatar Oct 26 '23 01:10 Wwupup

Hi @Wwupup ! Thank you for your prompt response. I've provided a list of environment libraries. Despite closely adhering to the instructions in the readme, I'm still encountering the aforementioned issue. Can you offer any insights into where I might be making a mistake based on the information provided? Please let me know if you require additional details. Screenshot from 2023-10-26 11-55-55

Gopal518 avatar Oct 26 '23 07:10 Gopal518

Perhaps you can refer to this github issue post, mentioned install cython first(make sure cython installed for python3) https://github.com/cocodataset/cocoapi/issues/172

Anguliachao avatar Oct 27 '23 03:10 Anguliachao

Hi @Anguliachao ! In the provided snapshot, it's evident that Cyphon version 3.0.4 is installed. Additionally, the 'requirements.txt' file specifies a dependency on 'mmpycocotools,' not 'pycocotools.'

Gopal518 avatar Oct 27 '23 06:10 Gopal518

Hi @Gopal518, have you resolved this problem? I'm experiencing the same issue with my setup.

tingyulan avatar Jan 17 '24 21:01 tingyulan

Downgrade cython fixed the issue for me.

tingyulan avatar Jan 17 '24 21:01 tingyulan

Hi @tingyulan Can you please share me the exact cython version. also if you can share the exact version of the all dependency. would be great. Will try to replicated you environment.😊

Gopal518 avatar Jan 19 '24 05:01 Gopal518

Thanks, @tingyulan cython version == 3.0a1 worked for me.

Gopal518 avatar Jan 19 '24 06:01 Gopal518

@tingyulan @Gopal518 Hello follow this should be worked.

conda create -n yunet python=3.8
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install mmcv-full==1.3.17 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html
python setup.py develop
pip install Cython==0.29.33
pip install mmpycocotools
...

Wwupup avatar Jan 19 '24 07:01 Wwupup