Answers.Body: <p>The role of the CNN in this would basically just be to grab the text you want.  YOLO is good for that.  Fast and lightweight and easy to train.  It wouldn't help much in actually reading the text though.  A way to do something like this would be to use a neural net for segmentation, training it to draw boxes around text, then you could take the content of those boxes and feed them to an OCR algorithm like Tesseract, and once you have text, then there are NLP tutorials all over the internet on how to do language detection.  Here are a couple to start.</p>
  <p><a href="https://www.johnsnowlabs.com/how-to-detect-languages-with-python-a-comprehensive-guide/" rel="nofollow noreferrer">https://www.johnsnowlabs.com/how-to-detect-languages-with-python-a-comprehensive-guide/</a>
  <a href="https://towardsdatascience.com/how-to-detect-and-translate-languages-for-nlp-project-dfd52af0c3b5" rel="nofollow noreferrer">https://towardsdatascience.com/how-to-detect-and-translate-languages-for-nlp-project-dfd52af0c3b5</a></p>
  <p>It really doesn't matter that you aren't trying to &quot;understand&quot; the text.  NLP libraries are still where it's at if you are trying to perform a language detection task.  Trying to treat language detection as an image classification task is like trying to infer the speed limit on a highway by reading the heat signatures on the pavement.  Sure, faster cars will transfer more heat, but there is so much entropy involved here that this is never going to be the best option for this task.  Better to extract the thing you want, the words, and use models designed to deal with words.</p>
  <p>Basic breakdown for this sort of thing in general would be:</p>
  <ol>
  <li>Use a neural network to isolate text from an image.</li>
  <li>Use OCR to convert that image text into computer readable text</li>
  <li>Feed that text to an NLP library to detect the language</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-06T16:34:29.417Z
Answers.LastActivityDate: 2023-12-06T16:54:30.123Z
Answers.LastEditDate: 2023-12-06T16:54:30.123Z
Answers.UserDisplayName: Jeremiah
Answers.Body: <p>I think that you can use convolutional neural networks (CNNs) to do what you want, but I think that you will need a lot of training images and the task will be very difficult.  You are much better off extracting text from the images using <a href="https://cloud.google.com/vision/docs/ocr#:%7E:text=Optical%20Character%20Recognition%20(OCR),-The%20Vision%20API&amp;text=There%20are%20two%20annotation%20features,extracts%20text%20from%20any%20image." rel="nofollow noreferrer">Optical Character Recognition</a> (OCR), partitioning the extracted text into individual words, and then searching if the words are found in an <a href="https://pypi.org/project/PyMultiDictionary/" rel="nofollow noreferrer">English dictionary or a Korean dictionary</a> (or both?).  This approach isn't perfect, but I bet it will perform better than directly applying CNNs directly to images.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-11T02:43:52.943Z
Answers.LastActivityDate: 2022-11-11T02:49:32.457Z
Answers.LastEditDate: 2022-11-11T02:49:32.457Z
Answers.UserDisplayName: Snehal Patel
Answers.Body: <p>This sounds like a fairly straightforward task, with low risks. I think the proper term is that you're you are trying to detect the <em>script</em>, which would be either Latin ( "English") or Hangul ("Korean"). The chance is that you end up learning <em>fonts</em>, though. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-01T18:17:44.937Z
Answers.LastActivityDate: 2019-03-01T18:17:44.937Z
Answers.UserDisplayName: MSalters
Body: <p>I hope this question is not too broad or general. I have a very large set of images all of which contain text (some have more, some less). All of them have been tagged as containing, say, English text or Korean. I wonder if convolutional neural networks would be a good approach to classify these images as containing English vs. Korean. Or is there any existing literature/method that does this already. Crucially though, I am not interested in "understanding" the text, so this is not an NLP task but, I suppose, a task of classifying orthographies in the images. </p>
  
Tags: <convolutional-neural-networks><image-recognition><classification>
Title: Using convnet to classify language of text contained in images
UserDisplayName: Alex
ThreadText: # Using convnet to classify language of text contained in images
  
  (Asked by: username_0 on 2019-02-27)
  
  I hope this question is not too broad or general. I have a very large set of images all of which contain text (some have more, some less). All of them have been tagged as containing, say, English text or Korean. I wonder if convolutional neural networks would be a good approach to classify these images as containing English vs. Korean. Or is there any existing literature/method that does this already. Crucially though, I am not interested in "understanding" the text, so this is not an NLP task but, I suppose, a task of classifying orthographies in the images.
  
  **Tags:** convolutional-neural-networks, image-recognition, classification
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2023-12-06. Score: 0
  
  The role of the CNN in this would basically just be to grab the text you want. YOLO is good for that. Fast and lightweight and easy to train. It wouldn't help much in actually reading the text though. A way to do something like this would be to use a neural net for segmentation, training it to draw boxes around text, then you could take the content of those boxes and feed them to an OCR algorithm like Tesseract, and once you have text, then there are NLP tutorials all over the internet on how to do language detection. Here are a couple to start.
  
  <https://www.johnsnowlabs.com/how-to-detect-languages-with-python-a-comprehensive-guide/>
  <https://towardsdatascience.com/how-to-detect-and-translate-languages-for-nlp-project-dfd52af0c3b5>
  
  It really doesn't matter that you aren't trying to "understand" the text. NLP libraries are still where it's at if you are trying to perform a language detection task. Trying to treat language detection as an image classification task is like trying to infer the speed limit on a highway by reading the heat signatures on the pavement. Sure, faster cars will transfer more heat, but there is so much entropy involved here that this is never going to be the best option for this task. Better to extract the thing you want, the words, and use models designed to deal with words.
  
  Basic breakdown for this sort of thing in general would be:
  
  1. Use a neural network to isolate text from an image.
  2. Use OCR to convert that image text into computer readable text
  3. Feed that text to an NLP library to detect the language
  
  
  ---
  
  ### Answer by username_2 on 2022-11-11. Score: 0
  
  I think that you can use convolutional neural networks (CNNs) to do what you want, but I think that you will need a lot of training images and the task will be very difficult. You are much better off extracting text from the images using [Optical Character Recognition](https://cloud.google.com/vision/docs/ocr#:%7E:text=Optical%20Character%20Recognition%20(OCR),-The%20Vision%20API&text=There%20are%20two%20annotation%20features,extracts%20text%20from%20any%20image.) (OCR), partitioning the extracted text into individual words, and then searching if the words are found in an [English dictionary or a Korean dictionary](https://pypi.org/project/PyMultiDictionary/) (or both?). This approach isn't perfect, but I bet it will perform better than directly applying CNNs directly to images.
  
  
  ---
  
  ### Answer by username_3 on 2019-03-01. Score: 0
  
  This sounds like a fairly straightforward task, with low risks. I think the proper term is that you're you are trying to detect the *script*, which would be either Latin ( "English") or Hangul ("Korean"). The chance is that you end up learning *fonts*, though.
  
  
  ---
  
  