I have loaded a dataset from tfds.load and want to throw away certain images that interfere with proper training/are of no use to me (for example, are too small).
It seems like there is absolutely no information on this specific problem anywhere so I went with what seems like the best fit which was .filter(predicate) on the dataset. Unfortunately the input to the predicate has indeterminate shape (None, None, 3) and as expected raises an error that 'int' cannot be compared with 'NoneType'.
Is it even possible to solve this problem in tensorflow or should I not waste my time?
Pseudo code
ds_train = tfds.load('name')
ds_train = ds_train.map(lambda ds: ds['image'])
ds_train = ds_train.filter(lambda image: image.shape[0] >= 256)