Answers.Body: <p>Yes, of course they can be used to extract features, just like convolutional networks, even in supervised settings.</p>
  <p>ViTs are not exclusive to classification, their intermediate layers can also be used as high quality features, just to show this, if your <a href="https://scholar.google.nl/scholar?q=vision%20transformers%20transfer%20learning&amp;hl=en" rel="nofollow noreferrer">search</a> in Google Scholar for &quot;vision transformer transfer learning&quot;, at the time this question was written, there are 66700 papers.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-27T17:33:12.167Z
Answers.LastActivityDate: 2023-09-27T17:33:12.167Z
Answers.UserDisplayName: Dr. Snoopy
Body: <p>Can Vision Transformers be used to extract features, just like with VGG ?</p>
  <p>I am interested in using this vision transformer in extracting features (<a href="https://huggingface.co/google/vit-base-patch16-224" rel="nofollow noreferrer">https://huggingface.co/google/vit-base-patch16-224</a>)</p>
  <p>Since VIT is used in classification problems, I don't think that it will properly encode features like for example VAEs.</p>
  <p>I want to use these features in image generation, something akin to super resolution.</p>
  
Tags: <machine-learning><image-processing><image-generation><feature-extraction><vision-transformer>
Title: Can Vision Transformers be used to extract features?
UserDisplayName: Ahmed Gamal
ThreadText: # Can Vision Transformers be used to extract features?
  
  (Asked by: username_0 on 2023-09-27)
  
  Can Vision Transformers be used to extract features, just like with VGG ?
  
  I am interested in using this vision transformer in extracting features (<https://huggingface.co/google/vit-base-patch16-224>)
  
  Since VIT is used in classification problems, I don't think that it will properly encode features like for example VAEs.
  
  I want to use these features in image generation, something akin to super resolution.
  
  **Tags:** machine-learning, image-processing, image-generation, feature-extraction, vision-transformer
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-09-27. Score: 1 | Accepted answer
  
  Yes, of course they can be used to extract features, just like convolutional networks, even in supervised settings.
  
  ViTs are not exclusive to classification, their intermediate layers can also be used as high quality features, just to show this, if your [search](https://scholar.google.nl/scholar?q=vision%20transformers%20transfer%20learning&hl=en) in Google Scholar for "vision transformer transfer learning", at the time this question was written, there are 66700 papers.
  
  
  ---
  
  