Expected 11 columns, but found 3 columns only

44 views
Skip to first unread message

Joel Anderson

unread,
Sep 20, 2019, 6:29:12 PM9/20/19
to cloud-vision-discuss
Hi,

I am trying to import a csv file into the vision AutoML.   It keeps complaining that it needs 11 columns.  I've also tried some other variants, all require 11 columns.  I do want to use the bounding boxes.  Has the format changed?


AutoML doc says the format is :

[set,]image_path[,label,x1,y1,,,x2,y2]
TRAIN,gs://My_Bucket/sample1.jpg,cat,0.125,0.25,,,0.375,0.5
VALIDATE,gs://My_Bucket/sample1.jpg,cat,0.4,0.3,,,0.55,0.55
TEST,gs://My_Bucket/sample1.jpg,dog,0.5,0.675,,,0.75,0.875


Here's some example lines it complains about:

TRAIN,gs://mytensorflowdata/CanVideo 50.jpg,sodacan,0.378125,0.10138888888888889,,,0.61796875,0.8708333333333333


TRAIN,gs://mytensorflowdata/CanVideo 50.jpg,sodacan


gs://mytensorflowdata/CanVideo 50.jpg


Am I doing something wrong?  What are the 11 columns?

Cheers,
Joel

Ali (Cloud Platform Support)

unread,
Sep 22, 2019, 2:32:32 PM9/22/19
to cloud-vision-discuss
Hi,

Following the documentation to prepare your data in CSV format, each row should have the following format:

First column has to hold the value TRAIN, VALIDATE, TEST or UNASSIGNED. 
The second column if the GCS path of your image.
The third column is the label of your image. 
The remaining columns hold the bounding box in either of the two formats:
-(x_relative_min, y_relative_min,,,x_relative_max,y_relative_max,,)
        -(x_relative_min,y_relative_min,x_relative_max,y_relative_min,x_relative_max,y_relative_max,x_relative_min,y_relative_max)

As displayed in the first format of the bounding box, even if a column is empty, you still have to include a comma with nothing indicated after it. In other words, each row is required to have 11 columns even if some columns for some rows are empty for the upload to properly work. 

Joel Anderson

unread,
Sep 22, 2019, 4:43:13 PM9/22/19
to cloud-vision-discuss
Thank you!

This worked.
Reply all
Reply to author
Forward
0 new messages