isl-org / lang-seg

Language-Driven Semantic Segmentation
MIT License
691 stars 85 forks source link

Huggingface Spaces #5

Closed AK391 closed 2 years ago

AK391 commented 2 years ago

Hi, would you be interested in sharing a web demo on Huggingface Spaces for lang-seg?

It would make this model more accessible as it would allow people to try out the model directly from the browser. Some other recent machine learning model repos have set up Spaces for easy access:

github: https://github.com/salesforce/BLIP Spaces: https://huggingface.co/spaces/akhaliq/BLIP

github: https://github.com/facebookresearch/omnivore Spaces: https://huggingface.co/spaces/akhaliq/omnivore

Spaces is completely free, and I can help setup a Gradio Space. Here are some getting started instructions if you'd prefer to do it yourself: https://huggingface.co/blog/gradio-spaces

Boyiliee commented 2 years ago

Hi @AK391,

Thanks for your interest in LSeg!

Yea, we have this plan! (Just not for now)

Maybe could you send me an email, we can chat more in detail.

AK391 commented 2 years ago

@Boyiliee thanks, when trying out the colab with cpu I am getting this error

ImportError Traceback (most recent call last) in () 11 from torch.nn.parallel.scatter_gather import gather 12 ---> 13 import encoding.utils as utils 14 from encoding.nn import SegmentationLosses, SyncBatchNorm 15 from encoding.parallel import DataParallelModel, DataParallelCriterion

10 frames /usr/lib/python3.7/imp.py in load_dynamic(name, path, file) 340 spec = importlib.machinery.ModuleSpec( 341 name=name, loader=loader, origin=path) --> 342 return _load(spec) 343 344 else:

ImportError: /usr/local/lib/python3.7/dist-packages/encoding/lib/cpu/enclib_cpu.so: undefined symbol: _ZN6caffe26detail36_typeMetaDataInstance_preallocated_7E

Boyiliee commented 2 years ago

Hi @AK391,

I haven't met this problem, and I guess it might be because of the inconsistent dependencies, like this issue.

Maybe you could try the installation option2 and check the consistency. I guess this should solve this problem.

Hope this helps!

Boyiliee commented 2 years ago

Hi @AK391 ,

Please feel free to email me if you meet any further problems. Happy to apply LSeg to Huggingface Spaces for sure!

AK391 commented 2 years ago

@Boyiliee I setup a org for isl-org on huggingface similar to github and added the lang-seg model there, I can add you to the org as a admin through the invite to org button on the org page or you can provide me your huggingface username.

org: https://huggingface.co/isl-org model: https://huggingface.co/isl-org/lang-seg

I will look into setting up a space soon

If email is preferred I can follow up there thanks :)

AK391 commented 2 years ago

@Boyiliee also I sent an invitation to your email to join the org

Boyiliee commented 2 years ago

Sounds great! Thanks @AK391 👍!