Answers.Body: <p>From 10,000 feet up, and ignoring some details, your diagram shows a simple classification <em>pipeline</em>, where a small/fast model is used to filter and respond to &quot;obvious&quot; results before using a larger/slower model. Pipelines like this already exist, and can and do work in general. Typically they don't improve accuracy, but they can improve inference and training speed, plus reduce CPU usage.</p>
  <p>Regarding your choice of Pearson correlation coefficient as a first stage classifier, this is not so good. Outside of a few specialist image domains where template-matching could work, such as identifying game sprites or computer text with a fixed font, it would perform very badly. When trying to match natural images - e.g. classifying a photo as of a cat or a dog - it is unlikely to do better than random. You would have to set the threshold for rejection very low to avoid false negatives, meaning that e.g. less than 1% of training images would be pre-filtered by the first stage classifier.</p>
  <p>In fact, with natural images I am not entirely sure that there is <em>any</em> threshold where Pearson correlation between images - at the pixel level - would be useful to classify images as &quot;not the same object&quot;.</p>
  <p>Potentially if you flipped the decision, and returned a positive match for very highly correlated images, the classifier could filter out near exact image matches, e.g. if photo input and the example held in memory were essentially the same photo. If that occurred a lot for some reason in your production system, it might be worth having the first stage correlation filter for efficiency.</p>
  <p>In principle the pipeline is a sound idea. You need a better first stage classifier, or you need to be working in an image domain where the Pearson correlation coefficient is a useful measure of image similarity. Potentially, correlation of some derived image features (e.g. number of edges/corners or other low-level matches) would perform better, but as such a filter become more and more sophisticated to drive accuracy up, you would essentially be recapping the history of computer vision until eventually your first stage filter was a simpler neural network than the second stage . . .</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-01T14:57:36.430Z
Answers.LastActivityDate: 2023-10-03T15:42:56.693Z
Answers.LastEditDate: 2023-10-03T15:42:56.693Z
Answers.UserDisplayName: Neil Slater
Body: <p>What is the difference between this process of recognizing objects in a image:</p>
  <p><a href="https://i.sstatic.net/ZZiQs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZZiQs.png" alt="" /></a></p>
  <p>(The correlation function calculate the <a href="https://en.wikipedia.org/wiki/Pearson_correlation_coefficient" rel="nofollow noreferrer">correlation coefficient</a> between the input and a image containing the object we want to recognize from the input which has already been stored in the program's memory)</p>
  <p>And just using a neural network to decide if a image contains a object ?Obviously the process with the correlation function has a much quicker learning curve since images out of the error range are discarded but which can give more accurate results?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-01T09:45:52.240Z
Comments.Text: Whether or not this is even workable depends very much on what "same object" and "correlation function" mean. Typically two images being compared are not analysed for "correlation" but for e.g. pixel similarity, perhaps after downsampling. Could you please clarify, and [edit] the question.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-01T10:12:47.577Z
Comments.Text: Also, is the input to this system 2 images which may or may not depict the "same object"? Not clear from the diagram what the input is
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-01T10:39:57.127Z
Comments.Text: Yes 1 image is stored in the program's memory and 1 is given as input.
Comments.UserDisplayName: Cerise
Tags: <neural-networks><machine-learning><deep-learning><computer-vision>
Title: Which process is better to understand images?
UserDisplayName: Cerise
ThreadText: # Which process is better to understand images?
  
  (Asked by: username_0 on 2023-10-01)
  
  What is the difference between this process of recognizing objects in a image:
  
  [![](https://i.sstatic.net/ZZiQs.png)](https://i.sstatic.net/ZZiQs.png)
  
  (The correlation function calculate the [correlation coefficient](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient) between the input and a image containing the object we want to recognize from the input which has already been stored in the program's memory)
  
  And just using a neural network to decide if a image contains a object ?Obviously the process with the correlation function has a much quicker learning curve since images out of the error range are discarded but which can give more accurate results?
  
  **Tags:** neural-networks, machine-learning, deep-learning, computer-vision
  > **Comments:**
  > **username_1**: Whether or not this is even workable depends very much on what "same object" and "correlation function" mean. Typically two images being compared are not analysed for "correlation" but for e.g. pixel similarity, perhaps after downsampling. Could you please clarify, and [edit] the question.  
  > **username_1**: Also, is the input to this system 2 images which may or may not depict the "same object"? Not clear from the diagram what the input is  
  > **username_0**: Yes 1 image is stored in the program's memory and 1 is given as input.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-10-01. Score: 1
  
  From 10,000 feet up, and ignoring some details, your diagram shows a simple classification *pipeline*, where a small/fast model is used to filter and respond to "obvious" results before using a larger/slower model. Pipelines like this already exist, and can and do work in general. Typically they don't improve accuracy, but they can improve inference and training speed, plus reduce CPU usage.
  
  Regarding your choice of Pearson correlation coefficient as a first stage classifier, this is not so good. Outside of a few specialist image domains where template-matching could work, such as identifying game sprites or computer text with a fixed font, it would perform very badly. When trying to match natural images - e.g. classifying a photo as of a cat or a dog - it is unlikely to do better than random. You would have to set the threshold for rejection very low to avoid false negatives, meaning that e.g. less than 1% of training images would be pre-filtered by the first stage classifier.
  
  In fact, with natural images I am not entirely sure that there is *any* threshold where Pearson correlation between images - at the pixel level - would be useful to classify images as "not the same object".
  
  Potentially if you flipped the decision, and returned a positive match for very highly correlated images, the classifier could filter out near exact image matches, e.g. if photo input and the example held in memory were essentially the same photo. If that occurred a lot for some reason in your production system, it might be worth having the first stage correlation filter for efficiency.
  
  In principle the pipeline is a sound idea. You need a better first stage classifier, or you need to be working in an image domain where the Pearson correlation coefficient is a useful measure of image similarity. Potentially, correlation of some derived image features (e.g. number of edges/corners or other low-level matches) would perform better, but as such a filter become more and more sophisticated to drive accuracy up, you would essentially be recapping the history of computer vision until eventually your first stage filter was a simpler neural network than the second stage . . .
  
  
  ---
  
  