Home

Awesome

airbus-ship-detection

https://www.kaggle.com/competitions/airbus-ship-detection/overview

Task was solved in colab, easy to test here: https://colab.research.google.com/drive/1kKh8gFHYckXl4tHxKqgwoAgk6Y5-mPv4?usp=sharing

Features

1. Used DeepLabV3+ model with trained ResNet50

https://keras.io/examples/vision/deeplabv3_plus/

Masks generated as png files

2. Class balance

Segmentation is presented as a binary classification (there is a ship or not), and we have a unbalance of classes even in one picture where there is a ship. Since class_weight cannot be used with output folds, I wrote own loss (weighted_binary_crossentropy), where weight can be set for one class. Also I deleted pictures where there are no ships.

3. Augmentation

When augmenting, I first accidentally cut out a piece of 256 * 256. After that, I randomly flip horizontally, vertically and rotate 90 degrees (8 positions). Do the same for the mask.

I also change a little brightness, contrast, saturation, add noise. There is no resizing, so there is no loss of information, plus it is possible to learn from pictures of any size. Also, because of the crop, a lot of pictures without ships are formed, so the original pictures without them are not needed.

4. Gradient Centralization

https://arxiv.org/abs/2004.01461

5. Checkpoin in training, threshold at predict. Predict generated by 9 parts of image

Files

Results

I get a good score in first try.

What to do for best score

If I have time as challenge going I do this all and more when I'll see results