Post by Creator » Wed Dec 18, 2019, 00:27
Hi
yes, currently the DGM library supports only 8-bit input images and only 8-bit features. This is due to the fact that some note potential models (
e.g. Bayes) can work only with the 8-bit features.
However, some of the other models (
e.g. Gaussian Mixture Model) can naturally work with 16-bit integers or 32-bit floats. Nevertheless, for sake of generality
compact notations of DGM interface functions do not allow usage of 16- or 32-bit features.
In order to use 16- or 32-bit features with note potentials, please use the
comprehensive notation (per-pixel form) of adding the node training data:
Code: Select all
addFeatureVec(const Mat &featureVector, byte gt)
instead of
Code: Select all
addFeatureVecs(const Mat &featureVectors, const Mat >)
If you check the implementation of this function for the GMM node trainer:
https://github.com/Project-10/DGM/blob/master/modules/DGM/TrainNodeGMM.cpp you can see that the input feature vector is converted to the 64-bit floating point data type.
Hi
yes, currently the DGM library supports only 8-bit input images and only 8-bit features. This is due to the fact that some note potential models ([i]e.g.[/i] Bayes) can work only with the 8-bit features.
However, some of the other models ([i]e.g.[/i] Gaussian Mixture Model) can naturally work with 16-bit integers or 32-bit floats. Nevertheless, for sake of generality [b]compact notations[/b] of DGM interface functions do not allow usage of 16- or 32-bit features.
In order to use 16- or 32-bit features with note potentials, please use the [b]comprehensive notation[/b] (per-pixel form) of adding the node training data:
[code]
addFeatureVec(const Mat &featureVector, byte gt)
[/code]
instead of
[code]
addFeatureVecs(const Mat &featureVectors, const Mat >)
[/code]
If you check the implementation of this function for the GMM node trainer: [url]https://github.com/Project-10/DGM/blob/master/modules/DGM/TrainNodeGMM.cpp[/url] you can see that the input feature vector is converted to the 64-bit floating point data type.