coco_dataset.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:DeepMIML 作者: kingfengji 项目源码 文件源码
def _load_coco_annotation(self, index):
        annIds = self.COCO.getAnnIds(imgIds=index, iscrowd=None)
        objs = self.COCO.loadAnns(annIds)
        bag_labels = np.zeros(self.num_classes)
        for obj in objs:
            cls = self.coco_cat_id_to_class_ind[obj['category_id']]
            bag_labels[cls] = 1
        return bag_labels
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号