SHI-Labs / OneFormer

OneFormer: One Transformer to Rule Universal Image Segmentation, arxiv 2022 / CVPR 2023
https://praeclarumjj3.github.io/oneformer
MIT License
1.41k stars 128 forks source link

Issue with detectron 2 installation #63

Closed EthanAbitbol3 closed 1 year ago

EthanAbitbol3 commented 1 year ago

First, thank you for your work. I am trying to do the installation but i got this issue : image

Do you have any idea how i can solve this ?

Thank you again !

praeclarumjj3 commented 1 year ago

Hi @EthanAbitbol3, thanks for pointing this out.

I guess it's an issue with pip. Could you try the following python script to build detectron2 from the source?

import sys, os, distutils.core, subprocess
if not os.path.exists('./detectron2'):
    subprocess.run(['git', 'clone', 'https://github.com/facebookresearch/detectron2'])
dist = distutils.core.run_setup("./detectron2/setup.py")
for x in dist.install_requires:
    subprocess.run(['python', '-m', 'pip', 'install', x])
sys.path.insert(0, os.path.abspath('./detectron2'))
EthanAbitbol3 commented 1 year ago

thank you for your answer ! I did what you told me : image as you can see in the picture, the detectron import work but the google.collab does not work, so i tried : image I comment it to continue but : image what do you think about that ? Sorry for bothering you and thank you for your help !

EthanAbitbol3 commented 1 year ago

to solve the issue of color map i put demo.colormap in demo\visualizer.py

praeclarumjj3 commented 1 year ago

Hi @EthanAbitbol3, google.colab is meant for usage only inside google colab. From the screenshot, it seems you are running the code locally on a jupyter notebook.