mirror of https://github.com/CGAL/cgal
Move all classifiers based on other libraries to dedicated namespaces
This commit is contained in:
parent
9e20888127
commit
c81fbe4688
|
|
@ -201,13 +201,13 @@ Example of cluster classification mesh (left: input, middle: clusters computed f
|
|||
|
||||
%Classification relies on a classifier: this classifier is an object that, from the set of values taken by the features at an input item, computes the probability that an input item belongs to one label or another. A model of the concept `CGAL::Classification::Classifier` must take the index of an input item and store the probability associated to each label in a vector. If a classifier returns the value 1 for a pair of label and input item, it means that this item belongs to this label with certainty; values close to 0 mean that this item is not likely to belong to this label.
|
||||
|
||||
\cgal provides four models for this concept, [ETHZ_random_forest_classifier](@ref CGAL::Classification::ETHZ_random_forest_classifier), [OpenCV_random_forest_classifier](@ref CGAL::Classification::OpenCV_random_forest_classifier), [TensorFlow_neural_network_classifier](@ref CGAL::Classification::TensorFlow_neural_network_classifier) and [Sum_of_weighted_features_classifier](@ref CGAL::Classification::Sum_of_weighted_features_classifier).
|
||||
\cgal provides four models for this concept, [ETHZ::Random_forest_classifier](@ref CGAL::Classification::ETHZ::Random_forest_classifier), [OpenCV::Random_forest_classifier](@ref CGAL::Classification::OpenCV::Random_forest_classifier), [TensorFlow::Neural_network_classifier](@ref CGAL::Classification::TensorFlow::Neural_network_classifier) and [Sum_of_weighted_features_classifier](@ref CGAL::Classification::Sum_of_weighted_features_classifier).
|
||||
|
||||
To perform classification based on four classifiers, please refer to \ref Classification_classification_functions.
|
||||
|
||||
\subsection Classification_ETHZ_random_forest ETHZ Random Forest
|
||||
|
||||
\cgal provides [ETHZ_random_forest_classifier](@ref CGAL::Classification::ETHZ_random_forest_classifier),
|
||||
\cgal provides [ETHZ::Random_forest_classifier](@ref CGAL::Classification::ETHZ::Random_forest_classifier),
|
||||
a classifier based on the Random Forest Template Library developed by
|
||||
Stefan Walk at ETH Zurich \cgalCite{cgal:w-erftl-14} (the library is
|
||||
distributed under the MIT license and is included with the \cgal release,
|
||||
|
|
@ -232,13 +232,13 @@ to README provided in the [ETH Zurich's code archive](https://www.ethz.ch/conten
|
|||
|
||||
\subsection Classification_OpenCV_random_forest OpenCV Random Forest
|
||||
|
||||
The second classifier is [OpenCV_random_forest_classifier](@ref CGAL::Classification::OpenCV_random_forest_classifier).
|
||||
The second classifier is [OpenCV::Random_forest_classifier](@ref CGAL::Classification::OpenCV::Random_forest_classifier).
|
||||
It uses the \ref thirdpartyOpenCV library, more specifically the
|
||||
[Random Trees](http://docs.opencv.org/2.4/modules/ml/doc/random_trees.html)
|
||||
package.
|
||||
|
||||
Note that this classifier usually produces results with a lower
|
||||
quality than [ETHZ_random_forest_classifier](@ref CGAL::Classification::ETHZ_random_forest_classifier).
|
||||
quality than [ETHZ::Random_forest_classifier](@ref CGAL::Classification::ETHZ::Random_forest_classifier).
|
||||
|
||||
It is provided for the sake of completeness and for testing purposes,
|
||||
but if you are not sure what to use, we advise using the ETHZ Random
|
||||
|
|
@ -251,7 +251,7 @@ of OpenCV.
|
|||
|
||||
\subsection Classification_TensorFlow_neural_network TensorFlow Neural Network
|
||||
|
||||
\cgal provides [TensorFlow_neural_network_classifier](@ref CGAL::Classification::TensorFlow_neural_network_classifier).
|
||||
\cgal provides [TensorFlow::Neural_network_classifier](@ref CGAL::Classification::TensorFlow::Neural_network_classifier).
|
||||
|
||||
It uses the C++ API of the \ref thirdpartyTensorFlow library.
|
||||
|
||||
|
|
@ -508,19 +508,19 @@ The following example:
|
|||
|
||||
\subsection Classification_example_ethz_random_forest ETHZ Random Forest
|
||||
|
||||
The following example shows how to use the classifier [ETHZ_random_forest_classifier](@ref CGAL::Classification::ETHZ_random_forest_classifier) using an input training set.
|
||||
The following example shows how to use the classifier [ETHZ::Random_forest_classifier](@ref CGAL::Classification::ETHZ::Random_forest_classifier) using an input training set.
|
||||
|
||||
\cgalExample{Classification/example_ethz_random_forest.cpp}
|
||||
|
||||
\subsection Classification_example_opencv_random_forest OpenCV Random Forest
|
||||
|
||||
The following example shows how to use the classifier [OpenCV_random_forest_classifier](@ref CGAL::Classification::OpenCV_random_forest_classifier) using an input training set.
|
||||
The following example shows how to use the classifier [OpenCV::Random_forest_classifier](@ref CGAL::Classification::OpenCV::Random_forest_classifier) using an input training set.
|
||||
|
||||
\cgalExample{Classification/example_opencv_random_forest.cpp}
|
||||
|
||||
\subsection Classification_example_tensorflow_neural_network TensorFlow Neural Network
|
||||
|
||||
The following example shows how to use the classifier [TensorFlow_neural_network_classifier](@ref CGAL::Classification::TensorFlow_neural_network_classifier) using an input training set.
|
||||
The following example shows how to use the classifier [TensorFlow::Neural_network_classifier](@ref CGAL::Classification::TensorFlow::Neural_network_classifier) using an input training set.
|
||||
|
||||
\cgalExample{Classification/example_tensorflow_neural_network.cpp}
|
||||
|
||||
|
|
@ -530,7 +530,7 @@ The following example:
|
|||
|
||||
- reads a mesh in OFF format;
|
||||
- automatically generates features on 5 scales;
|
||||
- loads a configuration file for classifier [ETHZ_random_forest_classifier](@ref CGAL::Classification::ETHZ_random_forest_classifier);
|
||||
- loads a configuration file for classifier [ETHZ::Random_forest_classifier](@ref CGAL::Classification::ETHZ::Random_forest_classifier);
|
||||
- runs the algorithm using the graphcut regularization.
|
||||
|
||||
\cgalExample{Classification/example_mesh_classification.cpp}
|
||||
|
|
@ -545,7 +545,7 @@ The following example:
|
|||
- detects plane using the algorithm `CGAL::Shape_detection_3::Region_growing`;
|
||||
- creates [Cluster](@ref CGAL::Classification::Cluster) objects from these detected planes;
|
||||
- computes cluster features from the pointwise features;
|
||||
- loads a configuration file for classifier [ETHZ_random_forest_classifier](@ref CGAL::Classification::ETHZ_random_forest_classifier);
|
||||
- loads a configuration file for classifier [ETHZ::Random_forest_classifier](@ref CGAL::Classification::ETHZ::Random_forest_classifier);
|
||||
- runs the algorithm using the raw algorithm.
|
||||
|
||||
\cgalExample{Classification/example_cluster_classification.cpp}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ Concept describing a classifier used by classification functions (see
|
|||
`CGAL::Classification::classify_with_graphcut()`).
|
||||
|
||||
\cgalHasModel `CGAL::Classification::Sum_of_weighted_features_classifier`
|
||||
\cgalHasModel `CGAL::Classification::ETHZ_random_forest_classifier`
|
||||
\cgalHasModel `CGAL::Classification::OpenCV_random_forest_classifier`
|
||||
\cgalHasModel `CGAL::Classification::ETHZ::Random_forest_classifier`
|
||||
\cgalHasModel `CGAL::Classification::OpenCV::Random_forest_classifier`
|
||||
\cgalHasModel `CGAL::Classification::TensorFlow::Neural_network_classifier`
|
||||
|
||||
*/
|
||||
class Classifier
|
||||
|
|
|
|||
|
|
@ -14,6 +14,21 @@ Functions that perform classification based on a set of labels and a classifier,
|
|||
|
||||
Classifiers are functors that, given a label set and an input item, associate this input item with an energy for each label. This energy measures the likelihood of the item to belong to this label.
|
||||
|
||||
\defgroup PkgClassificationClassifiersETHZ ETHZ
|
||||
\ingroup PkgClassificationClassifiers
|
||||
|
||||
Classifiers that use the ETHZ library.
|
||||
|
||||
\defgroup PkgClassificationClassifiersOpenCV OpenCV
|
||||
\ingroup PkgClassificationClassifiers
|
||||
|
||||
Classifiers that use the \ref thirdpartyOpenCV library.
|
||||
|
||||
\defgroup PkgClassificationClassifiersTensorFlow TensorFlow
|
||||
\ingroup PkgClassificationClassifiers
|
||||
|
||||
Classifiers that use the \ref thirdpartyTensorFlow library.
|
||||
|
||||
\defgroup PkgClassificationDataStructures Common Data Structures
|
||||
\ingroup PkgClassificationRef
|
||||
|
||||
|
|
@ -86,9 +101,9 @@ Data structures specialized to classify clusters.
|
|||
|
||||
## Classifiers ##
|
||||
|
||||
- `CGAL::Classification::ETHZ_random_forest_classifier`
|
||||
- `CGAL::Classification::OpenCV_random_forest_classifier`
|
||||
- `CGAL::Classification::TensorFlow_neural_network_classifier<ActivationFunction>`
|
||||
- `CGAL::Classification::ETHZ::Random_forest_classifier`
|
||||
- `CGAL::Classification::OpenCV::Random_forest_classifier`
|
||||
- `CGAL::Classification::TensorFlow::Neural_network_classifier<ActivationFunction>`
|
||||
- `CGAL::Classification::Sum_of_weighted_features_classifier`
|
||||
|
||||
## Common Data Structures ##
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ int main (int argc, char** argv)
|
|||
std::vector<int> label_indices(clusters.size(), -1);
|
||||
|
||||
std::cerr << "Using ETHZ Random Forest Classifier" << std::endl;
|
||||
Classification::ETHZ_random_forest_classifier classifier (labels, features);
|
||||
Classification::ETHZ::Random_forest_classifier classifier (labels, features);
|
||||
|
||||
std::cerr << "Loading configuration" << std::endl;
|
||||
std::ifstream in_config (filename_config, std::ios_base::in | std::ios_base::binary);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ int main (int argc, char** argv)
|
|||
std::vector<int> label_indices(pts.size(), -1);
|
||||
|
||||
std::cerr << "Using ETHZ Random Forest Classifier" << std::endl;
|
||||
Classification::ETHZ_random_forest_classifier classifier (labels, features);
|
||||
Classification::ETHZ::Random_forest_classifier classifier (labels, features);
|
||||
|
||||
std::cerr << "Training" << std::endl;
|
||||
t.reset();
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ int main (int argc, char** argv)
|
|||
std::vector<int> label_indices(mesh.number_of_faces(), -1);
|
||||
|
||||
std::cerr << "Using ETHZ Random Forest Classifier" << std::endl;
|
||||
Classification::ETHZ_random_forest_classifier classifier (labels, features);
|
||||
Classification::ETHZ::Random_forest_classifier classifier (labels, features);
|
||||
|
||||
std::cerr << "Loading configuration" << std::endl;
|
||||
std::ifstream in_config (filename_config, std::ios_base::in | std::ios_base::binary);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ int main (int argc, char** argv)
|
|||
std::vector<int> label_indices(pts.size(), -1);
|
||||
|
||||
std::cerr << "Using OpenCV Random Forest Classifier" << std::endl;
|
||||
Classification::OpenCV_random_forest_classifier classifier (labels, features);
|
||||
Classification::OpenCV::Random_forest_classifier classifier (labels, features);
|
||||
|
||||
std::cerr << "Training" << std::endl;
|
||||
t.reset();
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ int main (int argc, char** argv)
|
|||
std::vector<int> label_indices(pts.size(), -1);
|
||||
|
||||
std::cerr << "Using TensorFlow neural network Classifier" << std::endl;
|
||||
Classification::TensorFlow_neural_network_classifier<> classifier (labels, features);
|
||||
Classification::TensorFlow::Neural_network_classifier<> classifier (labels, features);
|
||||
|
||||
std::cerr << "Training" << std::endl;
|
||||
t.reset();
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@
|
|||
|
||||
#include <CGAL/Classification/classify.h>
|
||||
#include <CGAL/Classification/Sum_of_weighted_features_classifier.h>
|
||||
#include <CGAL/Classification/ETHZ_random_forest_classifier.h>
|
||||
#include <CGAL/Classification/ETHZ/Random_forest_classifier.h>
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_OPENCV
|
||||
#include <CGAL/Classification/OpenCV_random_forest_classifier.h>
|
||||
#include <CGAL/Classification/OpenCV/Random_forest_classifier.h>
|
||||
#endif
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_TENSORFLOW
|
||||
#include <CGAL/Classification/TensorFlow_neural_network_classifier.h>
|
||||
#include <CGAL/Classification/TensorFlow/Neural_network_classifier.h>
|
||||
#endif
|
||||
|
||||
#include <CGAL/Classification/Cluster.h>
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@
|
|||
# pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
#include <CGAL/Classification/internal/auxiliary/random-forest/node-gini.hpp>
|
||||
#include <CGAL/Classification/internal/auxiliary/random-forest/forest.hpp>
|
||||
#include <CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp>
|
||||
#include <CGAL/Classification/ETHZ/internal/random-forest/forest.hpp>
|
||||
|
||||
#include <CGAL/tags.h>
|
||||
|
||||
|
|
@ -61,8 +61,10 @@ namespace CGAL {
|
|||
|
||||
namespace Classification {
|
||||
|
||||
namespace ETHZ {
|
||||
|
||||
/*!
|
||||
\ingroup PkgClassificationClassifiers
|
||||
\ingroup PkgClassificationClassifiersETHZ
|
||||
|
||||
\brief %Classifier based on the ETH Zurich version of random forest algorithm \cgalCite{cgal:w-erftl-14}.
|
||||
|
||||
|
|
@ -70,7 +72,7 @@ namespace Classification {
|
|||
|
||||
\cgalModels `CGAL::Classification::Classifier`
|
||||
*/
|
||||
class ETHZ_random_forest_classifier
|
||||
class Random_forest_classifier
|
||||
{
|
||||
typedef CGAL::internal::liblearning::RandomForest::RandomForest
|
||||
< CGAL::internal::liblearning::RandomForest::NodeGini
|
||||
|
|
@ -89,8 +91,8 @@ public:
|
|||
\brief Instantiate the classifier using the sets of `labels` and `features`.
|
||||
|
||||
*/
|
||||
ETHZ_random_forest_classifier (const Label_set& labels,
|
||||
const Feature_set& features)
|
||||
Random_forest_classifier (const Label_set& labels,
|
||||
const Feature_set& features)
|
||||
: m_labels (labels), m_features (features), m_rfc (NULL)
|
||||
{ }
|
||||
|
||||
|
|
@ -105,8 +107,8 @@ public:
|
|||
than the ones used by `other`, and in the same order.
|
||||
|
||||
*/
|
||||
ETHZ_random_forest_classifier (const ETHZ_random_forest_classifier& other,
|
||||
const Feature_set& features)
|
||||
Random_forest_classifier (const Random_forest_classifier& other,
|
||||
const Feature_set& features)
|
||||
: m_labels (other.m_labels), m_features (features), m_rfc (NULL)
|
||||
{
|
||||
std::stringstream stream;
|
||||
|
|
@ -115,7 +117,7 @@ public:
|
|||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
~ETHZ_random_forest_classifier ()
|
||||
~Random_forest_classifier ()
|
||||
{
|
||||
if (m_rfc != NULL)
|
||||
delete m_rfc;
|
||||
|
|
@ -327,6 +329,13 @@ public:
|
|||
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// Backward compatibility
|
||||
typedef ETHZ::Random_forest_classifier ETHZ_random_forest_classifier;
|
||||
/// \endcond
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // CGAL_CLASSIFICATION_ETHZ_RANDOM_FOREST_CLASSIFIER_H
|
||||
|
|
@ -37,8 +37,10 @@ namespace CGAL {
|
|||
|
||||
namespace Classification {
|
||||
|
||||
namespace OpenCV {
|
||||
|
||||
/*!
|
||||
\ingroup PkgClassificationClassifiers
|
||||
\ingroup PkgClassificationClassifiersOpenCV
|
||||
|
||||
\brief %Classifier based on the OpenCV version of random forest algorithm.
|
||||
|
||||
|
|
@ -46,7 +48,7 @@ namespace Classification {
|
|||
|
||||
\cgalModels `CGAL::Classification::Classifier`
|
||||
*/
|
||||
class OpenCV_random_forest_classifier
|
||||
class Random_forest_classifier
|
||||
{
|
||||
const Label_set& m_labels;
|
||||
const Feature_set& m_features;
|
||||
|
|
@ -80,13 +82,13 @@ public:
|
|||
\param max_number_of_trees_in_the_forest The maximum number of trees in the forest (surprise, surprise). Typically the more trees you have the better the accuracy. However, the improvement in accuracy generally diminishes and asymptotes pass a certain number of trees. Also to keep in mind, the number of tree increases the prediction time linearly.
|
||||
\param forest_accuracy Sufficient accuracy (OOB error).
|
||||
*/
|
||||
OpenCV_random_forest_classifier (const Label_set& labels,
|
||||
const Feature_set& features,
|
||||
int max_depth = 20,
|
||||
int min_sample_count = 5,
|
||||
int max_categories = 15,
|
||||
int max_number_of_trees_in_the_forest = 100,
|
||||
float forest_accuracy = 0.01f)
|
||||
Random_forest_classifier (const Label_set& labels,
|
||||
const Feature_set& features,
|
||||
int max_depth = 20,
|
||||
int min_sample_count = 5,
|
||||
int max_categories = 15,
|
||||
int max_number_of_trees_in_the_forest = 100,
|
||||
float forest_accuracy = 0.01f)
|
||||
: m_labels (labels), m_features (features),
|
||||
m_max_depth (max_depth), m_min_sample_count (min_sample_count),
|
||||
m_max_categories (max_categories),
|
||||
|
|
@ -98,7 +100,7 @@ public:
|
|||
{ }
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
~OpenCV_random_forest_classifier ()
|
||||
~Random_forest_classifier ()
|
||||
{
|
||||
#if (CV_MAJOR_VERSION < 3)
|
||||
if (rtree != NULL)
|
||||
|
|
@ -298,6 +300,13 @@ public:
|
|||
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// Backward compatibility
|
||||
typedef OpenCV::Random_forest_classifier OpenCV_random_forest_classifier;
|
||||
/// \endcond
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // CGAL_CLASSIFICATION_OPENCV_RANDOM_FOREST_CLASSIFIER_H
|
||||
|
|
@ -47,11 +47,13 @@ namespace CGAL {
|
|||
|
||||
namespace Classification {
|
||||
|
||||
namespace TensorFlow {
|
||||
|
||||
namespace TF = tensorflow;
|
||||
namespace TFops = tensorflow::ops;
|
||||
|
||||
/*!
|
||||
\ingroup PkgClassificationClassifiers
|
||||
\ingroup PkgClassificationClassifiersTensorFlow
|
||||
|
||||
\brief %Classifier based on the TensorFlow version of neural network.
|
||||
|
||||
|
|
@ -81,7 +83,7 @@ namespace TFops = tensorflow::ops;
|
|||
\cgalModels `CGAL::Classification::Classifier`
|
||||
*/
|
||||
template <typename ActivationFunction = tensorflow::ops::Relu>
|
||||
class TensorFlow_neural_network_classifier
|
||||
class Neural_network_classifier
|
||||
{
|
||||
bool m_verbose;
|
||||
|
||||
|
|
@ -123,14 +125,14 @@ public:
|
|||
\brief Instantiate the classifier using the sets of `labels` and `features`.
|
||||
|
||||
*/
|
||||
TensorFlow_neural_network_classifier (const Label_set& labels,
|
||||
const Feature_set& features)
|
||||
Neural_network_classifier (const Label_set& labels,
|
||||
const Feature_set& features)
|
||||
: m_verbose (true), m_labels (labels), m_features (features)
|
||||
, m_root (NULL), m_ph_ft (NULL), m_ph_gt (NULL), m_loss(NULL), m_session (NULL)
|
||||
{ }
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
~TensorFlow_neural_network_classifier ()
|
||||
~Neural_network_classifier ()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
|
@ -1014,7 +1016,7 @@ template <typename ConcurrencyTag,
|
|||
typename ProbabilitiesRanges>
|
||||
void classify (const ItemRange& input,
|
||||
const Label_set& labels,
|
||||
const TensorFlow_neural_network_classifier& classifier,
|
||||
const TensorFlow::Neural_network_classifier& classifier,
|
||||
LabelIndexRange& output,
|
||||
ProbabilitiesRanges& probabilities)
|
||||
{
|
||||
|
|
@ -1067,7 +1069,7 @@ template <typename ConcurrencyTag,
|
|||
typename LabelIndexRange>
|
||||
void classify (const ItemRange& input,
|
||||
const Label_set& labels,
|
||||
const TensorFlow_neural_network_classifier& classifier,
|
||||
const TensorFlow::Neural_network_classifier& classifier,
|
||||
LabelIndexRange& output)
|
||||
{
|
||||
std::cerr << "Classify with TensorFlow classifier" << std::endl;
|
||||
|
|
@ -1113,6 +1115,7 @@ void classify (const ItemRange& input,
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ typedef Classification::Feature_handle
|
|||
typedef Classification::Label_set Label_set;
|
||||
typedef Classification::Feature_set Feature_set;
|
||||
|
||||
typedef Classification::ETHZ_random_forest_classifier Classifier;
|
||||
typedef Classification::ETHZ::Random_forest_classifier Classifier;
|
||||
|
||||
typedef Classification::Planimetric_grid<Kernel, Point_set, Point_map> Planimetric_grid;
|
||||
typedef Classification::Point_set_neighborhood<Kernel, Point_set, Point_map> Neighborhood;
|
||||
|
|
|
|||
|
|
@ -35,13 +35,17 @@ Release date: March 2019
|
|||
### Classification
|
||||
|
||||
- Added a new experimental classifier
|
||||
`TensorFlow_neural_network_classifier`.
|
||||
`TensorFlow::Neural_network_classifier`.
|
||||
|
||||
- The training algorithm of `ETHZ_random_forest_classifier` was
|
||||
- For uniformity, `ETHZ_random_forest_classifier` is renamed
|
||||
`ETHZ::Random_forest_classifier` and `OpenCV_random_forest_classifier`
|
||||
is renamed `OpenCV::Random_forest_classifier`.
|
||||
|
||||
- The training algorithm of `ETHZ::Random_forest_classifier` was
|
||||
parallelized.
|
||||
|
||||
- Added a constructor to copy a `ETHZ_random_forest_classifier`
|
||||
using a different data set as input.
|
||||
- Added a constructor to copy a `ETHZ::Random_forest_classifier` using a
|
||||
different data set as input.
|
||||
|
||||
- Added 3 new geometric features, `Height_above`, `Height_below` and
|
||||
`Vertical_range`.
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@
|
|||
#include <CGAL/Classification/Feature_set.h>
|
||||
#include <CGAL/Classification/Label_set.h>
|
||||
#include <CGAL/Classification/Sum_of_weighted_features_classifier.h>
|
||||
#include <CGAL/Classification/ETHZ_random_forest_classifier.h>
|
||||
#include <CGAL/Classification/ETHZ/Random_forest_classifier.h>
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_OPENCV
|
||||
#include <CGAL/Classification/OpenCV_random_forest_classifier.h>
|
||||
#include <CGAL/Classification/OpenCV/Random_forest_classifier.h>
|
||||
#endif
|
||||
#ifdef CGAL_LINKED_WITH_TENSORFLOW
|
||||
#include <CGAL/Classification/TensorFlow_neural_network_classifier.h>
|
||||
#include <CGAL/Classification/TensorFlow/Neural_network_classifier.h>
|
||||
#endif
|
||||
|
||||
class Item_classification_base
|
||||
|
|
@ -28,13 +28,13 @@ public:
|
|||
typedef CGAL::Classification::Label_set Label_set;
|
||||
typedef CGAL::Classification::Feature_set Feature_set;
|
||||
typedef CGAL::Classification::Sum_of_weighted_features_classifier Sum_of_weighted_features;
|
||||
typedef CGAL::Classification::ETHZ_random_forest_classifier ETHZ_random_forest;
|
||||
typedef CGAL::Classification::ETHZ::Random_forest_classifier ETHZ_random_forest;
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_OPENCV
|
||||
typedef CGAL::Classification::OpenCV_random_forest_classifier Random_forest;
|
||||
typedef CGAL::Classification::OpenCV::Random_forest_classifier Random_forest;
|
||||
#endif
|
||||
#ifdef CGAL_LINKED_WITH_TENSORFLOW
|
||||
typedef CGAL::Classification::TensorFlow_neural_network_classifier<> Neural_network;
|
||||
typedef CGAL::Classification::TensorFlow::Neural_network_classifier<> Neural_network;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue