Answers.Body: <p>As a rule of thumb, a dataset in computer vision is considered small when it contains less than 1000 images per class. This holds also for finetuning pretrained models.</p>
  <p>This doesn't mean you won't get better results with less than that, but in your case 90 is truly a small amount that will almost certainly lead to overfit those images without any good  generalization.</p>
  <p>If the classes you want to classify are not part of any of the main &quot;big&quot; datasets like ImageNet, then unfortunately you'll have to sit down, prepare some coffee and start scraping and annotating images as much as you can.</p>
  <p>If instead the classes you want to classify are a subset of some already existing dataset, then your problem becomes more of a transfer learning problem, in which case it will be more useful for you to start investigating preprocessing step that will match your images with those of ImageNet (or whatever dataset was used to train the pretrained weights you're planning to use. Some annotation work will still be beneficial though, since 90 images are very few even just for evaluation, i.e. you'll might find nice tricks like normalization and histogram matching that boost the performance of a pretrained model on your 90 images just to see those step brutally fail in a real production environment.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-02T02:36:11.103Z
Answers.Text: Thanks for your reply! Do you have any reference for the 1000 images per class rule-of-thumb?
Answers.UserDisplayName: randomal
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-01T09:20:36.690Z
Answers.LastActivityDate: 2022-08-01T09:20:36.690Z
Answers.UserDisplayName: Edoardo Guerriero
Body: <p>I am developing a binary image classifier, and my dataset size is of 90 images. From a theoretical point of view, are they enough for fine-tuning a pre-traiend classifier? I plan to test the models listed <a href="https://github.com/Harry-KIT/Image-Classification-on-small-datasets-in-Pytorch" rel="nofollow noreferrer">here</a>.</p>
  
Tags: <classification>
Title: Do I have enough images? Fine-tuning pre-trained models for bvinary image classification
UserDisplayName: randomal
ThreadText: # Do I have enough images? Fine-tuning pre-trained models for bvinary image classification
  
  (Asked by: username_0 on 2022-08-01)
  
  I am developing a binary image classifier, and my dataset size is of 90 images. From a theoretical point of view, are they enough for fine-tuning a pre-traiend classifier? I plan to test the models listed [here](https://github.com/Harry-KIT/Image-Classification-on-small-datasets-in-Pytorch).
  
  **Tags:** classification
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-08-01. Score: 0 | Accepted answer
  
  As a rule of thumb, a dataset in computer vision is considered small when it contains less than 1000 images per class. This holds also for finetuning pretrained models.
  
  This doesn't mean you won't get better results with less than that, but in your case 90 is truly a small amount that will almost certainly lead to overfit those images without any good generalization.
  
  If the classes you want to classify are not part of any of the main "big" datasets like ImageNet, then unfortunately you'll have to sit down, prepare some coffee and start scraping and annotating images as much as you can.
  
  If instead the classes you want to classify are a subset of some already existing dataset, then your problem becomes more of a transfer learning problem, in which case it will be more useful for you to start investigating preprocessing step that will match your images with those of ImageNet (or whatever dataset was used to train the pretrained weights you're planning to use. Some annotation work will still be beneficial though, since 90 images are very few even just for evaluation, i.e. you'll might find nice tricks like normalization and histogram matching that boost the performance of a pretrained model on your 90 images just to see those step brutally fail in a real production environment.
  
  > **Comments:**
  > **username_0**: Thanks for your reply! Do you have any reference for the 1000 images per class rule-of-thumb?  
  
  ---
  
  