def __getitem__(self, index):
        """
        Keras sequence method for generating batches.
        """
        group = self.groups[index]
        inputs, targets = self.compute_input_output(group)

        return inputs, targets

        Keras sequence method for generating batches.
        
keras_retinanet/preprocessing/generator.py