Open Anhaoxu opened 7 years ago
cell [7] of coco/PythonAPI/pycocoDemo.ipynb
# get all images containing given categories, select one at random
catIds = coco.getCatIds(catNms=['person','dog','skateboard']);
imgIds = coco.getImgIds(catIds=catIds );
you can choose the catIds based on the catNms you want (i.e. 'person','dog','skateboard', etc.) then load only the images with those classes.
that what you need???
hi, vchiley, the ref code load only the images with special classes. is there some guideline for pick the special classes's annotations?
Hi how can i save all the images of a particular class to a folder?
Is it possible to pull only few class images and annotation and save it in a folder using coco api ?
Yes. Give the names of the classes required.
On Thu 20 Dec, 2018, 5:03 PM Rahul-Venugopal <notifications@github.com wrote:
Is it possible to pull only few class images and annotation and save it in a folder using coco api ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocodataset/cocoapi/issues/67#issuecomment-448966030, or mute the thread https://github.com/notifications/unsubscribe-auth/AWbURMOZES4H-yl4n8videE4U2mYkRo5ks5u63VvgaJpZM4O_lh5 .
hi, can I pick 6 classes pictures to use? coco has too many classes, which in some cases is not useful, so how to pick some interest class to become a new small coco dataset for me to use ?