Uploading data from google colab

Hello there,
I am currently working with esp32 cam, my model training and dataset are both on google colab, I could not find a way to stream my training data directly from google colab to edge impulse, any help will be appreciated

Hello @Faisal_Sani_Bala,

I guess you want to push some images right?

You can use the following code entries in your notebook:

To install Edge Impulse CLI:

!npm install -g --unsafe-perm edge-impulse-cli

And to push the data:

# Set your API Keys
api_key = 'ei_55a76...your API KEY'

# Your directory containing your data
output_dir = './your-directory'
# If you have one label per directory you can do:
labels = ['label1', 'label2', 'label3']

for label in labels:
  sample_dir = output_dir + '/' + label + '/*.jpg'
  print("Uploading files from ", sample_dir)
  cmd = 'edge-impulse-uploader --api-key ' + api_key + ' --label ' + label + ' ' + sample_dir


Best regards,



Louis thank you so much, I will try it and see the outcome

1 Like

Helli lious, I had it on the screen that the upload is successful, however I could not locate it on my edge impulse dashboard

Hi @Faisal_Sani_Bala,

Try using output_dir = './content' instead of output_dir ='./content/'
I guess it should solve your issue :slight_smile: