Upload a Dataset
You can upload images and annotations to a Roboflow project using the Python SDK.
Upload a Single Image
import roboflow
rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("your-project-id")
project.upload("path/to/image.jpg")
Upload with Annotations
project.upload(
image_path="path/to/image.jpg",
annotation_path="path/to/annotation.xml",
)
Batch Upload
project.upload("path/to/directory/")
This will upload all images in the specified directory along with any matching annotation files.