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

Add WEB_DETECTION to Nuxeo Vision (supported by Google)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 10.1
    • Component/s: Nuxeo Vision

      Description

      Since recently, Google Vision added the WEB_DETECTION tag for images. it returns info on "same image", "partially same" but also list of pages using the image etc.
      See: https://cloud.google.com/vision/docs/reference/rest/v1/images/annotate#WebDetection

      Unfortunately, developers can't use the new tag because these tags are enums in the code, so trying to use a non existant label throws an IllegalArgumentException when calling VisionOp operation (https://github.com/nuxeo/nuxeo-vision/blob/df2b2e298ab99f2c8d9dcf2dc073ddceef452146/nuxeo-vision-core/src/main/java/org/nuxeo/vision/core/operation/VisionOp.java#L88)

      So, first, let's add "WEB_DETECTION" to VisionFeatures

      Reminder: Nuxeo Vision does not encapsulate all and every feature in sub-methods. Caller has to use the getNativeObject() and handle the result from this JSON object. In JS Automaiton, something like:

      . . .
      blob = VisionOp(blob, {
        features: ['WEB_DETECTION'],
        maxResults: 20,
        outputVariable: 'results'
      });
      nativeResult = ctx.results.get(0).getNativeObject();  
      
      nativeResult.webDetection.webEntities.forEach(function(entity) {
       Console.log("" + entity.score + " • " + entity.description );
      });
      
      nativeResult.webDetection.fullMatchingImages .forEach(function(entity) {
        Console.log("" + entity.score + " • " + entity.url );
      });
      
      . . . etc . . .
      

      Also notice AWS Rekognition does not support this feature (but it's OK, it does not support all the same featires as Google Vision already)

        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 - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h