The images and bounding boxes display properly.
When I attempt to any augment function the following stack trace is produced:
I must have something setup incorrectly, however the visualize dataset function works.
How do i determine where the the issue/problem is?
The images and bounding boxes display properly. When I attempt to any augment function the following stack trace is produced: I must have something setup incorrectly, however the visualize dataset function works. How do i determine where the the issue/problem is?
Following this documentation: https://keras.io/guides/keras_cv/object_detection_keras_cv/#training-our-model
def load_image(image_path): image = tf.io.read_file(image_path) image = tf.image.decode_image(image, channels=3) return image
def load_dataset(image_path, classes, bbox):
Read Image
augmenters = [ keras_cv.layers.AutoContrast((0, 255)), ]
def create_augmenter_fn(augmenters): def augmenter_fn(inputs): for augmenter in augmenters: inputs = augmenter(inputs) return inputs
augmenter_fn = create_augmenter_fn(augmenters)
train_ds = train_data.map(load_dataset, num_parallel_calls=tf.data.AUTOTUNE) train_ds = train_ds.shuffle(BATCH_SIZE * 4) train_ds = train_ds.ragged_batch(BATCH_SIZE, drop_remainder=True) train_ds = train_ds.map(augmenter_fn, num_parallel_calls=tf_data.AUTOTUNE)