Source code for the TUCMI submissions to the GeoLifeCLEF 2018 species recognition task
By Stefan Taubert, Max Mauermann, Stefan Kahl, Thomas Wilhelm-Stein, Danny Kowerko and Maximilian Eibl
This is the sourcecode for our submissions to the GeoLifeCLEF 2018 species recognition task.
Contact: Stefan Taubert, Technische Universität Chemnitz, Media Informatics
E-Mail: github@stefantaubert.com
This project is licensed under the terms of the MIT license.
Please cite the paper in your publications if it helps your research.
@article{taubert2018large,
title={Species Prediction based on Environmental Variables using Machine Learning Techniques},
author={Taubert, Stefan and Mauermann, Max and Kahl, Stefan and Wilhelm-Stein, Thomas and Kowerko, Danny and Ritter, Marc and Eibl, Maximilian},
journal={Working notes of CLEF},
year={2018}
}
You can download our working notes here: TUCMI GeoLifeCLEF Working Notes PDF
git clone git@github.com:stefantaubert/lifeclef-geo-2018.git
cd lifeclef-geo-2018
sudo pip install –r requirements.txt
For the training you need to download the GeoLifeCLEF training data.
You need to set up the path to the directory with the datasets.
Therefor you need to create a file geo/data_dir_config.py
which defines a root
-variable and looks like this:
root = "/path/to/datasetdir"
In this dataset directory should be the following files and directories:
occurrences_test.csv
occurrences_train.csv
patchTrain
¦ 256
¦ ¦ patch_1.tif
¦ ¦ patch_2.tif
¦ ¦ ...
¦ 512
¦ ¦ patch_257.tif
¦ ¦ patch_258.tif
¦ ¦ ...
¦ ...
patchTest
¦ 256
¦ ¦ patch_1.tif
¦ ¦ patch_2.tif
¦ ¦ ...
¦ 512
¦ ¦ patch_257.tif
¦ ¦ patch_258.tif
¦ ¦ ...
¦ ...
To run any of the eight models you need to navigate to the specific model directory and execute the according python script:
PYTHONPATH=/path/to/gitrepo python geo/models/xgb/single_model.py
PYTHONPATH=/path/to/gitrepo python geo/models/xgb/multi_model.py
PYTHONPATH=/path/to/gitrepo python geo/models/xgb/multi_model_with_groups.py
PYTHONPATH=/path/to/gitrepo python geo/models/keras/train_keras_model.py
PYTHONPATH=/path/to/gitrepo python geo/models/keras/train_keras_model.py
PYTHONPATH=/path/to/gitrepo python geo/models/vector/model.py
PYTHONPATH=/path/to/gitrepo python geo/models/random/model.py
PYTHONPATH=/path/to/gitrepo python geo/models/probability/model.py
If you want to run the tests you need to run the specific script in the test dir:
PYTHONPATH=/path/to/gitrepo python geo/tests/test_*.py
You can run our analysis with any script in the geo/analysis/
directory for instance:
PYTHONPATH=/path/to/gitrepo python geo/analysis/species_occurences.py
Look at this post on StackOverflow to set the PYTHONPATH. An other possibility is to use Visual Studio Code and set the launch.json
like this:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"env": {"PYTHONPATH":"${workspaceRoot}"}
}
]
}