Image classification is a form of supervised learning where a model is trained to identify and categorize objects within images. AutoTrain simplifies the process, enabling you to train a state-of-the-art image classification model by simply uploading labeled example images.
To ensure your image classification model trains effectively, follow these guidelines for preparing your data:
Prepare a zip file containing your categorized images. Each category should have its own subfolder named after the class it represents. For example, to differentiate between ‘cats’ and ‘dogs’, your zip file structure should resemble the following:
cats_and_dogs.zip
├── cats
│ ├── cat.1.jpg
│ ├── cat.2.jpg
│ ├── cat.3.jpg
│ └── ...
└── dogs
├── dog.1.jpg
├── dog.2.jpg
├── dog.3.jpg
└── ...
Format: Ensure all images are in JPEG, JPG, or PNG format.
Quantity: Include at least 5 images per class to provide the model with sufficient examples for learning.
Exclusivity: The zip file should exclusively contain folders named after the classes, and these folders should only contain relevant images. No additional files or nested folders should be included.
Additional Tips
Uniformity: While not required, having images of similar sizes and resolutions can help improve model performance.
Variability: Include a variety of images for each class to encompass the range of appearances and contexts the model might encounter in real-world scenarios.
Some points to keep in mind:
When train.zip is decompressed, it creates two folders: cats and dogs. these are the two categories for classification. The images for both categories are in their respective folders. You can have as many categories as you want.
< > Update on GitHub