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

Training with partially empty segmentation masks #489

Open
sabine1993 opened this issue Jul 28, 2020 · 4 comments
Open

Training with partially empty segmentation masks #489

sabine1993 opened this issue Jul 28, 2020 · 4 comments

Comments

@sabine1993
Copy link

Hi everyone,
does any one know if there is a possibility to train yolact with partly empty segmentation masks?
I don't have a mask for specific classes but I want to train one model.
I tried using segmentation=[] but I am running into an error during training.

File "C:\Users\skugler\AppData\Local\Continuum\anaconda3\envs\env_yolact\lib\site-packages\torch_utils.py", line 369, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\skugler\AppData\Local\Continuum\anaconda3\envs\env_yolact\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\skugler\AppData\Local\Continuum\anaconda3\envs\env_yolact\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\skugler\AppData\Local\Continuum\anaconda3\envs\env_yolact\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\skugler\Desktop\Sabine_master\yolact\data\coco.py", line 95, in getitem
im, gt, masks, h, w, num_crowds = self.pull_item(index)
File "C:\Users\skugler\Desktop\Sabine_master\yolact\data\coco.py", line 154, in pull_item
masks = [self.coco.annToMask(obj).reshape(-1) for obj in target]
File "C:\Users\skugler\Desktop\Sabine_master\yolact\data\coco.py", line 154, in
masks = [self.coco.annToMask(obj).reshape(-1) for obj in target]
File "C:\Users\skugler\AppData\Local\Continuum\anaconda3\envs\env_yolact\lib\site-packages\pycocotools\coco.py", line 431, in annToMask
rle = self.annToRLE(ann)
File "C:\Users\skugler\AppData\Local\Continuum\anaconda3\envs\env_yolact\lib\site-packages\pycocotools\coco.py", line 416, in annToRLE
rles = maskUtils.frPyObjects(segm, h, w)
File "pycocotools_mask.pyx", line 292, in pycocotools._mask.frPyObjects
IndexError: list index out of range

Has anyone solved this problem or has an idea how to solve it?

@sabine1993 sabine1993 changed the title Training with empty segmentation masks Training with partially empty segmentation masks Jul 28, 2020
@Fuli-Wang
Copy link

I've meet the same issue

@DozieSixtus
Copy link

I just encountered this issue. Any solutions yet?

@DozieSixtus
Copy link

I've meet the same issue

Have you been able to solve it?

@Fuli-Wang
Copy link

I've meet the same issue

Have you been able to solve it?

I think it is necessary to train YolAct with segmentation masks. So I used Labelme to relabel my dataset and then I can train my dataset.

See the below to use Labelme:
#70 (comment)

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

3 participants