![]() |
Perfectly Clear SDK Documentation
10.7.1.1191
|
AI Preset Selection is a system developed by EyeQ to apply different presets to photos of differing subject matter, lighting conditions, or content. Instead of applying a single preset to every image that you process - you can create a family of presets, each tuned for a specific scene. Starting in SDK 10.0.2, we have updated our AI Preset Selection model to be faster, more accurate, and much smaller - leading to substantially faster model loading times.
This AI Preset Detection is also useful to simply learn more about the photos your customers are sending to your business - we call this "Image Intelligence". There are two main parts to AI Preset Selection:
There are over 20 Scenes currently defined in the SDK, and these are visible in the latest version of Workbench. You may edit the presets for each of the scenes, then "Export Presets..." to create a .preset file, which you can use in the SDK or Command Line Application. We provide models and presets for for the AI Preset Detection groups below, requiring the files shown:
AI Preset Groups | Server SDK | Android SDK | iOS SDK |
---|---|---|---|
Univerasl | pro_and_universal_20211221.pnn skintone_20211221.pnn | sd_20211221_tflite.pnn skintone_20211221_tflite.pnn | sd_20211221_coreml.pnn skintone_20211221_coreml.pnn |
Pro | pro_and_universal_20211221.pnn skintone_20211221.pnn | sd_20211221_tflite.pnn skintone_20211221_tflite.pnn | sd_20211221_coreml.pnn skintone_20211221_coreml.pnn |
School and Sports | school_and_sports_5000200.pnn skintone_5000200.pnn | sd_5000200_tflite.pnn skintone_5000200_tflite.pnn | sd_5000200_coreml.pnn skintone_5000200_coreml.pnn |
These AI Preset Groups can be exported from Perfectly Clear Workbench and loading them in the SDK, CLI or Docker solution will require both the presets and the .pnn model files provided in your SDK package. We can help tune these presets for you, also.
EyeQ can create Custom Scenes designed for your business. Read more here
Note: Scene Detection is an optional component to our SDK. Contact your SDK account executive for pricing and availability.
There are three main ways to use this AI Preset Selection component, from the most simple, to the most advanced:
If your business opts-in for Scene Detection support, then this module will be enabled by default. See the documentation for the command line application or container solution for details.
This is the simplest way to enable Scene Detection using the Perfectly Clear SDK. The only additional step that is required is to simply create a PFCENGINE and then load the detection model. Once this is done, include the PFCENGINE when calling PFC_AutoCorrect.
Load the AI Engine:
Optionally, load custom Presets for the Scenes you will be detecting:
Call AutoCorrect to process image with the AI selected preset:
Read the Scene that was detected:
This method allows more fine-grained control of the scene detection process, extracting which scene was detected, and optionally loading custom Scene Detection Presets.
Load the AI Engine, just like in the example above. Optionally, load custom Presets for the Scenes you will be detecting.
Run PFC_Calc to gather image stats and run AI Scene Detection Selection, saving the detected Scene in the PFCPROFILE for the image:
Read the Scene that was detected from the PFCCPROFILE:
Then, process the image with PFC_Apply: