0

I tried making a request to perform OCR in a video

{
    "inputContent": "<input-file>",
    "features": ["TEXT_DETECTION"],
    "videoContext": {
        "textDetectionConfig": {
            "languageHints": ["en"]
        }
    }
}

Things work fine. However, it always detects text in multiple languages although I have specified languageHints in the request. I wonder where is the problem?

Kedart
  • 1
  • The Cloud Video Intelligence API **automatically** detects languages and the **languageHints** parameter can only help in trying to increase the accuracy of the model. Could you provide with examples of text it is detecting in multiple languages? Or even better, some public video example that triggers the same behaviour? – Ksign Feb 20 '20 at 11:55
  • Here you can use [this video](https://drive.google.com/file/d/1xXeNgz76WNo5pHKkCxQqX-RytT_KlXYj/view?usp=sharing) for example. So I want the result to be in English only, how can I do that? – Kedart Feb 20 '20 at 14:24
  • Well, there is French text as well, this text will only be detected as French. So I am not sure I understand your issue, please give some word/sentence example that is wrongly detected (specify the wrong detected language as well). Usually, what I would do with such a video is to set the 2 languages in **languageHints**. One more thing (out of topic), I believe that it is "enchanté" not "enchantè" :) – Ksign Feb 21 '20 at 09:05
  • Yeah, there are many languages ​​in the video, and I'm looking for a solution to only detect text in English and ignore other languages. For example, if there are **Hello** and **Bonjour**, then **Hello** should be detected, not **Bonjour**. Yes, *enchanté*. – Kedart Feb 21 '20 at 15:54
  • I understand better now what you would like to do but unfortunately, the model behind the API will detect any text. You cannot force it to detect only one language. – Ksign Feb 24 '20 at 13:22
  • I got it, thanks anyway. – Kedart Feb 25 '20 at 02:46

0 Answers0