Open lianshushu opened 6 years ago
I had read the demon program but did not get help for my work. I need to get the instance segmentaion label for every image. Do you have any example or document about the kind of operation please. Thank you so much!
when given an image name , I want to get all instances or object label in this image from 0-80 pixel by pixel. The demon code seems to be given an instance class id and get you the image id(name) which made confused.
You can always ignore some of the fields:
annIds = coco_kps.getAnnIds(imgIds=img['id'], catIds=catIds, iscrowd=None)
Just don't set catIds. Then run
anns = coco_kps.loadAnns(annIds)
And then convert the annotations to a pixel level mask, similar to https://github.com/nightrome/cocoapi/blob/master/PythonAPI/pycocotools/cocostuffhelper.py#L98
After a lot of effort and search, I was finally able to install coco API. I am trying to run a video captioning code. A neural network for video captioning. These are the libraries which are not executing because anaconda coco API doesn't work anymore. But I installed it anyway. from pycocoevalcap.tokenizer.ptbtokenizer import PTBTokenizer from pycocoevalcap.bleu.bleu import Bleu from pycocoevalcap.meteor.meteor import Meteor from pycocoevalcap.rouge.rouge import Rouge from pycocoevalcap.cider.cider import Cider
The only line that is executing is this one. from pycocotools.coco import COCO
How do I run the rest of the above library lines?
Thanks in advance.
@Shanzaay I don't think you properly setup the API. The file is at https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/coco.py . Somehow that folder does not seem to be on your PYTHONPATH.
@nightrome it's my first time with this kinda thing. Call me a newbie. Now I am more confused than before. Can you guide me in this? How do I make those libraries execute and how to properly install coco API. And yeah you are right now I am having an error even on this line now: from pycocotools.coco import COCO
A step by step guidance will be great.
Thanks a lot.
@Shanzaay
The instructions are at: https://github.com/cocodataset/cocoapi
You can verify your PYTHONPATH by doing echo $PYTHONPATH
.
If there is no entry there for COCO, then check the various other issues in this forum and see if anyone has similar problems.
Ok, I'll try it @nightrome. And thanks a bunch.
@nightrome so here are the steps i performed: I clone the repo i commented this line in setup.py:
other wise it give error
once it installed i get something like this: Using c:\users\myusername\anaconda3\lib\site-packages Finished processing dependencies for pycocotools==2.0
But i am still having the error. What is it that i am doing wrong?
@Shanzaay Sorry, I haven't tried it on Windows. Please take a look at the various other Windows issues, e.g. https://github.com/cocodataset/cocoapi/issues/9
Ok thanks. @nightrome does cocoAPI is not supported by Python 3?
Python 3 should not be a problem. But they officially state on the link above that Windows is not supported.
Hey, I have recently written an entire post on exploring and manipulating the COCO dataset for Image Segmentation. Do have a look.
Hey, I have recently written an entire post on exploring and manipulating the COCO dataset for Image Segmentation. Do have a look.
I read your post, and my got my answer about how to get mask from the dataset. Thanks a lot.
I assume you are talking about object/thing segmentation. In that case take a look at https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocoDemo.ipynb . For stuff segmentation go to https://github.com/nightrome/cocoapi