How to adjust AI model prediction option parameters using macro command code?
Dear Sir,
We are currently utilizing the AI Deep Learning feature in Image-Pro 11.1. In most cases, the default models provide excellent object contours. We have also successfully trained our own custom models for testing.
Our target objects vary significantly in size (large vs. small), so we group and image them based on the product model. Consequently, when switching between different samples, we need to adjust the Object Diameter, and occasionally fine-tune the Strictness (%) and Probability Threshold (%). Since each trained model takes up several hundred megabytes, we would prefer to use a single trained model and dynamically adjust these parameters programmatically for batch analysis, rather than training separate models for each size.
However, during our Macro testing using DeepLearningCommands, changing the values programmatically did not seem to take effect. The AI analysis still relies on the values currently set in the Prediction UI instead.
Here is a snippet of the VB.NET code we used:
-------------------
With Measure.DeepLearningCommands.Options(Nothing)
.CellDiameter = 90
.FlowThreshold = 0.4F
.CellProbabilityThreshold = 0.5F
.Run()
End With
-------------------Is it possible to fine-tune these three parameters (Object Diameter, Strictness, Probability Threshold) via Macro/Scripting for a single model?
If yes, what is the correct object model, syntax, or command sequence to successfully override the UI values before running the prediction?
Any guidance or code examples would be greatly appreciated.
Best regards,
Wesan
Best regards,
Wesan
Tagged:
0
Answers
-
Hi Wesan,
All model prediction options can be saved to an IQO file (measurement options file), so you can create IQOs for every type and then load that IQO file by macro.
Yuri
0
Categories
- All Categories
- 959 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 444 Image-Pro General Discussions
- 488 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 193 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 105 Image-Pro Plus General Discussions
- 85 Image-Pro Plus Automation with Macros
- 35 Legacy Products
- 15 Image-Pro Premier 3D General Discussions
- 20 Image-Pro Insight General Discussions
