Roboflow Python Library
Website • Docs • Blog • Twitter • Linkedin • Universe
Roboflow makes managing, preprocessing, augmenting, and versioning datasets for computer vision seamless. This is the official Roboflow python package that interfaces with the Roboflow API. Key features of Roboflow:
- Import and Export image datasets into any supported formats
- Preprocess and augment data using Roboflow's dataset management tools
- Train computer vision models using Roboflow Train and deploy to production
- Use community curated projects to start building your own vision-powered products
Installation:
To install this package, please use Python 3.6 or higher. We provide three different ways to install the Roboflow
package to use within your own projects.
Install from PyPi (Recommended):
pip install roboflow
Install from Source:
git clone https://github.com/roboflow-ai/roboflow-python.git
cd roboflow-python
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt
Quickstart
import roboflow
# Instantiate Roboflow object with your API key
rf = roboflow.Roboflow(api_key=YOUR_API_KEY_HERE)
# List all projects for your workspace
workspace = rf.workspace()
# Load a certain project, workspace url is optional
project = rf.project("PROJECT_ID")
# List all versions of a specific project
project.versions()
# Upload image to dataset
project.upload("UPLOAD_IMAGE.jpg")
# Retrieve the model of a specific project
project.version("1").model
# predict on a local image
prediction = model.predict("YOUR_IMAGE.jpg")
# Predict on a hosted image
prediction = model.predict("YOUR_IMAGE.jpg", hosted=True)
# Plot the prediction
prediction.plot()
# Convert predictions to JSON
prediction.json()
# Save the prediction as an image
prediction.save(output_path='predictions.jpg')
Using this package for a specifc project
If you have a specific project from your workspace you'd like to run in a notebook follow along on this tutorial Downloading Datasets from Roboflow for Training (Python)
Selecting the format you'd like your project to be exported as while choosing the show download code option will display code snippets you can use in either Jupyter or your terminal. These code snippets will include your api_key, project, and workspace names.
Deving locally
- clone repo
- create a virtual env:
virtualenv local_dev - activate virtual env:
source local_dev/bin/activate - install packages from repo:
pip3 install -r requirements.txt - create script on top level of
ROBOFLOW-PYTHONand reference localroboflowdirectory:from roboflow import Roboflow - when done, uptick the pip package minor version number in
setup.py - manually add any new dependencies to the
requirements.txtand list of dependencies insetup.py(careful not to overwrite any packages that might screw up backwards dependencies for object detection, etc.)
Metadata
Release files for roboflow 0.2.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| roboflow-0.2.11.tar.gz | 24.1 kB | Without provenance | Details for roboflow-0.2.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| roboflow-0.2.11-py3-none-any.whl | Python 3 | none | any | Details for roboflow-0.2.11-py3-none-any.whl |
Total release size: 52.3 kB
Release files / roboflow-0.2.11.tar.gz
| Download URL | roboflow-0.2.11.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7221a65e686684dff36505163081b03d5ec8efc7a39e58c0ae41d17931aaf34
|
|
BLAKE2b-256 checksum How to use checksums |
f6d085a242df411b36681ea97f88a185a605f68dd89c531999d7258245dca3e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.10
|
Release files / roboflow-0.2.11-py3-none-any.whl
| Download URL | roboflow-0.2.11-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f7017a6faa4d1917152f505e79f7f8d8dda7364e5840fa1ba74a61ec5d22406
|
|
BLAKE2b-256 checksum How to use checksums |
1c9f9d7ba305b051cde117df2b5e483dba94f692f131d3aed2d79aed644e6a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.10
|
Security for roboflow 0.2.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.