harsh2912 / Background-removal

MIT License
42 stars 14 forks source link

problem in running code #2

Open sarahrajabazdeh opened 3 years ago

sarahrajabazdeh commented 3 years ago

Hello I hope you are doing well. i downloaded your repository and installed the requirements as you wrote in the instruction Instruction link but i have 2 problem running both servers

  1. when i run segmentation server, i get this error (segmentation server returns the "Method Not Allowed" when i go to browser[Fig1] Screenshot from 2021-07-10 09-26-10

  2. and i have also have error while running matting server, Although, i installed PyTorch and torchvision with cuda, but the problem still exist. ModuleNotFoundError: No module named 'torch'[Fig 2] Screenshot from 2021-07-10 09-23-56. i would be appreciated if you let me know how can i fix them.

harsh2912 commented 3 years ago

1) You are using browser to access the server and for that the GET method is not defined, hence you are seeing this page. 2) You need to install pytorch inside the conda environment "matting" and then try to run this.

sarahrajabazdeh commented 3 years ago

Thanks a lot for your response. Yes i installed Pytorch inside my matting env, but unfortunately, i still have the error Screenshot from 2021-07-10 18-53-47

harsh2912 commented 3 years ago

Did you try restarting the system?

On Sat, 10 Jul, 2021, 10:27 pm sara-rajabzadeh, @.***> wrote:

Thanks a lot for your response. Yes i installed Pytorch inside my matting env, but unfortunately, i still have the error [image: Screenshot from 2021-07-10 18-53-47] https://user-images.githubusercontent.com/33392969/125170724-97ab1f00-e1b0-11eb-8012-2cbad7776772.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harsh2912/Background-removal/issues/2#issuecomment-877668677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENHXF6ONVTH6NPYYRWRUNDTXB3XNANCNFSM5AEHYQXQ .

sarahrajabazdeh commented 3 years ago

yes I tried that too.

harsh2912 commented 3 years ago

It seems your pytorch was not installed properly. Please try to uninstall and install it again or create a new environment and use that.

sarahrajabazdeh commented 3 years ago

It seems your pytorch was not installed properly. Please try to uninstall and install it again or create a new environment and use that.

Thank you for your time and consideration. i did the following steps to solve this prob: 1- i create another conda env with this command : conda env create -n matting -f requirements.yml but during installation it says that there is a conflict but it tried to solve it and after installation, the conda env could not be found in the list of envs. Screenshot from 2021-07-13 09-31-38 the conda name =mat and it can not be found in the list of envs Screenshot from 2021-07-13 09-33-18

2- First i create a conda env and after that i updated it with yml file and i got the problem i had before( toch not found). i also changed the python version to 3.7 but that does not work for me.

harsh2912 commented 3 years ago

There is a workaround for this step. I just did it manually and figured it out. You need to run the code in a blank conda environment and step by step install all the dependencies it is asking for. This surely is a tedious task. But will get you through it.

On Tue, 13 Jul, 2021, 1:06 pm sara-rajabzadeh, @.***> wrote:

It seems your pytorch was not installed properly. Please try to uninstall and install it again or create a new environment and use that.

Thank you for your time and consideration. i did the following steps to solve this prob: 1- i create another conda env with this command : conda env create -n matting -f requirements.yml but during installation it says that there is a conflict but it tried to solve it and after installation, the conda env could not be found in the list of envs. [image: Screenshot from 2021-07-13 09-31-38] https://user-images.githubusercontent.com/33392969/125410460-31471c00-e3bd-11eb-9330-93dfd04c1fb2.png the conda name =mat and it can not be found in the list of envs [image: Screenshot from 2021-07-13 09-33-18] https://user-images.githubusercontent.com/33392969/125410646-618eba80-e3bd-11eb-8a82-6627cd5ce1e3.png

2- First i create a conda env and after that i updated it with yml file and i got the problem i had before( toch not found). i also changed the python version to 3.7 but that does not work for me.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harsh2912/Background-removal/issues/2#issuecomment-878852407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENHXFYWDYOYPGIDVHQWJ6TTXPUHZANCNFSM5AEHYQXQ .

sarahrajabazdeh commented 3 years ago

Hi, thank you so much for your help. Finally i run these two servers successfully. here i mention the points that lead me solve this problem: 1- My Cuda version is 11, so i had to install pytorch which has the compatibility with my cuda Version. the command is as below: conda install pytorch==1.7.0 cudatoolkit=11.0 -c pytorch 2- secondly i had also an error Pytorch says that CUDA is not available however i installed it. so I disabled the secure mode in bios and now two servers up and running. now i have another problem in running step 6. can i mention it here or i have to open a new issue?

harsh2912 commented 3 years ago

That is great.

For that, please open one more issue there

On Tue, 20 Jul, 2021, 3:22 pm sara-rajabzadeh, @.***> wrote:

Hi, thank you for your help. Finally i run these two servers successfully. here i mention the point that lead me solve this problem: 1- My Cuda is version 11, so i had to install pytorch which has the compatibility with my cuda Version. the command is as below: conda install pytorch==1.7.0 cudatoolkit=11.0 -c pytorch 2- secondly i had also an error Pytorch says that CUDA is not available however i installed it. so I disabled the secure mode in bios and now two servers up and running. now i have another problem in running step 6. can i mention it here or i have to open a new issue?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harsh2912/Background-removal/issues/2#issuecomment-883260283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENHXF5ZDS2XVDKWBJU5LP3TYVBPVANCNFSM5AEHYQXQ .