Single-label image classification / cheat sheet
Use this cheat sheet
If your input data consists of labeled images containing exactly one of multiple classes. This is called single-label classification.
Example use cases
Images that contain exactly one handwritten number from
0 to 9.
You can add your dataset in several different ways in the Datasets view. You can read more here on the requirements when you import from your data warehouse, directly from your local computer, via data API, or from an URL.
In this cheat sheet we’ll show you how to add it directly from your computer.
Images that you have on your local computer need to be archived inside a zip file, either with an index file or in structured folders.
Import data with and index.csv
Prepare a zip file with a folder containing all your images and a corresponding index.csv.
The Peltarion Platform supports .jpg or .png.
Structure of index.csv
The index.csv file is a simple text file where columns are separated by a comma: ",". Each column will be imported as a dataset feature, where the name of the feature is taken from the first line.
You need to give at least two features: the images and their target classes. To specify the images, write the name of the image file, together with their paths inside the zip file if they are located in subfolders.
No csv structure
If the zip file does not contain any csv file, you must organize the included files in a folder- and subfolder-structure. Include all files in one category on one folder and name the folder.
Use the Experiment wizard to build a model.
The first image files found are located in the second level of subfolders. Thus, the categorical features category_0 and category_1 are automatically created based on the folder names.
However, the car images are located in only one level of subfolder. As a result, they are not imported in the dataset.
Try the smallest depth model first
Try the smallest depth model first, since it will be faster to train and may already be complex enough to model your data well.
If the results are not good enough, you can move towards increasingly deep models in later experiments.
When you’ve created an experiment with the Experiment wizard, a ready-to-run model will populate the Modeling canvas. Everything needed will be set, input and target feature, weights (if you wanted those), loss function, activation, runtime settings, i.e., batch size, learning rate, number of epochs.
You can still edit/add/remove anything on the Modeling canvas or override all the existing choices, delete blocks, and add a new ones.
The only thing left to do is to press the Run button on the upper right corner to start the training process.
Deploy experiment view
Click New deployment.
Select your experiment and epoch for deployment.
Click the Enable switch to deploy the experiment.
Image Classifier web app
To make it easier to test your model, we have provided a Image Classifier web app.
Click Open web app.