From 67b1912916495e374c0246d41f87a720ba1aadf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <traizetc@cesbio.cnes.fr> Date: Tue, 27 Jun 2017 15:53:52 +0200 Subject: [PATCH] comments added/modified --- README.md | 25 ++++++++++++++++++++++++ app/cbDimensionalityReduction.cxx | 32 +++++++++++++------------------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e69de29bb2..a46b8fbf8a 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,25 @@ +This module contains a new dimensionality reduction framework for the Orfeo Toolbox. + +The framework is based on Machine learning models and a dimensionality reduction algorithm +can be trained and used using the model class, in the same fashion as Machine Learning Models +for Classification (supervised or unspervised) and Regression. + +The algorithms featured in the module are (27/06/2017) : + - autoencoders and multi layer autoencoders, with several regularization options + - PCA + - SOM + + Autoencoders and PCA models are using Shark ML library, while SOM model is based on the SOM classes of the OTB. + + More specifically, the module contains : + + - Autoencoder models, PCA models and SOM models, with methods for training, serialization and prediction (i.e. reduction) + - A Dimensionality Reduction Model Factory and a factories for each model, which allow the user to create objects of the model classes + - A (OTB ImageToImage) filter that can be used to perform dimensionality reduction on an image. This filter supports threading and streaming + - An application for training the models according to a shapefile + - An application for using a trained model on a shapefile + - An application for using a trained model on an image (using the filter) + + /!\ Work In Progress /!\ + + diff --git a/app/cbDimensionalityReduction.cxx b/app/cbDimensionalityReduction.cxx index 6d5366e9eb..106f609d48 100644 --- a/app/cbDimensionalityReduction.cxx +++ b/app/cbDimensionalityReduction.cxx @@ -112,33 +112,27 @@ protected: private: void DoInit() ITK_OVERRIDE { - SetName("PredictRegression"); - SetDescription("Performs a prediction of the input image according to a regression model file."); + SetName("DimensionalityReduction"); + SetDescription("Performs dimensionality reduction of the input image according to a dimensionality reduction model file."); // Documentation - SetDocName("Predict Regression"); - SetDocLongDescription("This application predict output values from an input" - " image, based on a regression model file produced by" - " the TrainRegression application. Pixels of the " - "output image will contain the predicted values from" - "the regression model (single band). The input pixels" + SetDocName("DimensionalityReduction"); + SetDocLongDescription("This application reduces the dimension of an input" + " image, based on a dimensionality reduction model file produced by" + " the DimensionalityReductionTrainer application. Pixels of the " + "output image will contain the reduced values from" + "the model. The input pixels" " can be optionally centered and reduced according " "to the statistics file produced by the " - "ComputeImagesStatistics application. An optional " - "input mask can be provided, in which case only " - "input image pixels whose corresponding mask value " - "is greater than 0 will be processed. The remaining" - " of pixels will be given the value 0 in the output" - " image."); + "ComputeImagesStatistics application. "); SetDocLimitations("The input image must contain the feature bands used for" - " the model training (without the predicted value). " + " the model training. " "If a statistics file was used during training by the " "TrainRegression, it is mandatory to use the same " - "statistics file for prediction. If an input mask is " - "used, its size must match the input image size."); + "statistics file for prediction."); SetDocAuthors("OTB-Team"); - SetDocSeeAlso("TrainRegression, ComputeImagesStatistics"); + SetDocSeeAlso("DimensionalityReductionTrainer, ComputeImagesStatistics"); AddDocTag(Tags::Learning); @@ -187,7 +181,7 @@ private: inImage->UpdateOutputInformation(); unsigned int nbFeatures = inImage->GetNumberOfComponentsPerPixel(); - // Load svm model + // Load DR model using a factory otbAppLogINFO("Loading model"); m_Model = DimensionalityReductionModelFactoryType::CreateDimensionalityReductionModel(GetParameterString("model"), DimensionalityReductionModelFactoryType::ReadMode); -- GitLab