AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de detección de imágenes
  • Properties specific to aiNeuralNetworkModel variables
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The aiNeuralNetworkModel type is used to define all the advanced characteristics of a neural network used by AIDetectModel. You can define and change the characteristics of this neural network using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Ejemplo
// Déclaration de l'image
MonImage is Image
MonImage = IMG_Test

// Déclarer un modèle
MonIAModèleRN is aiNeuralNetworkModel

MonIAModèleRN.Configuration = "MonModel.cfg"
MonIAModèleRN.TrainedWeights = "MonModel.weights.pb"
MonIAModèleRN.PixelScaleFactor = 1.0

// Attention: les dimensions X et Y dépendent du modèle. 
// Si les dimensions spécifiées ne correspondent pas au modèle,
// la fonction IAModèleDétecte renverra une erreur. 
MonIAModèleRN.XDimension = 300 
MonIAModèleRN.YDimension = 300 

MonIAModèleRN.AverageIntensityR = 104
MonIAModèleRN.AverageIntensityG = 117
MonIAModèleRN.AverageIntensityB = 113
MonIAModèleRN.RGBColor = True

montabMatrice is array of 1 array of 1 by 1 by 200 by 7 reals

// Exécuter le modèle
montabMatrice = AIDetectModel(MonIAModèleRN, MonImage)
Propiedades

Properties specific to aiNeuralNetworkModel variables

The following properties can be used to handle a neural network model:
Property nameType usedEffect
AverageIntensityBIntegerAverage intensity of the Blue (B) color in the training data.
This property is optional.
AverageIntensityGIntegerAverage intensity of the Green (G) color in the training data.
This property is optional.
AverageIntensityRIntegerAverage intensity of the Red (R) color in the training data.
This property is optional.
ConfigurationCharacter stringFull path of the file that contains the configuration of the model.
Note: The following configuration types are possible:
  • Caffe: *.prototxt
  • Tensorflow: *.pbtxt
  • Darknet: *.cfg
OutputLayerNameCharacter stringName of the output neural network layer.
PixelScaleFactorRealUsed to scale pixel values. Set to 1.0 by default (no scaling).
RGBColorBoolean
  • True if the provided images are encoded in RGB. In this case, the conversion to BGR encoding will be done automatically.
  • False (default value) if the provided images are encoded in BGR.
This property is optional.
TrainedWeightsCharacter string Full path of the file that contains the trained weights of the model.
Note: The following weight types are available:
  • Caffe: *.caffemodel
  • Tensorflow: *.pb
  • Darknet: *.weights
  • Open Neural Network Exchange (ONNX): *.onnx
TransposeRequiredBoolean
  • if transposition is required,
  • False otherwise.
When to use this property?
OpenCV creates matrices based on images and defines them as "Number of columns, Number of rows, Number of channels".
Some models expect matrices with the following format: "Number of channels, Number of columns, Number of rows". This means it is necessary to modify the matrix representation of the image created by OpenCV.
XDimensionIntegerImage size required by the model: value corresponding to X.
By default, this property corresponds to the width of the image.
YDimensionIntegerImage size required by the model: value corresponding to Y.
By default, this property corresponds to the height of the image.
Versión mínima requerida
  • Versión 27
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 19/09/2024

Señalar un error o enviar una sugerencia | Ayuda local