Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24499

Nuxeo Vision: Remove the constraint for a predefined list of features

    XMLWordPrintable

    Details

    • 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:
      Hide

      All Backend Service features can be leveraged in Nuxeo Vision
      The features to use (and sent to the provider) are no more checked against a predefined list. This allows for using any new feature available without waiting for an update of the plugin. After using such new feature, the caller should use the getNativeObject method and handle the results based on the provider's documentation

      Show
      All Backend Service features can be leveraged in Nuxeo Vision The features to use (and sent to the provider) are no more checked against a predefined list. This allows for using any new feature available without waiting for an update of the plugin. After using such new feature, the caller should use the getNativeObject method and handle the results based on the provider's documentation
    • Upgrade notes:
      Hide

      The features to use (and sent to the provider) are no more checked against a predifined list. This allows for using any new feature available without waiting for an update of the plugin. After using such new feature, caller should use the getNativeObject method and handle the results based on the provider's documentation.

      Show
      The features to use (and sent to the provider) are no more checked against a predifined list. This allows for using any new feature available without waiting for an update of the plugin. After using such new feature, caller should use the getNativeObject method and handle the results based on the provider's documentation.

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.