microsoft / GLIP

Grounded Language-Image Pre-training
MIT License
2.18k stars 191 forks source link

undefined symbol error #79

Closed KaiyueSun98 closed 1 year ago

KaiyueSun98 commented 1 year ago

Hi, I have a undefined symbol error when importing the GLIPDemo in Colab demo. I use torch==1.9.0, torchvision==0.10.0 and CUDA 12.0. Is there any way to solve the issue?

Thanks ImportError Traceback (most recent call last) Cell In[1], line 10 8 pylab.rcParams['figure.figsize'] = 20, 12 9 from maskrcnn_benchmark.config import cfg ---> 10 from maskrcnn_benchmark.engine.predictor_glip import GLIPDemo 12 def load(url): 13 """ 14 Given an url of an image, downloads the image and 15 returns a PIL image 16 """

File ~/GLIP/maskrcnn_benchmark/engine/predictor_glip.py:11 9 from torchvision import transforms as T 10 import pdb ---> 11 from maskrcnn_benchmark.modeling.detector import build_detection_model 12 from maskrcnn_benchmark.utils.checkpoint import DetectronCheckpointer 13 from maskrcnn_benchmark.structures.image_list import to_image_list

File ~/GLIP/maskrcnn_benchmark/modeling/detector/init.py:1 ----> 1 from .generalized_rcnn import GeneralizedRCNN 2 from .generalized_vl_rcnn import GeneralizedVLRCNN 4 _DETECTION_META_ARCHITECTURES = {"GeneralizedRCNN": GeneralizedRCNN, 5 "GeneralizedVLRCNN": GeneralizedVLRCNN 6 }

File ~/GLIP/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py:11 7 from torch import nn 9 from maskrcnn_benchmark.structures.image_list import to_image_list ---> 11 from ..backbone import build_backbone 12 from ..rpn import build_rpn 13 from ..roi_heads import build_roi_heads

File ~/GLIP/maskrcnn_benchmark/modeling/backbone/init.py:6 3 from torch import nn 5 from maskrcnn_benchmark.modeling import registry ----> 6 from maskrcnn_benchmark.modeling.make_layers import conv_with_kaiming_uniform 7 from maskrcnn_benchmark.layers import DropBlock2D, DyHead 8 from . import fpn as fpn_module

File ~/GLIP/maskrcnn_benchmark/modeling/make_layers.py:10 8 from torch.nn import functional as F 9 from maskrcnn_benchmark.config import cfg ---> 10 from maskrcnn_benchmark.layers import Conv2d, DYReLU 11 from maskrcnn_benchmark.modeling.poolers import Pooler 14 def get_group_gn(dim, dim_per_gp, num_groups):

File ~/GLIP/maskrcnn_benchmark/layers/init.py:10 8 from .misc import interpolate 9 from .misc import Scale ---> 10 from .nms import nms 11 from .nms import ml_nms 12 from .nms import soft_nms

File ~/GLIP/maskrcnn_benchmark/layers/nms.py:2 1 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. ----> 2 from maskrcnn_benchmark import _C 4 try: 5 import torchvision

ImportError: /home/kaiyuesun/GLIP/maskrcnn_benchmark/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops6argmax4callERKNS_6TensorEN3c108optionalIlEEb

KaiyueSun98 commented 1 year ago

solved the issue by successfully installing the pycocotools

CapricornGuang commented 8 months ago

Hi, i also meet this problem. And can you provide a more detailed solution? Thanks a lot!!

CLL112 commented 3 weeks ago

I've encountered this issue as well. Have you resolved it? @CapricornGuang

CapricornGuang commented 3 weeks ago

Thanks for your coming email