-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Fix Version/s: 10.2
-
Component/s: Nuxeo Vision
-
Release Notes Description:
-
Tags:
-
Upgrade notes:
When Google added "WEB_DETECTION" as a new feature for Google Vision, we had to modify nuxeo-vision and add this label to the an enumeration (see NXP-24485) in order to use it in the configuration, because just passing this label to the operation lead to an "IllegalArgumentException" error (see line 88 of VisionOp)
But the plugin has a method, named getNativeObject that allows for getting any result returned by the provider: No need to add a specific accessor in the plugin. In the example of the new WEB_DETECTION feature, a call form JS Automation is as simple as:
. . . blob = VisionOp(blob, { features: ['WEB_DETECTION'], maxResults: 20, outputVariable: 'results' }); // Get the native object nativeResult = ctx.results.get(0).getNativeObject(); . . .
Now, we can use nativeResult.webDetection as returned by Google: nativeResult.webDetection.fullMatchingImages for example, is an array of objets witha score and a url properties.
So, checking on existing fatures forces us to wait for a new version of the plugin. Which, for example, will not happen for a LTS version (we almost never add features to LTS). While not checking allows for immediately being able to use new features added by the cloud providers, via this getNativeObject
The changes would move the responsibility of passing a correct feature (string, case sensitive), as expected by the provider (Google Vision or AWS Rekognition, or whatever provider is added in the future) to the developer
- is related to
-
NXP-24485 Add WEB_DETECTION to Nuxeo Vision (supported by Google)
- Resolved