ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Image detection functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Runs a trained neural network model on an image. This function allows you to use artificial intelligence to detect objects in an image.
Caution: This is an advanced function. To use this function, it is recommended to read the documentation of the neural network used (specifics, expected results and interpretation).
Example
// 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)
Syntax
<Result> = AIDetectModel(<Model> , <Image>)
<Result>: Array of array
Array of matrices containing the result of the execution of the model.
This array is specific to each model and must be known by the developer.
<Model>: aiNeuralNetworkModel variable
Name of the aiNeuralNetworkModel variable describing the characteristics of the neural network used.
Caution: The various characteristics of this variable are specific to each model and must be known by the developer..
<Image>: String, Image or Image control
Image to be analyzed. This image can correspond to:
  • a variable of type Image,
  • the name and path of the image,
  • the name and path of a PDF file,
  • an Image memo item,
  • an Image control.
Remarks
  • The AI engine used by AIDetectModel is OpenCV. This engine reads the AI models and executes them.
  • The supported neural network models are:
    • caffe,
    • tensorflow,
    • darknet,
    • onnx
  • The model must be trained (weights are known).
  • The expected extensions according to the models are:
    • Configuration:
      • Caffe: *.prototxt
      • Tensorflow: *.pbtxt
      • Darknet: *.cfg
    • Weight:
      • Caffe: *.caffemodel
      • Tensorflow: *.pb
      • Darknet: *.weights
      • Open Neural Network Exchange (ONNX): *.onnx
Business / UI classification: Business Logic
Component: wd300ia.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help