Image Classification
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.
Preparing your data
To ensure your image classification model trains effectively, follow these guidelines for preparing your data:
Organizing Images
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
βββ ...
Image Requirements
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:
- The zip file should contain multiple folders (the classes), each folder should contain images of a single class.
- The name of the folder should be the name of the class.
- The images must be jpeg, jpg or png.
- There should be at least 5 images per class.
- There must not be any other files in the zip file.
- There must not be any other folders inside the zip folder.
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