Getting Started with the Roboflow Upload API

Roboflow · Beginner ·👁️ Computer Vision ·5y ago

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 YOLOv3 PyTorch Notebook Tutorial
YOLOv3 PyTorch Notebook Tutorial
Roboflow
2 How to Train YOLOv4 on a Custom Dataset (PyTorch)
How to Train YOLOv4 on a Custom Dataset (PyTorch)
Roboflow
3 How to Train YOLOv5 on a Custom Dataset
How to Train YOLOv5 on a Custom Dataset
Roboflow
4 How to Use the Roboflow Dataset Health Check
How to Use the Roboflow Dataset Health Check
Roboflow
5 What is Mean Average Precision (mAP)?
What is Mean Average Precision (mAP)?
Roboflow
6 How to Use the Roboflow Model Library
How to Use the Roboflow Model Library
Roboflow
7 How to Train EfficientDet in TensorFlow 2 Object Detection
How to Train EfficientDet in TensorFlow 2 Object Detection
Roboflow
8 How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
Roboflow
9 Ask the Roboflow Team Anything - Episode 1
Ask the Roboflow Team Anything - Episode 1
Roboflow
10 Exploring The COCO Dataset
Exploring The COCO Dataset
Roboflow
11 Community Spotlight: Improving Uno with Computer Vision
Community Spotlight: Improving Uno with Computer Vision
Roboflow
12 Mosaic Data Augmentation - Deep Dive
Mosaic Data Augmentation - Deep Dive
Roboflow
13 Hands on with the OAK-1
Hands on with the OAK-1
Roboflow
14 Glenn Jocher: What is New in YOLO v5?
Glenn Jocher: What is New in YOLO v5?
Roboflow
15 How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
Roboflow
16 An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
Roboflow
17 How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
Roboflow
18 Tackling the Small Object Problem in Object Detection
Tackling the Small Object Problem in Object Detection
Roboflow
19 Fast.ai v2 Released - What's New?
Fast.ai v2 Released - What's New?
Roboflow
20 Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Roboflow
21 How to Train a Custom Resnet34 Image Classification Model
How to Train a Custom Resnet34 Image Classification Model
Roboflow
22 How to Label Images for Object Detection with CVAT
How to Label Images for Object Detection with CVAT
Roboflow
23 Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Roboflow
24 Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Roboflow
25 Getting Started with VoTT - Computer Vision Annotation
Getting Started with VoTT - Computer Vision Annotation
Roboflow
26 How to Manage Classes in Object Detection (Rename, Combine, Balance)
How to Manage Classes in Object Detection (Rename, Combine, Balance)
Roboflow
27 How to Train YOLOv4 on a Custom Dataset in Darknet
How to Train YOLOv4 on a Custom Dataset in Darknet
Roboflow
28 Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Roboflow
29 Getting Started with Image Data Augmentation
Getting Started with Image Data Augmentation
Roboflow
30 Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Roboflow
31 GA Hosts Roboflow - Healthcare and AI
GA Hosts Roboflow - Healthcare and AI
Roboflow
32 How do self driving cars know when to stop?
How do self driving cars know when to stop?
Roboflow
33 What is PASCAL VOC XML?
What is PASCAL VOC XML?
Roboflow
34 AutoML Showdown: Google vs Amazon vs Microsoft
AutoML Showdown: Google vs Amazon vs Microsoft
Roboflow
35 How is computer vision changing manufacturing?
How is computer vision changing manufacturing?
Roboflow
36 The Alphabet in American Sign Language
The Alphabet in American Sign Language
Roboflow
37 Luxonis OAK-D: Computer Vision on Device
Luxonis OAK-D: Computer Vision on Device
Roboflow
38 How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
Roboflow
39 TensorFlow vs PyTorch: Fireside
TensorFlow vs PyTorch: Fireside
Roboflow
40 Occlusion Techniques in Computer Vision
Occlusion Techniques in Computer Vision
Roboflow
41 A Customizable Web Application for Your Computer Vision Model
A Customizable Web Application for Your Computer Vision Model
Roboflow
42 Model Tradeoffs and the Future of Computer Vision
Model Tradeoffs and the Future of Computer Vision
Roboflow
43 Designing an Augmented Reality Board Game App
Designing an Augmented Reality Board Game App
Roboflow
44 YOLOv4 - Advanced Tactics
YOLOv4 - Advanced Tactics
Roboflow
45 How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
Roboflow
46 Fireside Chat: Computer Vision in Agriculture
Fireside Chat: Computer Vision in Agriculture
Roboflow
47 Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Roboflow
48 What is Image Preprocessing?
What is Image Preprocessing?
Roboflow
49 Building a Community of Creators with BlkArthouse and Von Deon
Building a Community of Creators with BlkArthouse and Von Deon
Roboflow
50 How to Train Scaled-YOLOv4 to Detect Custom Objects
How to Train Scaled-YOLOv4 to Detect Custom Objects
Roboflow
51 Intro to Computer Vision: Fireside
Intro to Computer Vision: Fireside
Roboflow
52 The Best Way to Annotate Images for Object Detection
The Best Way to Annotate Images for Object Detection
Roboflow
53 The Computer Vision Process: Fireside
The Computer Vision Process: Fireside
Roboflow
54 How to Annotate Images with Your Team Using Roboflow
How to Annotate Images with Your Team Using Roboflow
Roboflow
55 Introducing the Roboflow Object Count Histogram
Introducing the Roboflow Object Count Histogram
Roboflow
56 How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
Roboflow
57 CLIP: OpenAI's amazing new zero-shot image classifier
CLIP: OpenAI's amazing new zero-shot image classifier
Roboflow
58 How I hacked my Nest camera to run custom models
How I hacked my Nest camera to run custom models
Roboflow
59 Getting Started with the Roboflow Inference API
Getting Started with the Roboflow Inference API
Roboflow
60 Transfer Learning in Computer Vision | What, How, Why
Transfer Learning in Computer Vision | What, How, Why
Roboflow

The Roboflow Upload API allows for automation of data upload processes in computer vision tasks, supporting various annotation formats and programming languages. This API can be used to upload images, annotate them, and track them using image IDs. By following the steps outlined in this video, users can integrate the Roboflow Upload API with their workflows and automate data upload processes.

Key Takeaways
  1. Base64 encode an image
  2. Pipe the base64 encoded image into a curl command
  3. Post the base64 encoded string to the Roboflow API
  4. Upload an image to Roboflow using the API
  5. Annotate an image using the VOC XML format
  6. Upload annotations to Roboflow using the Annotate API
  7. Use the image ID to track and find images
  8. Use the API key to authenticate and authorize operations
💡 The Roboflow Upload API provides a flexible and automated way to upload and manage images in computer vision workflows, supporting various annotation formats and programming languages.

Related Reads

📰
Building Anime Lip Sync in ComfyUI: A Detection-Guided Diffusion Pipeline
Learn to build an anime lip sync pipeline in ComfyUI using detection-guided diffusion, a technique that combines computer vision and generative models
Dev.to AI
📰
Membangun MataBakti: Ketika Computer Vision Belajar Menemukan Cacat pada PCB
Learn how to apply computer vision to detect defects on Printed Circuit Boards (PCBs) and improve manufacturing quality
Medium · Deep Learning
📰
The Role of 3D Cuboid Annotation in Autonomous Vehicle Perception
Learn how 3D cuboid annotation enables autonomous vehicles to perceive their environment accurately, and why it's crucial for safe navigation, with steps to apply this knowledge in practice.
Dev.to AI
📰
Vision AI: Transforming Business Operations with Computer Vision AI
Learn how Vision AI transforms business operations with computer vision, and why it matters for companies to leverage video data
Medium · AI
Up next
Marketing management for ugc net| Important topics of marketing management ugc net commerce dec 2023
Bhoomi Learning Centre~Dr. Muskan
Watch →