WARNING: This notebook will add and delete data in your Edge Impulse project, so be careful! We recommend creating a throwaway project when testing this notebook.Note that you might need to refresh the page with your Edge Impulse project to see the samples appear.
Copy API key from Edge Impulse project
ei.API_KEY
value in the following cell:
label=None
in the function call and name your files with <label>.<name>.<ext>. For example, wave.01.csv will have the label wave when uploaded. See here for more information.
The following file formats are allowed: .cbor, .json, .csv, .wav, .jpg, .png, .mp4, .avi.
Images uploaded to Edge Impulse project
ei.data.get_sample_ids()
function, which allows you to filter IDs based on filename, category, and label.
delete_sample_by_id()
function. You can also delete all the samples in your project by calling delete_all_samples()
.
Important! The annotations file must be named exactly info.labels
Images uploaded to Edge Impulse project
Copy API key from Edge Impulse project
signature
value can be set to 0
.
The raw data must be encoded in an IO object. We convert the dictionary objects to a BytesIO
object, but you can also read in data from .json files.
Copy API key from Edge Impulse project
Important! NumPy arrays must be in the shape (Number of samples, number of data points, number of sensors)
If you are working with image data in NumPy, we recommend saving those images as .png or .jpg files and using upload_directory()
.
Copy API key from Edge Impulse project
pd
. For example, one of: