uw_rgbd.py 文件源码

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

项目:pybot 作者: spillai 项目源码 文件源码
def _process_items(self, index, rgb_im, depth_im, bbox, pose): 
            def _process_bbox(bbox): 
                return AttrDict(category=bbox['category'], 
                                target=UWRGBDDataset.target_hash[str(bbox['category'])], 
                                coords=np.int64([bbox['left'], bbox['top'], bbox['right'], bbox['bottom']]))

            # Compute bbox from pose and map (v2 support)
            if self.version == 'v1': 
                if bbox is not None: 
                    bbox = [_process_bbox(bb) for bb in bbox]
                    bbox = filter(lambda bb: bb.target in UWRGBDDataset.train_ids_set, bbox)

            if self.version == 'v2': 
                if bbox is None and hasattr(self, 'map_info'): 
                    bbox = self.get_bboxes(pose)

            # print 'Processing pose', pose, bbox
            return AttrDict(index=index, img=rgb_im, depth=depth_im, 
                            bbox=bbox if bbox is not None else [], pose=pose)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号