Answers.Body: <p>To offer a bit of theory, CNNs work well for many image tasks because they process spacially local information, without much care for absolute position. Essentially, every layer chops every image up into tiny crop images, and do an analysis step on the crops. The simple questions of "is this a line... corner... eye... face?" can be asked equally of every crop. </p>
  
  <p>This means that the network only needs to learn once to detect a feature, rather than separately learn to detect that feature in each possible location it might appear. Therefore we can use smaller networks that train faster and need less data than if we had a fully connected architecture. </p>
  
  <p>To return to the question, you could expect a CNN to work if your data is similarly spacially correlated. Put another way, if finding a pattern around cell x, y means the same sort of thing as the same pattern in cell a, b, then you are probably in luck. On the other hand if each column represents a meaningfully different concept, then a CNN will be a poor choice of architecture. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-07T08:45:44.723Z
Answers.LastActivityDate: 2020-03-11T10:33:02.363Z
Answers.LastEditDate: 2020-03-11T10:33:02.363Z
Answers.UserDisplayName: Josiah
Answers.Body: <p>Short answer is <strong>no</strong>. You can't use a model trained for one task to predict on a totally different task. Even if the second task was another image classification task, the CNN would have to be fine tuned for the new data to work.</p>
  
  <p>A couple of things to note...</p>
  
  <p>1) CNNs are good for images due to their nature. It isn't necessary that they'd be good for any 2-dimensional input.  </p>
  
  <p>2) By 2D numerical data I'm assuming you <strong>don't</strong> mean <em>tabular data</em>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-05T18:17:38.493Z
Answers.Text: Thanks for your answer. By 2D numerical data, I meant geospatial data in tabular form. I was wondering if can take advantage of CNN models for those geospatial data. but you are right, same model working good for images wont work on matrices because of the variation
Answers.UserDisplayName: Jarin Tasnim
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-04T21:30:20.203Z
Answers.LastActivityDate: 2020-03-04T21:30:20.203Z
Answers.UserDisplayName: Djib2011
Body: <p>Is there any difference between the convolution operation applied to images and applied to other numerical 2D data?</p>
  
  <p>For example, we have a pretty good CNN model trained on a number of <span class="math-container">$64 \times 64$</span> images to detect two classes. On the other hand, we have a number of <span class="math-container">$64 \times 64$</span> numerical 2D matrices (which are not considered images), which also have two classes. Can we use the same CNN model to classify the numerical dataset?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-05T02:41:12.453Z
Comments.Text: Images and numerical 2D data are the same thing. Having that, a CNNs viability depends on if the input data has a reasonable number and density of 2D features. If row 1 of your input data has no relation to row 2, a CNN is not a good choice.
Comments.UserDisplayName: Recessive
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-05T16:46:15.477Z
Comments.Text: Of course, you can do it, but here's a new problem - how to interpret the results of the predictions?
Comments.UserDisplayName: Leox
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-12T06:18:40.940Z
Comments.Text: There should be spatial correlation between neighboring elements. If in your matrix neighboring elements are (almost) independent 2D convolution is useless.
Comments.UserDisplayName: mirror2image
Tags: <convolutional-neural-networks><classification><image-recognition><convolution>
Title: Is there any difference between the convolution operation applied to images and applied to other numerical 2D data?
UserDisplayName: Jarin Tasnim
ThreadText: # Is there any difference between the convolution operation applied to images and applied to other numerical 2D data?
  
  (Asked by: username_0 on 2020-03-04)
  
  Is there any difference between the convolution operation applied to images and applied to other numerical 2D data?
  
  For example, we have a pretty good CNN model trained on a number of $64 \times 64$ images to detect two classes. On the other hand, we have a number of $64 \times 64$ numerical 2D matrices (which are not considered images), which also have two classes. Can we use the same CNN model to classify the numerical dataset?
  
  **Tags:** convolutional-neural-networks, classification, image-recognition, convolution
  > **Comments:**
  > **username_1**: Images and numerical 2D data are the same thing. Having that, a CNNs viability depends on if the input data has a reasonable number and density of 2D features. If row 1 of your input data has no relation to row 2, a CNN is not a good choice.  
  > **username_2**: Of course, you can do it, but here's a new problem - how to interpret the results of the predictions?  
  > **username_3**: There should be spatial correlation between neighboring elements. If in your matrix neighboring elements are (almost) independent 2D convolution is useless.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2020-03-07. Score: 1 | Accepted answer
  
  To offer a bit of theory, CNNs work well for many image tasks because they process spacially local information, without much care for absolute position. Essentially, every layer chops every image up into tiny crop images, and do an analysis step on the crops. The simple questions of "is this a line... corner... eye... face?" can be asked equally of every crop.
  
  This means that the network only needs to learn once to detect a feature, rather than separately learn to detect that feature in each possible location it might appear. Therefore we can use smaller networks that train faster and need less data than if we had a fully connected architecture.
  
  To return to the question, you could expect a CNN to work if your data is similarly spacially correlated. Put another way, if finding a pattern around cell x, y means the same sort of thing as the same pattern in cell a, b, then you are probably in luck. On the other hand if each column represents a meaningfully different concept, then a CNN will be a poor choice of architecture.
  
  
  ---
  
  ### Answer by username_5 on 2020-03-04. Score: 2
  
  Short answer is **no**. You can't use a model trained for one task to predict on a totally different task. Even if the second task was another image classification task, the CNN would have to be fine tuned for the new data to work.
  
  A couple of things to note...
  
  1) CNNs are good for images due to their nature. It isn't necessary that they'd be good for any 2-dimensional input.
  
  2) By 2D numerical data I'm assuming you **don't** mean *tabular data*.
  
  > **Comments:**
  > **username_0**: Thanks for your answer. By 2D numerical data, I meant geospatial data in tabular form. I was wondering if can take advantage of CNN models for those geospatial data. but you are right, same model working good for images wont work on matrices because of the variation  
  
  ---
  
  