I am following a tutorial on training your own custom dataset and I am using this Collab tutorial to do so.
Things go smoothly until I get to step 3 of 'Train the object Detection model'. I get this error
ValueError: The size of the train_data (0) couldn't be smaller than batch_size (2). To solve this problem, set the batch_size smaller or increase the size of the train_data.
This leads me to believe my train_data is empty which I am confused about. Am I downloading and loading the dataset correctly?
This is how I download the dataset
!git clone https://github.com/priedejm/shirts.git
!unzip -q shirts/shirts.zip
This is how I load the dataset - I am not sure why shirts/train is there twice but thats how the original does it
train_data = object_detector.DataLoader.from_pascal_voc(
'shirts/train',
'shirts/train',
['shirt', 'pants']
)
val_data = object_detector.DataLoader.from_pascal_voc(
'shirts/validate',
'shirts/validate',
['shirt', 'pants']
)
And this is how the tutorial does it
!wget https://storage.googleapis.com/download.tensorflow.org/data/android_figurine.zip
!unzip -q android_figurine.zip
train_data = object_detector.DataLoader.from_pascal_voc(
'android_figurine/train',
'android_figurine/train',
['android', 'pig_android']
)
val_data = object_detector.DataLoader.from_pascal_voc(
'android_figurine/validate',
'android_figurine/validate',
['android', 'pig_android']
)