def get_birds_eye_view_label(
            self,
            gt_agent_boxes,
            gt_agent_feats
        ):
        '''
        gt_agent_boxes (LiDARInstance3DBoxes): list of GT Bboxs.
            dim 9 = (x,y,z)+(w,l,h)+yaw+(vx,vy)
        gt_agent_feats: (A, 4*T+10)
            dim 4*T+10 = fut_traj(T*2) + fut_mask(T) + goal(1) + lcf_feat(9) + fut_yaw(T)
            lcf_feat (x, y, yaw, vx, vy, width, length, height, type)
        '''

        segmentation = np.zeros((self.fut_ts, self.bev_dimension[0], self.bev_dimension[1]))
        pedestrian = np.zeros((self.fut_ts, self.bev_dimension[0], self.bev_dimension[1]))
        agent_num = gt_agent_feats.shape[0]

        gt_agent_boxes = gt_agent_boxes.cpu().numpy()  #(N, 9)
        gt_agent_feats = gt_agent_feats.cpu().numpy()

        gt_agent_fut_trajs = gt_agent_feats[..., :self.fut_ts*2].reshape(-1, self.fut_ts, 2)
        gt_agent_fut_mask = gt_agent_feats[..., self.fut_ts*2:self.fut_ts*3].reshape(-1, self.fut_ts)
        # gt_agent_lcf_feat = gt_agent_feats[..., T*3+1:T*3+10].reshape(-1, 9)
        gt_agent_fut_yaw = gt_agent_feats[..., self.fut_ts*3+10:self.fut_ts*4+10].reshape(-1, self.fut_ts, 1)
        gt_agent_fut_trajs = np.cumsum(gt_agent_fut_trajs, axis=1)
        gt_agent_fut_yaw = np.cumsum(gt_agent_fut_yaw, axis=1)

        gt_agent_boxes[:,6:7] = -1*(gt_agent_boxes[:, 6:7] + np.pi/2) # NOTE: convert yaw to lidar frame
        gt_agent_fut_trajs = gt_agent_fut_trajs + gt_agent_boxes[:, np.newaxis, 0:2]
        gt_agent_fut_yaw = gt_agent_fut_yaw + gt_agent_boxes[:, np.newaxis, 6:7]
        
        for t in range(self.fut_ts):
            for i in range(agent_num):
                if gt_agent_fut_mask[i][t] == 1:
                    # Filter out all non vehicle instances
                    category_index = int(gt_agent_feats[i, 3*self.fut_ts+9])
                    agent_length, agent_width = gt_agent_boxes[i][4], gt_agent_boxes[i][3]
                    x_a = gt_agent_fut_trajs[i, t, 0]
                    y_a = gt_agent_fut_trajs[i, t, 1]
                    yaw_a = gt_agent_fut_yaw[i, t, 0]
                    param = [x_a, y_a, yaw_a, agent_length, agent_width]
                    if (category_index in self.category_index['vehicle']):
                        poly_region = self._get_poly_region_in_image(param)
                        cv2.fillPoly(segmentation[t], [poly_region], 1.0)
                    if (category_index in self.category_index['human']):
                        poly_region = self._get_poly_region_in_image(param)
                        cv2.fillPoly(pedestrian[t], [poly_region], 1.0)

        return segmentation, pedestrian

        gt_agent_boxes (LiDARInstance3DBoxes): list of GT Bboxs.
            dim 9 = (x,y,z)+(w,l,h)+yaw+(vx,vy)
        gt_agent_feats: (A, 4*T+10)
            dim 4*T+10 = fut_traj(T*2) + fut_mask(T) + goal(1) + lcf_feat(9) + fut_yaw(T)
            lcf_feat (x, y, yaw, vx, vy, width, length, height, type)
        
VADv2/VADv2_head.py