CSV File Format

In order to get your data into PerceptiLabs, you must first manually create a .csv file that lists relative paths to each data file (e.g., image file), and specifies the labels associated with each data file. This file can be created in a standard text editor or in a spreadsheet tool like Excel.

PerceptiLabs then uses this file to import your data, either when you first create a new model using the Data Wizard, or post model-creation, when you access the model's data settings from the Modeling Tool.

Format

Your .csv file must contain two or more columns each separated using a comma character. The first row must contain column headers which are separated in the same way but can contain any strings you want to represent the column names. Typically these names reflect the contents of the columns like image_paths, labels etc.

The following is a partial example of valid CSV data that maps image files in an images subdirectory (located in the same directory as the .csv file itself) to classification labels:

Image_paths,Labels
images/0.png,7
images/1.png,2
images/2.png,1
images/3.png,0
images/4.png,4

This partial example was taken from the Basic Image Recognition Tutorial.

Note:

  • All of the data rows for a column, must contain the same type of data (e.g., each row in the Labels column in the next above, must contain an integer).

  • All rows must be populated. Any rows with missing values will cause PerceptiLabs to fail.

Filename and Directory Structure

The base filename can be any name you like (e.g., mydata.csv). The file itself must exist in a directory relative to the data files specified within the file. In the example above, all images have been specified as being located in an images directory that is located in the same directory as the .csv file. The directory structure would therefore be:

mydata.csv
/images
  0.png
  1.png
  ...

For examples of CSV files, check out some our example GitHub repos.

Last updated