google-cloud-platformvideo-intelligence-api

GCP > Video Intelligence: Prepare CSV error: Has critical error in root level csv, Expected 2 columns, but found 1 columns only


I'm trying to follow documentation from below GCP link to prepare my video training data. In the doc, it says that if you want to use GCP to label videos, you can use UNASSIGNED feature. I have my videos uploaded to a bucket. I have a traffic_video_labels.csv with below rows:

gs://video_intel/1.mp4
gs://video_intel/2.mp4

Now, in my Video Intelligence Import section, I want to use a CSV called check.csv that has below row as it references back to the video locations. Using UNNASIGNED value should let me use the labelling feature within GCP.

UNASSIGNED,gs://video_intel/traffic_video_labels.csv

However, when I try to check.csv as a file, I get the error:

Has critical error in root level csv gs://video_intel/check.csv line 1: Expected 2 columns, but found 
1 columns only.

Can anyone pls help with this? thanks!

https://cloud.google.com/video-intelligence/automl/object-tracking/docs/prepare


Solution

  • For the error message "Expected 2 columns, but found 1 columns only." try to fix the format of your CSV file, open the file in a text editor of your choice (such as Cloud Shell, Sublime, Atom, etc.) to inspect the file format.

    When opening a CSV file in Google Sheets or a similar product, you won't be able to format the file properly (i.e. empty values from tailing commas) due to limitation on the user interface, but in text editors, you should not run into those issues.

    If this does not work, please share your CSV file to make a test with your file by my own.