Skip to content
3rd place solution
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
README.md
a00_common_functions.py
a00_common_functions_scores.py
a00_custom_layers.py
a01_densenet_121.py
a01_densenet_161.py
a01_densenet_169.py
a01_inception_v4.py
a01_resnet_101.py
a01_resnet_152.py
a01_squeezenet.py
a02_zoo.py
a11_find_neighbours.py
a30_create_keras_models.py
a30_create_keras_models_land.py
a30_create_keras_models_single_class.py
a30_create_keras_models_weather.py Initial commit Aug 31, 2017
a31_create_cnn_features_basic.py
a31_create_cnn_features_land.py Initial commit Aug 31, 2017
a31_create_cnn_features_weather.py
a32_create_cnn_features_single_class.py
a32_find_neighbours_features.py
a42_gbm_blender.py
a42_keras_blender.py
a50_ensemble_from_cache_v1.py

README.md

Repository contains code to solve Kaggle problem Planet: Understanding the Amazon from Space. This solution won 3rd place in competition.

Requirements:

Python >= 3.4, Keras 1.2.1, Theano 0.9.2, Tensorflow, XGBoost 0.6

How to run:

You need to execute set of scripts one by one:

  • python a11_find_neighbours.py
  • python a30_create_keras_models.py
  • python a30_create_keras_models_land.py
  • python a30_create_keras_models_weather.py
  • python a30_create_keras_models_single_class.py
  • python a31_create_cnn_features_basic.py
  • python a31_create_cnn_features_land.py
  • python a31_create_cnn_features_weather.py
  • python a32_create_cnn_features_single_class.py
  • python a32_find_neighbours_features.py
  • python a42_gbm_blender.py
  • python a42_keras_blender.py
  • python a50_ensemble_from_cache_v1.py

Notes:

  1. Recreating all CNN models from scratch on single GPU will require a lot of time (around a month). It can be parallelized using separate GPU on different CNN models. Final models weights size ~50 GB. Msg me if you need these weights.
  2. Creating neighbours features requires around a day to complete.
  3. Due to high parallelization, CNN models trained on GPU can slightly differ even in case it was trained on the same code.
  4. A little bit details about solution available on Kaggle forum

Directory structure:

  • -- input - input data as it was given on Kaggle
  • -- Kaggle-Planet-Understanding-the-Amazon-from-Space - all the Python code (this repo)
  • -- models - all generated models from neural nets will be in this folder.
  • -- weights - files with weights for pretrained models. Link: Download
  • -- modified_data - some intermediate files for neighbour analysis
  • -- features - all raw features generated by neural nets will be stored in this folder. We already have them calculated. Link: Download
  • -- cache - this folder will contain arrays with predictions from XGBoost and Keras blenders
  • -- subm - final predictions (in format of submit file for Kaggle)

Dataflow

Dataflow

You can’t perform that action at this time.