I want to train an object detector based on the Train a salad detector with TensorFlow Lite Model Maker notebook 5, but I’m using a dataset in Pascal VOC format 7.
The dataset can be loaded with
dataloader = object_detector.DataLoader.from_pascal_voc('chess-detection/images', 'chess-detection/annotations', ['white-rook', 'white-knight', 'white-bishop', 'white-king', 'white-queen', 'white-pawn', 'black-rook', 'black-knight', 'black-bishop', 'black-king', 'black-queen', 'black-pawn'])

but when trying to split it into a training and validation set using the split method 5 (train_data, validation_data = dataloader.split(0.8)) im getting the following error:
AttributeError Traceback (most recent call last)

[<ipython-input-21-337838b38d0a>](https://localhost:8080/#) in <module>() ----> 1 train_data, validation_data = dataloader.split(0.8)

1 frames

[/usr/local/lib/python3.7/dist-packages/tensorflow_examples/lite/model_maker/core/data_util/dataloader.py](https://localhost:8080/#) in _split(self, fraction, *args) 145 146 train_size = int(self._size * fraction) --> 147 trainset = self.__class__(ds.take(train_size), train_size, *args) 148 149 test_size = self._size - train_size

AttributeError: 'NoneType' object has no attribute 'take'

Any help is greatly appreciated.