Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault when importing instaboost #2

Open
yanjiaweisysu opened this issue Aug 27, 2019 · 6 comments
Open

segmentation fault when importing instaboost #2

yanjiaweisysu opened this issue Aug 27, 2019 · 6 comments

Comments

@yanjiaweisysu
Copy link

yanjiaweisysu commented Aug 27, 2019

After pip installing instaboost, I tried to import in python, but segmentation fault happens.

python                  
Python 3.7.2 (default, Dec 29 2018, 06:19:36) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import instaboost
Segmentation fault
@Fang-Haoshu
Copy link
Collaborator

Hi, what is your environment? Can you try if python3.6 works?

@Fang-Haoshu
Copy link
Collaborator

We are currently looking into this issue and will update the pip package soon. BTW, what is the version of your opencv?

@yanjiaweisysu
Copy link
Author

That's cool. My opencv is 4.0.1.

@GothicAi
Copy link
Owner

Hi! This problem may be caused by opencv-mat package. We have tested our opencv-mat package on several different environments, and we find out that this package may not work well on OpenCV 3.x or higher sometimes. May you try OpenCV 2.4.x instead? Some instructions here may help. Thanks !

@Fang-Haoshu
Copy link
Collaborator

Hi, we update an easy install and fast version. You can check it out here: https://github.com/GothicAi/Instaboost#easy-install-version

@jaideep11061982
Copy link

@GothicAi @Fang-Haoshu

I try to use it in MMdet
but i get below error ,an help

Original Traceback (most recent call last):
dict(type='InstaBoost'),

  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/kaggle/working/mmdetection/mmdet/datasets/custom.py", line 195, in __getitem__
    data = self.prepare_train_img(idx)
  File "/kaggle/working/mmdetection/mmdet/datasets/custom.py", line 218, in prepare_train_img
    return self.pipeline(results)
  File "/kaggle/working/mmdetection/mmdet/datasets/pipelines/compose.py", line 41, in __call__
    data = t(data)
  File "/kaggle/working/mmdetection/mmdet/datasets/pipelines/instaboost.py", line 110, in __call__
    anns, img.astype(np.uint8), self.cfg, background=None)
  File "/opt/conda/lib/python3.7/site-packages/instaboostfast/InstaBoost.py", line 33, in get_new_data
    extract(ori_anns, ori_img, config)
  File "/opt/conda/lib/python3.7/site-packages/instaboostfast/get_instance_group.py", line 134, in extract
    mask, labels = __get_coco_masks(anns, height, width)
  File "/opt/conda/lib/python3.7/site-packages/instaboostfast/get_instance_group.py", line 54, in __get_coco_masks
    m = cocoseg_to_binary(ann['segmentation'], height, width)  # zero one mask
  File "/opt/conda/lib/python3.7/site-packages/instaboostfast/get_instance_group.py", line 29, in cocoseg_to_binary
    rle = cocomask.merge(seg)
  File "pycocotools/_mask.pyx", line 153, in pycocotools._mask.merge
  File "pycocotools/_mask.pyx", line 128, in pycocotools._mask._frString
TypeError: string indices must be integers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants