def from_vectors(cls, vecs, intrinsics, device="cpu"):
        """
        Parameters
        ----------
        vecs: Iterable[np.ndarray]
            Iterable of 10D pose representation.

        intrinsics: np.ndarray
            (3, 3) intrinsics matrix.
        """
        if len(vecs) == 0:
            quats = torch.as_tensor([], dtype=torch.float32, device=device).view(-1, 4)
            proj_ctrs = torch.as_tensor([], dtype=torch.float32, device=device).view(-1, 2)
            depths = torch.as_tensor([], dtype=torch.float32, device=device).view(-1, 1)
            sizes = torch.as_tensor([], dtype=torch.float32, device=device).view(-1, 3)
            inv_intrinsics = torch.as_tensor([], dtype=torch.float32, device=device).view(-1, 3, 3)
            return cls(quats, proj_ctrs, depths, sizes, inv_intrinsics)

        quats, proj_ctrs, depths, sizes = [], [], [], []
        for vec in vecs:
            quat = vec[:4]

            proj_ctr = intrinsics.dot(vec[4:7])
            proj_ctr = proj_ctr[:2] / proj_ctr[-1]

            depth = vec[6:7]

            size = vec[7:]

            quats.append(quat)
            proj_ctrs.append(proj_ctr)
            depths.append(depth)
            sizes.append(size)

        quats = torch.as_tensor(quats, dtype=torch.float32, device=device)
        proj_ctrs = torch.as_tensor(proj_ctrs, dtype=torch.float32, device=device)
        depths = torch.as_tensor(depths, dtype=torch.float32, device=device)
        sizes = torch.as_tensor(sizes, dtype=torch.float32, device=device)

        inv_intrinsics = np.linalg.inv(intrinsics)
        inv_intrinsics = torch.as_tensor(inv_intrinsics[None, ...], device=device).expand(len(vecs), 3, 3)

        return cls(quats, proj_ctrs, depths, sizes, inv_intrinsics)

        Parameters
        ----------
        vecs: Iterable[np.ndarray]
            Iterable of 10D pose representation.

        intrinsics: np.ndarray
            (3, 3) intrinsics matrix.
        
tridet/structures/boxes3d.py