def __init__(self, data_dir, annotation_file):
        """Initialize the TableBank dataset.

        :param data_dir: Directory containing table images.
        :param annotation_file: Path to the TableBank JSON annotation file.
        """
        self.data_dir = data_dir

        with open(annotation_file, encoding="utf-8") as f:
            data = json.load(f)

        self.images = {img["id"]: img["file_name"] for img in data["images"]}
        self.annotations = data["annotations"]
        self.transform = transform
Initialize the TableBank dataset.

        :param data_dir: Directory containing table images.
        :param annotation_file: Path to the TableBank JSON annotation file.
        
examples/table_transformer_detection/ttd.py