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

Some notes on installation #3

Closed
taesiri opened this issue Oct 23, 2023 · 10 comments
Closed

Some notes on installation #3

taesiri opened this issue Oct 23, 2023 · 10 comments

Comments

@taesiri
Copy link

taesiri commented Oct 23, 2023

Hello,

First of all, thank you for sharing the source code.

I encountered some issues while trying to install Semantic-SAM following the instructions in the README file. In the Semantic-SAM repository, there is a pyproject.toml file, and theoretically, it should take care of the installation. However, due to some strange issues, I had to install it manually.

Here are the steps I followed for anyone who is interested:

Using a fresh Anaconda environment to install Semantic-SAM:

pip3 install torch==1.13.1 torchvision==0.14.1 --extra-index-url https://download.pytorch.org/whl/cu113
python -m pip install 'git+https://github.com/MaureenZOU/detectron2-xyz.git'
pip install git+https://github.com/cocodataset/panopticapi.git
git clone https://github.com/UX-Decoder/Semantic-SAM
cd Semantic-SAM
python -m pip install -r requirements.txt

After this, you need to compile and install MultiScaleDeformableAttention:

git clone https://github.com/facebookresearch/Mask2Former
cd Mask2Former/mask2former/modeling/pixel_decoder/ops
sh make.sh

Additionally, you need to install mpi4py:

conda install -c conda-forge mpi4py

You can install SEEM and SAM using the pip+git method:

# Install SEEM
pip install git+https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git@package
# Install SAM
pip install git+https://github.com/facebookresearch/segment-anything.git
Screenshot 2023-10-23 at 5 52 30 PM

I hope this helps resolve any installation issues.

@jwyang
Copy link
Member

jwyang commented Oct 24, 2023

Hi, @taesiri, really appreciate for your instruction to install the package! This is very useful, I will go to handle the inconvenience of installation.

Best.
Jianwei

@jwyang
Copy link
Member

jwyang commented Nov 8, 2023

Already fixed, closing this issue.

@jwyang jwyang closed this as completed Nov 8, 2023
@dddraxxx
Copy link

dddraxxx commented Nov 15, 2023

Hello,

First of all, thank you for sharing the source code.

I encountered some issues while trying to install Semantic-SAM following the instructions in the README file. In the Semantic-SAM repository, there is a pyproject.toml file, and theoretically, it should take care of the installation. However, due to some strange issues, I had to install it manually.

Here are the steps I followed for anyone who is interested:

Using a fresh Anaconda environment to install Semantic-SAM:

pip3 install torch==1.13.1 torchvision==0.14.1 --extra-index-url https://download.pytorch.org/whl/cu113
python -m pip install 'git+https://github.com/MaureenZOU/detectron2-xyz.git'
pip install git+https://github.com/cocodataset/panopticapi.git
git clone https://github.com/UX-Decoder/Semantic-SAM
cd Semantic-SAM
python -m pip install -r requirements.txt

After this, you need to compile and install MultiScaleDeformableAttention:

git clone https://github.com/facebookresearch/Mask2Former
cd Mask2Former/mask2former/modeling/pixel_decoder/ops
sh make.sh

Additionally, you need to install mpi4py:

conda install -c conda-forge mpi4py

You can install SEEM and SAM using the pip+git method:

# Install SEEM
pip install git+https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git@package
# Install SAM
pip install git+https://github.com/facebookresearch/segment-anything.git
Screenshot 2023-10-23 at 5 52 30 PM I hope this helps resolve any installation issues.

It is weired but I encountered "NameError: name 'MPI' is not defined" for SEEM package and need to add "from mpi4py import MPI" in that file

@taesiri
Copy link
Author

taesiri commented Nov 15, 2023

@dddraxxx Have you installed mpi4py?

conda install -c conda-forge mpi4py

@dddraxxx
Copy link

@dddraxxx Have you installed mpi4py?

conda install -c conda-forge mpi4py

yes, but still need to import that in the 'seem' library code

@taesiri
Copy link
Author

taesiri commented Nov 15, 2023

@dddraxxx You should check and verify if mpi4py and openmpi are installed.

Btw, I can share my environment.yaml file if you think that can help.

@dddraxxx
Copy link

dddraxxx commented Nov 15, 2023

@taesiri yes. I installed both via conda and the code can run well if I add that line from mpi4py import MPI.

@wentaoyuan
Copy link

I had the same issue with MPI. It seems that
pip install git+https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git@package
installs the package branch of the SEEM repo which is not fully in sync with v1.0 branch.
Thus, utils/distributed.py is missing an import statement at line 7: https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once/blob/7b2e76dbb17d0b7831c6813a921fe2bc8de22926/utils/distributed.py#L7.

@NoOneUST
Copy link

NoOneUST commented Jan 1, 2024

I had the same issue with MPI. It seems that pip install git+https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git@package installs the package branch of the SEEM repo which is not fully in sync with v1.0 branch. Thus, utils/distributed.py is missing an import statement at line 7: https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once/blob/7b2e76dbb17d0b7831c6813a921fe2bc8de22926/utils/distributed.py#L7.

I also met the same problem. How did you solve it?

@abrichr
Copy link
Contributor

abrichr commented Feb 6, 2024

See #12 (comment) for an explanation and fix.

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

No branches or pull requests

6 participants