eluv-io / elv-clip-search

Empower content owners to search and generate clips based on machine learning tags. Collect user feedback on the quality of the search results and ML tags
https://core.v3.contentfabric.io/#/apps/Clip%20Search
2 stars 1 forks source link

Display tags in clips #21

Closed elv-haoyu closed 1 year ago

elv-haoyu commented 1 year ago

For v1 indexes,

Set clips_include_source_tags=true to include tags from tag search result for each constituent clip in the sources element, see Clip search #2077 for details. Example output,

{
      "hash": "hq__2sP3w1C7czUrA4qikwwQBV1Kpuz4pZyxjpheTSKSBF8ywnq2KHZA7AqhFhEBgUWG9jg1fvHfNa",
      "id": "iq__44BuAodz1HEyz7GrmWMDdJ3CoWNN",
      "qlib_id": "ilib3691LecDh9yNyqKHpwXtmej8kS4v",
      "type": "hq__LRXgHD7Dxe7vub584qVzZPDBbK6ZiWZhEZKJHsHLbT1DpzdUqwDeYnqr1QXKmuLMaoHQVkJTvQ",
      "meta": {
        "public": {
          "asset_metadata": {
            "title": "Spy Who Loved Me, The"
          }
        }
      },
      "url": "/q/hq__2sP3w1C7czUrA4qikwwQBV1Kpuz4pZyxjpheTSKSBF8ywnq2KHZA7AqhFhEBgUWG9jg1fvHfNa/rep/playout/clips/options.json?clip_start=2033.698000&clip_end=2038.662000&ignore_trimming=true",
      "image_url": "/q/hq__2sP3w1C7czUrA4qikwwQBV1Kpuz4pZyxjpheTSKSBF8ywnq2KHZA7AqhFhEBgUWG9jg1fvHfNa/rep/frame/clips/video?t=2033.698000&ignore_trimming=true",
      "start": "33m53.698s",
      "end": "33m58.662s",
      "start_time": 2033698,
      "end_time": 2038662,
      "source_count": 1,
      "sources": [
        {
          "document": {
            "end_time": 2038662,
            "start_time": 2033698,
            "text": {
              "Celebrity Detection": [
                {
                  "end_time": 2034660,
                  "start_time": 2033700,
                  "text": [
                    "Barbara Bach"
                  ]
                },
                {
                  "end_time": 2038539,
                  "start_time": 2035536,
                  "text": [
                    "Barbara Bach"
                  ]
                }
              ],
              "Landmark Recognition": [],
              "Logo Detection": [],
              "Object Detection": [
                {
                  "end_time": 2038539,
                  "start_time": 2033700,
                  "text": [
                    "Human face"
                  ]
                },
                {
                  "end_time": 2034451,
                  "start_time": 2033700,
                  "text": [
                    "Lipstick"
                  ]
                },
                {
                  "end_time": 2035410,
                  "start_time": 2035410,
                  "text": [
                    "Lipstick"
                  ]
                },
                {
                  "end_time": 2036036,
                  "start_time": 2036036,
                  "text": [
                    "Lipstick"
                  ]
                },
                {
                  "end_time": 2038539,
                  "start_time": 2036453,
                  "text": [
                    "Lipstick"
                  ]
                }
              ],
              "Optical Character Recognition": [],
              "Segment Labels": [],
              "Speech to Text": [
                {
                  "end_time": 2038662,
                  "start_time": 2033698,
                  "text": [
                    "for the gentlemen vodka martini shaken not stirred"
                  ]
                }
              ]
            }
          },
          "prefix": "/video_tags/metadata_tags/0003/metadata_tags/shot_tags/tags[57]"
        }
      ]
    }

query example using v2 indexes

https://host-154-14-185-100.contentfabric.io/qlibs/ilib31RD8PXrsdvSppy2p78LU3C9JdME/q/hq__96wQVe6wB2WMPDFDae2G9QsrBkrL6gm2jn5hyB4XY9JSJotZRmniMNQuXp5semmb9L4mA8hyJ3/rep/search?terms=%28%28shaken+not+stirred+daniel+craig%29%29&select=text%2C%2Fpublic%2Fasset_metadata%2Ftitle&start=0&limit=160&max_total=160&display_fields=f_start_time%2Cf_end_time&clips=true&clips_include_source_tags=true&scored=true&search_fields=f_celebrity%2Cf_characters%2Cf_display_title%2Cf_logo%2Cf_object%2Cf_segment%2Cf_speech_to_text&authorization=authtoken
elv-haoyu commented 1 year ago

Done!