Watermark binary classifier

16 views
Skip to first unread message

Javier Moncayo

unread,
May 12, 2021, 12:47:59 PMMay 12
to Discuss
Hi all,

I am stuck with my model to identify if a picture has a watermak on it or not. My metrics don't move from: loss: 0.6931 - accuracy: 0.5000 - val_loss: 0.6931 - val_accuracy: 0.5000

I have prepared a data folder structure like:
  • Training
    • Watermark
    • No_watermark
  • Validation
    • Watermark
    • No_watermark
I have attached an example of my first experiment with my own watermark for testing.

On my first attemp, I have used a 1000 images dataset. 500 in each category.

The model I am using is VERY simple.... 

  • Any idea why the metrics don't move?
  • How can I improve it?
  • Any tip/suggestion?
model = tf.keras.models.Sequential([
        tf.keras.layers.Conv2D(64, (3,3), activation='relu', input_shape=(250, 250, 3)),
        tf.keras.layers.MaxPooling2D(2, 2),
        tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
        tf.keras.layers.MaxPooling2D(2,2),
        tf.keras.layers.Conv2D(128, (3,3), activation='relu'),
        tf.keras.layers.MaxPooling2D(2,2),
        tf.keras.layers.Conv2D(128, (3,3), activation='relu'),
        tf.keras.layers.MaxPooling2D(2,2),
        tf.keras.layers.Flatten(),
        tf.keras.layers.Dropout(0.5),
        tf.keras.layers.Dense(512, activation='relu'),
        tf.keras.layers.Dense(1, activation='sigmoid')
])

model.compile(loss = 'binary_crossentropy',
                                optimizer='rmsprop',
                                metrics=['accuracy'])

history = model.fit(train_generator, 
                  epochs=25,
                        validation_data = validation_generator,
                        verbose = 1,
                        validation_steps=3)


239_01_03.png
328_01_03.png
Reply all
Reply to author
Forward
0 new messages