fudan-zvg / Semantic-Segment-Anything

Automated dense category annotation engine that serves as the initial semantic labeling for the Segment Anything dataset (SA-1B).
Apache License 2.0
2.15k stars 138 forks source link

ModuleNotFoundError: No module named 'cog' #52

Open xiaodongww opened 1 year ago

xiaodongww commented 1 year ago

Hi, thanks for your work. I just build the environment as you suggested as follows:

git clone git@github.com:fudan-zvg/Semantic-Segment-Anything.git
cd Semantic-Segment-Anything
conda env create -f environment.yaml
conda activate ssa
python -m spacy download en_core_web_sm
# install segment-anything
cd ..
git clone git@github.com:facebookresearch/segment-anything.git
cd segment-anything; pip install -e .; cd ../Semantic-Segment-Anything

Then I just try to run python predict.py and it show the following error:

Traceback (most recent call last):
  File "predict.py", line 19, in <module>
    from cog import BasePredictor, Input, Path, BaseModel
ModuleNotFoundError: No module named 'cog'

Can you give me some suggestions on how to solve this?

JCSTARS commented 2 months ago

Just need to pip install cog [doge]