def METHOD_NAME(self):
    annotation_file = f"{self.root}/sub-{self.dataset_type}-annotations-bbox.csv"
    annotations = pd.read_csv(annotation_file)
    class_names = ['BACKGROUND'] + sorted(list(annotations['ClassName'].unique()))
    class_dict = {class_name: i for i, class_name in enumerate(class_names)}
    data = []
    for image_id, group in annotations.groupby("ImageID"):
        boxes = group.loc[:, ["XMin", "YMin", "XMax", "YMax"]].values.astype(np.float32)
        # make labels 64 bits to satisfy the cross_entropy function
        labels = np.array([class_dict[name] for name in group["ClassName"]], dtype='int64')
        data.append({
            'image_id': image_id,
            'boxes': boxes,
            'labels': labels
        })
    return data, class_names, class_dict