mhamilton723 / STEGO

Unsupervised Semantic Segmentation by Distilling Feature Correspondences
MIT License
724 stars 147 forks source link

Error:builtin_function_or_method #38

Open gdghds0 opened 2 years ago

gdghds0 commented 2 years ago

Hello, thank you for your outstanding work. When I run the code, I have some problems and want to ask for your help, when I run 'crop_datasets.py' ,I am stuck with a prompt like this image

Supgb commented 2 years ago

This may be caused by the wrong path to datasets. Have you checked it within the src/configs/train_config.yml?

gdghds0 commented 2 years ago

Thank you for your reply! Yes, I have checked. If I use the wrong path, I will report different errors, like this. image And I have completed precompute through ‘precomputeknns.py’ .Without using 'crop datasets. py' processing, directly 'train _segmentation.py 'will encounter the error like this image Therefore, I think it may be the problem of my environment version, so I reconfigured the new environment as follows, image but the problem has not been solved.

Supgb commented 2 years ago

You may try installing PyTorch using pip within your stego_m environment:

pip install torch
gdghds0 commented 2 years ago

Thank you for your suggestion. I just tried, but I still encountered the same error reminder. image image

BradNeuberg commented 2 years ago

Did you use conda with the provide environment.yml to create your virtual environment? That will ensure that the versions you used are the correct ones. FYI it took several hours for conda to "solve" my environment and install all the needed dependencies so it won't be quick.

gdghds0 commented 2 years ago

Did you use conda with the provide environment.yml to create your virtual environment? That will ensure that the versions you used are the correct ones. FYI it took several hours for conda to "solve" my environment and install all the needed dependencies so it won't be quick.

Thanks for the suggestion, in fact I also tried to create my virtual environment with 'environment.yml'. Running the file on an ubuntu system will keep it in the 'solving' state and won't be able to download it. So I try to install on windows system, but the following problems will occur mmexport1657818868042

Supgb commented 2 years ago

It should be the same issue as https://github.com/mhamilton723/STEGO/issues/33#issuecomment-1184122727 You can install the mamba to tackle the stuck problem.

First, install the mamba using the following command: conda install mamba -n base -c conda-forge

Second, using mamba instead of conda to install the environment: mamba env create -f environment.yml

Additionally, you may need to modify the following entry to the corresponding version of your NVIDIA driver. https://github.com/mhamilton723/STEGO/blob/e20df22cf17c41ac78e3c8c75a3118ea87ff0a4c/environment.yml#L12

gdghds0 commented 2 years ago

conda install mamba -n base -c conda-forge Thank you for your proposal. First, I did it on my windows syestem computer ‘conda install mamba -n base -c conda-forge’ Operation, but the following problems will be encountered image Then I operated on my Ubuntu system again, but I will encounter such problems when performing this step image So I think it may be the problem of the driver version. I rented a server online, but when all the packages are downloaded, I will also encounter the following problems image Thank you sincerely for your help. I wonder if it is convenient for you to package and upload the installed 'stego' environment package under the 'anaconda\env\' directory. I have successfully realized several environment migrations in this way. Of course, I will continue to look for other methods, although I have tried for more than two weeks.

Supgb commented 2 years ago

Then I operated on my Ubuntu system again, but I will encounter such problems when performing this step image

Sorry, I really want to help, but the whole stego environment has a size of ~4G, which is too huge to upload. According to your attempts under Ubuntu, the failure might be caused by the incompatible driver version. I see that you are trying to install cudatoolkit=11.0. Have you checked the CUDA compatibility? For example, my computer runs over an NVIDIA driver whose version is 440.64.00, so I modified the cudatoolkit entry in the environment.yml from 11.0 to 10.2.

Screenshot 2022-07-15 at 22 06 33

BTW, all my successful attempts are under Ubuntu 18.04 with miniconda3.

gdghds0 commented 2 years ago

Then I operated on my Ubuntu system again, but I will encounter such problems when performing this step image

Sorry, I really want to help, but the whole stego environment has a size of ~4G, which is too huge to upload. According to your attempts under Ubuntu, the failure might be caused by the incompatible driver version. I see that you are trying to install cudatoolkit=11.0. Have you checked the CUDA compatibility? For example, my computer runs over an NVIDIA driver whose version is 440.64.00, so I modified the cudatoolkit entry in the environment.yml from 11.0 to 10.2.

Screenshot 2022-07-15 at 22 06 33

BTW, all my successful attempts are under Ubuntu 18.04 with miniconda3.

Then I operated on my Ubuntu system again, but I will encounter such problems when performing this step image

Sorry, I really want to help, but the whole stego environment has a size of ~4G, which is too huge to upload. According to your attempts under Ubuntu, the failure might be caused by the incompatible driver version. I see that you are trying to install cudatoolkit=11.0. Have you checked the CUDA compatibility? For example, my computer runs over an NVIDIA driver whose version is 440.64.00, so I modified the cudatoolkit entry in the environment.yml from 11.0 to 10.2.

Screenshot 2022-07-15 at 22 06 33

BTW, all my successful attempts are under Ubuntu 18.04 with miniconda3.

Yes, thank you for helping me solve the problem. My previous NVIDIA version can only reach CUDA of 10.1, so I also reduced cudatoolkit to the version 10.1 matching my driver, but it was still useless, so I upgraded my driver version to meet the requirements of 11.0, but the result was not very good. image