microsoft / RegionCLIP

[CVPR 2022] Official code for "RegionCLIP: Region-based Language-Image Pretraining"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo on Hugging Face not working

aitor-martinez-seras opened this issue · comments

The web demo on the Hugging Face spaces is not working, throwing this error:

Runtime error
ib/python3.8/site-packages (from lvis==0.5.3) (2.8.2)
Requirement already satisfied: six>=1.12.0 in /home/user/.local/lib/python3.8/site-packages (from lvis==0.5.3) (1.16.0)
Requirement already satisfied: importlib-resources>=3.2.0 in /home/user/.local/lib/python3.8/site-packages (from matplotlib>=3.1.1->lvis==0.5.3) (5.12.0)
Requirement already satisfied: pillow>=6.2.0 in /home/user/.local/lib/python3.8/site-packages (from matplotlib>=3.1.1->lvis==0.5.3) (9.4.0)
Requirement already satisfied: contourpy>=1.0.1 in /home/user/.local/lib/python3.8/site-packages (from matplotlib>=3.1.1->lvis==0.5.3) (1.0.7)
Requirement already satisfied: fonttools>=4.22.0 in /home/user/.local/lib/python3.8/site-packages (from matplotlib>=3.1.1->lvis==0.5.3) (4.39.0)
Requirement already satisfied: packaging>=20.0 in /home/user/.local/lib/python3.8/site-packages (from matplotlib>=3.1.1->lvis==0.5.3) (23.0)
Requirement already satisfied: zipp>=3.1.0 in /home/user/.local/lib/python3.8/site-packages (from importlib-resources>=3.2.0->matplotlib>=3.1.1->lvis==0.5.3) (3.15.0)

[notice] A new release of pip available: 22.3.1 -> 23.1.1
[notice] To update, run: python -m pip install --upgrade pip
Traceback (most recent call last):
  File "app.py", line 25, in <module>
    from detectron2.data import MetadataCatalog
  File "/home/user/app/detectron2/data/__init__.py", line 4, in <module>
    from .build import (
  File "/home/user/app/detectron2/data/build.py", line 24, in <module>
    from .clip_build import make_clip_dataset
  File "/home/user/app/detectron2/data/clip_build.py", line 12, in <module>
    from .clip_datasets.clip_img_txt_pair_tsv import CLIPImgTxtPairTSVDataset
  File "/home/user/app/detectron2/data/clip_datasets/clip_img_txt_pair_tsv.py", line 21, in <module>
    from detectron2.data.clip_datasets.clip_prompt_engineering import get_prompt_templates, prompt_engineering
  File "/home/user/app/detectron2/data/clip_datasets/clip_prompt_engineering.py", line 6, in <module>
    import ftfy
ModuleNotFoundError: No module named 'ftfy'
commented

me too.

Same here.

@jwyang Hi Jianwei, is it possible for a quick fix for this dependency? For example, adding pip install ftfy in installation, or remove import ftfy if it's not really used. Thanks!