def METHOD_NAME(image_table_filename, chip_table_filename):
    image_ids = defaultdict(list)
    with open(image_table_filename, 'rb') as image_table_file:
        image_reader = csv.reader(image_table_file, delimiter=',', quotechar=',')
        for row in image_reader:
            # ignore the header and comments
            if row[0].startswith('#'):
                continue
            else:
                img_id = row[0].strip()
                img_name = row[1].strip()
                image_ids[img_id] = img_name
    # initialise all dict elements to an empty list
    images = defaultdict(list)
    with open(chip_table_filename, 'rb') as chip_table_file:
        chip_reader = csv.reader(chip_table_file, delimiter=',', quotechar=',')
        for row in chip_reader:
            # ignore the header and comments
            if row[0].startswith('#'):
                continue
            else:
                img_id = row[1].strip()
                # remove the square brackets at the front and back of ROI
                roi = list(map(int, re.sub('[^0-9]', ' ', row[3]).split()))
                img_name = image_ids[img_id]
                # convert from HotSpotter bounding box to PASCAL-VOC: xmax, xmin, ymax, ymin
                tlx, tly, w, h = roi
                images[img_name].append(np.array([tlx + w, tlx, tly + h, tly]))
    return images