Package: deeposlandia
This project aims at showcasing some Deep Learning use cases in terms of image
analysis, especially regarding semantic segmentation.If you want to get more details on Oslandia activities around this topic, feel
free to visit ourblog. You certainly want to
discover some of our results in the
associatedweb application:ContentThe project contains the following folders:deeposlandiacontains the main Python modules to train and
test convolutional neural networksdocscontains some markdown files for documentation purposeexamplescontains some Jupyter notebooks that aim at
describing data and building basic neural networksimagescontains some example images to illustrate the Mapillary
dataset as well as some preprocessing analysis resultstests;pytestis used to launch several tests from this folder.Additionally, running the code may generate extra subdirectories in the chosen
data repository.InstallationRequirementsThe code has been run with Python 3. The dependencies are specified insetup.pyfile, and additional dependencies for developing purpose are listed
inrequirements-dev.txt.From source$ git clone https://github.com/Oslandia/deeposlandia
$ cd deeposlandia
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
(venv)$ pip install -r requirements-dev.txtGDALAs a particular case, GDAL is not included into thesetup.pyfile.ForUbuntudistributions, the following operations are needed to install this
program:sudo apt-get install libgdal-dev
sudo apt-get install python3-gdalTheGDALversion can be verified by:gdal-config --versionAfter that, a simplepip install GDALmay be sufficient, however considering
our own experience it is not the case on Ubuntu. One has to retrieve aGDALfor Python that corresponds to theGDALof system:pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
python3 -c "import osgeo;print(osgeo.__version__)"For other OS, please visit theGDALinstallation documentation.Running the codeA command-line interface is proposed with 4 available actions (datagen,train,inferandgeoinfer), callable as follows:deepo [command] --optionsSome files document the command use:Preprocessed dataset generationTrain a modelInfer labelsInfer results for geographic datasetsRun your own web app instanceSupported datasetsMapillaryIn this project we use a set of images provided
byMapillary, in order to investigate on the
presence of some typical street-scene objects (vehicles, roads,
pedestrians...). Mapillary released this dataset on July 2017, it
isavailable on its websiteand may
be downloaded freely for a research purpose.As inputs, Mapillary provides a bunch of street scene images of various sizes
in aimagesrepository, and the same images after filtering process ininstancesandlabelsrepositories.There are 18000 images in the training set, 2000 images in the validation set,
and 5000 images in the testing set. The testing set is proposed only for a
model test purpose, it does not contain filtered versions of images. The raw
dataset contains 66 labels, splitted into 13 categories. The following figure
depicts a prediction result over the 13-labelled dataset version.AerialImage (Inria)In theAerial image dataset,
there are only 2 labels, i.e.buildingorbackgroundand consequently the
model aims at answering one single question for each image pixel: does this
pixel belongs to a building?The dataset contains 360 images, one half for training one half for
testing. Each of these images are 5000*5000tifimages. Amongst the 180
training images, we assigned 15 training images to validation. One example of
this image from this dataset is depicted below.Open AI TanzaniaThis dataset comes from
theTanzania challenge,
that took place at the autumn 2018. The dataset contains 13 labelled images (2
of them were assigned to validation in this project), and 9 additional images
for testing purpose. The image resolution is very high (6~8 cm per pixel), that
allowing a fine data preprocessing step.In such a dataset, one tries to automatically detect building footprints by
distinguishing complete buildings, incomplete buildings and foudations.ShapesTo complete the project, and make the test easier, a randomly-generated shape
model is also available. In this dataset, some simple coloured geometric shapes
are inserted into each picture, on a total random mode. There can be one
rectangle, one circle and/or one triangle per image, or neither of them. Their
location into each image is randomly generated (they just can't be too close to
image borders). The shape and background colors are randomly generated as well.How to add a new dataset?If you want to contribute to the repo by adding a new dataset, please consult thefollowing instructions.Pre-trained modelsThis project implies non-commercial use of datasets, anyway we can work with
the dataset emitters to get commercial licences if it fits your demand. May you
be interested in any pre-trained models, please contact us atinfos+data@oslandia.com!LicenseThe program license is described inLICENSE.md.Oslandia, April 2018