Getting Started with the Roboflow Upload API
Key Takeaways
The Roboflow Upload API allows for automation of data upload processes in computer vision tasks, supporting various annotation formats and programming languages, including Bash, Python, and JavaScript.
Full Transcript
greetings this is jacob from roboflow here today to talk about the upload api for rebel flow so this video is assumed that you've uh have a little bit of experience using roboflow and you've started uploading some data but maybe now you want to start using the back end to be able to automatically upload images into our platform so you can use your normal roboflow functions on these images so if you haven't added data before this is kind of the general flow of the way you upload data into roboflow so you go here via the front end and you can add images from your local drive so for example here we might go in and decide that we want to upload some images from a given data set so we have i have this bernie sanders data set here and i might take one of these images and be able to upload uh this just via our front end so normally you're used to seeing this sort of show up here and then you can do finish upload and it goes right into your data set you choose your splits uh you can put it into training validation or test and then the images come up and they go into the platform in your data set here and we can see it via the front end export it do everything with our data that we want to but now for this video we're going to talk about how you can go through this process actually using the roboflow backend apis so you can automate this process so you don't necessarily have to be uploading every time via our front end so that's where the roboflow upload api comes in so here if you take a look at our docs docs.roboflow.com backslash adding data upload api you can see the upload api uh specs here so the url is the api.roboflow.com dataset backslash and then you put your dataset and then upload and we'll we'll kind of get a little bit more fine-grained into these uh query parameters as we we work through our example a day and so one of the first ways you can use this is through bash command so basically we're just going to be sending a base64 encoded image up into our data set and the way to do that um through bash uh we'll go ahead and jump over into a bash terminal here is uh to simply uh cap the image into a base64 encoded string pipe that into the upload api with a few parameters and then it will automatically upload and um this is kind of the same process you're going to use in whatever language you're using to interact with this api and we'll go into some other languages after this so for example here we can take a look i have a data set here of two images um there's uh ex and there's the x2 there's a jpeg file and then there's a xml file which represents the annotation for that image so in order to upload this uh jpeg file here we can go ahead and run this following command where we first base64 encode uh this image with this command and then we pipe that into a curl command to post that base64 encoded string up to our roboflow api so that's going to be at api.roboflow.com backslash dataset and then upload api is actually the name of the dataset that we're working on so this is the name of your data set that you want to put up here and then it's backslash upload and then question mark where you put in your query string parameters so here you're going to put your api key i've already saved this as a bash variable so it wouldn't um show in the video but you're going to want to put your api key in here and then the split that you wanted to go to one question you might be asking is okay well how do i get my api key so we'll go ahead and jump back over into the roboflow platform to see that if you go to your account over here on your account settings and then you go to roboflow api under the account tab you can see here that you have your keys so you have a publishable key for some of the things that we want you to be able to share publicly and then you also have your api key here which you can use to uh for for secret operations that only you should be doing so this is where you're going to find your api key and now that we've typed all that out we can go ahead and uh actually send this in so if this works you'll get a 200 response back with success is true and then the id of the image that has been created so this id is important because it's the image id that you're going to see uh when you're looking at a data set but it also helps you uh find you know uh find images and then also for if you want to annotate this image which we'll go and walk through that next so this is the the image that we've uploaded through the api here with that simple command and now it's already automatically in our data set we can start doing things in roboflow like annotating it and doing some other things with it so that's that's all pretty exciting now the next thing um that i want to show uh you in this video is how to upload annotations for your image so this is currently in in beta so we're not actually gonna to run it but this is something that is available on roboflow pro accounts where you can actually basically you can send your annotations up to annotate your image so you can do this automatically as well so this is something that would be useful if you're in an active learning process where you want to be automatically uploading annotations and then automatically uploading the way those things should be annotated and this can be useful too if you want to be programmatically importing large data sets in into rebel flow so to go through the way we would do that um so we'd maybe first have our uh xml file so we'd have um this is a voc xml annotation format although we do support over 30 annotation formats at rebelflow so you can see here this is the annotation format here catted out so again from bash you're going to be uh cadding your your file um and then piping that into a um into a request to our uh to our annotate api so we would go and uh cap that xml file we'd put it in through here to the api.rebelflow.com backstage data dataset upload api annotate and then here this is actually the idea of the image that was created in the last step when you uploaded your image so it's important to keep track of those ids as you're uploading and annotating images coming up through here and then again you put in your api key and then the other important thing you need to do is you need to put the name of the file there this helps us so we know what kind of extension the file is and so we can know how to automatically parse uh your annotation as it's coming up into roboflow so that's a quick look on how to upload an image and then upload an annotation into the roboflow dashboard so you can start doing all your other roboflow annotations with your operations with your data and so one other thing i want to show before we conclude this video is if you go to docsetroboflow.com backslash adding data backslash upload api you'll see here all of the details that we've walked through in this in this tutorial the types of responses you can get and then you'll also see here code snippets of how to do this in other languages so we've gone through here with bash commands but you can also do the same process in python with the request library so you can be using python to automatically upload your images here and you can also one important thing that i didn't cover in the bash command is you can be uploading these images via direct url so maybe you don't want to have to be pulling an image down from the url and then uploading it to the roboflow servers you can simply just connect those two with an image url so you can do local url you can do it in bash you can do it in python you can do it in javascript and then we have other languages here where we're actually just recording responses so if you want to use this api via another language just like click one of these links it will let us know that people are are trying to use it with these languages and we'll go ahead and add support to that and of course if if um your your request is urgent you can always reach out to us and let us know that you're trying to use the upload api and please let us know of any hurdles you might encounter along the way hopefully you found this video informative as you're working through using the roboflow upload api and thanks so much for listening today and as always like and subscribe below and we'll see you in the next video
Original Description
Upload images to Roboflow via API! We walk through the details in this video so you can automate your data upload processes.
https://docs.roboflow.com/adding-data/upload-api
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Roboflow · Roboflow · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
YOLOv3 PyTorch Notebook Tutorial
Roboflow
How to Train YOLOv4 on a Custom Dataset (PyTorch)
Roboflow
How to Train YOLOv5 on a Custom Dataset
Roboflow
How to Use the Roboflow Dataset Health Check
Roboflow
What is Mean Average Precision (mAP)?
Roboflow
How to Use the Roboflow Model Library
Roboflow
How to Train EfficientDet in TensorFlow 2 Object Detection
Roboflow
How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
Roboflow
Ask the Roboflow Team Anything - Episode 1
Roboflow
Exploring The COCO Dataset
Roboflow
Community Spotlight: Improving Uno with Computer Vision
Roboflow
Mosaic Data Augmentation - Deep Dive
Roboflow
Hands on with the OAK-1
Roboflow
Glenn Jocher: What is New in YOLO v5?
Roboflow
How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
Roboflow
An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
Roboflow
How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
Roboflow
Tackling the Small Object Problem in Object Detection
Roboflow
Fast.ai v2 Released - What's New?
Roboflow
Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Roboflow
How to Train a Custom Resnet34 Image Classification Model
Roboflow
How to Label Images for Object Detection with CVAT
Roboflow
Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Roboflow
Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Roboflow
Getting Started with VoTT - Computer Vision Annotation
Roboflow
How to Manage Classes in Object Detection (Rename, Combine, Balance)
Roboflow
How to Train YOLOv4 on a Custom Dataset in Darknet
Roboflow
Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Roboflow
Getting Started with Image Data Augmentation
Roboflow
Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Roboflow
GA Hosts Roboflow - Healthcare and AI
Roboflow
How do self driving cars know when to stop?
Roboflow
What is PASCAL VOC XML?
Roboflow
AutoML Showdown: Google vs Amazon vs Microsoft
Roboflow
How is computer vision changing manufacturing?
Roboflow
The Alphabet in American Sign Language
Roboflow
Luxonis OAK-D: Computer Vision on Device
Roboflow
How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
Roboflow
TensorFlow vs PyTorch: Fireside
Roboflow
Occlusion Techniques in Computer Vision
Roboflow
A Customizable Web Application for Your Computer Vision Model
Roboflow
Model Tradeoffs and the Future of Computer Vision
Roboflow
Designing an Augmented Reality Board Game App
Roboflow
YOLOv4 - Advanced Tactics
Roboflow
How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
Roboflow
Fireside Chat: Computer Vision in Agriculture
Roboflow
Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Roboflow
What is Image Preprocessing?
Roboflow
Building a Community of Creators with BlkArthouse and Von Deon
Roboflow
How to Train Scaled-YOLOv4 to Detect Custom Objects
Roboflow
Intro to Computer Vision: Fireside
Roboflow
The Best Way to Annotate Images for Object Detection
Roboflow
The Computer Vision Process: Fireside
Roboflow
How to Annotate Images with Your Team Using Roboflow
Roboflow
Introducing the Roboflow Object Count Histogram
Roboflow
How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
Roboflow
CLIP: OpenAI's amazing new zero-shot image classifier
Roboflow
How I hacked my Nest camera to run custom models
Roboflow
Getting Started with the Roboflow Inference API
Roboflow
Transfer Learning in Computer Vision | What, How, Why
Roboflow
More on: CV Basics
View skill →Related Reads
📰
📰
📰
📰
Building Anime Lip Sync in ComfyUI: A Detection-Guided Diffusion Pipeline
Dev.to AI
Membangun MataBakti: Ketika Computer Vision Belajar Menemukan Cacat pada PCB
Medium · Deep Learning
The Role of 3D Cuboid Annotation in Autonomous Vehicle Perception
Dev.to AI
Vision AI: Transforming Business Operations with Computer Vision AI
Medium · AI
🎓
Tutor Explanation
DeepCamp AI