roboflow-python

The official Roboflow Python package. Manage your datasets, models, and deployments. Roboflow has everything you need to build a computer vision application.

https://github.com/roboflow/roboflow-python

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 53 committers (3.8%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary

Keywords

computer-vision deep-learning machine-learning python

Keywords from Contributors

yolov5 yolov8 instance-segmentation onnx agents yolo11 deployment inference inference-api inference-server
Last synced: 6 months ago · JSON representation

Repository

The official Roboflow Python package. Manage your datasets, models, and deployments. Roboflow has everything you need to build a computer vision application.

Basic Info
Statistics
  • Stars: 460
  • Watchers: 17
  • Forks: 96
  • Open Issues: 54
  • Releases: 100
Topics
computer-vision deep-learning machine-learning python
Created almost 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md


[notebooks](https://github.com/roboflow/notebooks) | [inference](https://github.com/roboflow/inference) | [autodistill](https://github.com/autodistill/autodistill) | [collect](https://github.com/roboflow/roboflow-collect) | [supervision](https://github.com/roboflow/supervision)
[![version](https://badge.fury.io/py/roboflow.svg)](https://badge.fury.io/py/roboflow) [![downloads](https://img.shields.io/pypi/dm/roboflow)](https://pypistats.org/packages/roboflow) [![license](https://img.shields.io/pypi/l/roboflow)](https://github.com/roboflow/roboflow-python/blob/main/LICENSE.md) [![python-version](https://img.shields.io/pypi/pyversions/roboflow)](https://badge.fury.io/py/roboflow)

Roboflow Python Package

Roboflow provides everything you need to build and deploy computer vision models. roboflow-python is the official Roboflow Python package. roboflow-python enables you to interact with models, datasets, and projects hosted on Roboflow.

With this Python package, you can:

  1. Create and manage projects;
  2. Upload images, annotations, and datasets to manage in Roboflow;
  3. Start training vision models on Roboflow;
  4. Run inference on models hosted on Roboflow, or Roboflow models self-hosted via Roboflow Inference, and more.

The Python package is documented on the official Roboflow documentation site. If you are developing a feature for this Python package, or need a full Python library reference, refer to the package developer documentation.

💻 Installation

You will need to have Python 3.8 or higher set up to use the Roboflow Python package.

Run the following command to install the Roboflow Python package:

bash pip install roboflow

For desktop features, use:

bash pip install "roboflow[desktop]"

Install from source You can also install the Roboflow Python package from source using the following commands: ```bash git clone https://github.com/roboflow-ai/roboflow-python.git cd roboflow-python python3 -m venv env source env/bin/activate pip install . ```
Command line tool By installing roboflow python package you can use some of its functionality in the command line (without having to write python code). See [CLI-COMMANDS.md](CLI-COMMANDS.md)

🚀 Getting Started

To use the Roboflow Python package, you first need to authenticate with your Roboflow account. You can do this by running the following command:

python import roboflow roboflow.login()

Authenticate with an API key You can also authenticate with an API key by using the following code: ```python import roboflow rf = roboflow.Roboflow(api_key="") ``` [Learn how to retrieve your Roboflow API key](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key).

Quickstart

Below are some common methods used with the Roboflow Python package, presented concisely for reference. For a full library reference, refer to the Roboflow API reference documentation.

```python import roboflow

roboflow.login()

rf = roboflow.Roboflow()

create a project

rf.createproject( projectname="project name", project_type="project-type", license="project-license" # "private" for private projects )

workspace = rf.workspace("WORKSPACEURL") project = workspace.project("PROJECTURL") version = project.version("VERSION_NUMBER")

upload a dataset

workspace.uploaddataset( datasetpath="./dataset/", numworkers=10, datasetformat="yolov8", # supports yolov8, yolov5, and Pascal VOC projectlicense="MIT", projecttype="object-detection" )

upload model weights

version.deploy(modeltype="yolov8", modelpath=f”{HOME}/runs/detect/train/”)

upload model weights - yolov10

Before attempting to upload YOLOv10 models install ultralytics like this:

pip install git+https://github.com/THU-MIG/yolov10.git

version.deploy(modeltype="yolov10", modelpath=f”{HOME}/runs/detect/train/”, filename="weights.pt")

run inference

model = version.model

imgurl = "https://media.roboflow.com/quickstart/aerialdrone.jpeg"

predictions = model.predict(img_url, hosted=True).json()

print(predictions) ```

Library Structure

The Roboflow Python library is structured using the same Workspace, Project, and Version ontology that you will see in the Roboflow application.

```python import roboflow

roboflow.login()

rf = roboflow.Roboflow()

workspace = rf.workspace("WORKSPACEURL") project = workspace.project("PROJECTURL") version = project.version("VERSION_NUMBER") ```

The workspace, project, and version parameters are the same as those you will find in the URL addresses at app.roboflow.com and universe.roboflow.com.

Within the workspace object you can perform actions like making a new project, listing your projects, or performing active learning where you are using predictions from one project's model to upload images to a new project.

Within the project object, you can retrieve metadata about the project, list versions, generate a new dataset version with preprocessing and augmentation settings, train a model in your project, and upload images and annotations to your project.

Within the version object, you can download the dataset version in any model format, train the version on Roboflow, and deploy your own external model to Roboflow.

🏆 Contributing

We would love your input on how we can improve the Roboflow Python package! Please see our contributing guide to get started. Thank you 🙏 to all our contributors!


Owner

  • Name: Roboflow
  • Login: roboflow
  • Kind: organization
  • Email: hello@roboflow.com
  • Location: United States of America

GitHub Events

Total
  • Create event: 61
  • Release event: 20
  • Issues event: 19
  • Watch event: 132
  • Delete event: 70
  • Issue comment event: 30
  • Push event: 243
  • Pull request event: 85
  • Pull request review comment event: 25
  • Pull request review event: 81
  • Fork event: 25
Last Year
  • Create event: 61
  • Release event: 20
  • Issues event: 19
  • Watch event: 132
  • Delete event: 70
  • Issue comment event: 30
  • Push event: 243
  • Pull request event: 85
  • Pull request review comment event: 25
  • Pull request review event: 81
  • Fork event: 25

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 978
  • Total Committers: 53
  • Avg Commits per committer: 18.453
  • Development Distribution Score (DDS): 0.835
Past Year
  • Commits: 309
  • Committers: 21
  • Avg Commits per committer: 14.714
  • Development Distribution Score (DDS): 0.793
Top Committers
Name Email Commits
jacobsolawetz j****z@g****m 161
Tony Lampada t****a@g****m 121
Palash Shah 3****o 97
pre-commit-ci[bot] 6****] 82
Leandro Rosemberg l****g@h****m 56
James Gallagher j****g@j****g 47
Iuri de Silvio i****i@r****m 35
FrancescoSaverioZuppichini f****i@g****m 28
PacificDou d****t@g****m 26
ryanjball r****l@g****m 20
Jay Lowe j****e@J****l 18
Leandro Rosemberg l****g@b****r 18
João j****x@g****m 17
ogjaylowe o****e@g****m 17
Thomas Hansen t****n@g****m 16
Paul Guerrie p****l@r****m 16
SkalskiP p****2@g****m 14
Samrat Sahoo s****3@g****m 13
Leo Ueno l****o@r****m 12
Tyler Odenthal t****r@r****m 11
Peter Robicheaux p****r@r****m 11
Sachin Agarwal s****n@r****m 11
Brad Dwyer g****b@b****m 10
Derek Brooks d****k@b****m 10
Solomon Lake Giffen-Hunter l****h@g****m 9
Onuralp SEZER t****r@g****m 9
Francesco Saverio Zuppichini z****f@u****h 9
Lukas KelseyFriedemann l****f@g****m 7
Nick Herrig n****g@g****m 6
Caique c****o@a****m 6
and 23 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 89
  • Total pull requests: 297
  • Average time to close issues: 4 months
  • Average time to close pull requests: 14 days
  • Total issue authors: 71
  • Total pull request authors: 56
  • Average comments per issue: 1.48
  • Average comments per pull request: 0.75
  • Merged pull requests: 244
  • Bot issues: 0
  • Bot pull requests: 13
Past Year
  • Issues: 19
  • Pull requests: 96
  • Average time to close issues: 24 days
  • Average time to close pull requests: 16 days
  • Issue authors: 17
  • Pull request authors: 21
  • Average comments per issue: 0.68
  • Average comments per pull request: 0.28
  • Merged pull requests: 72
  • Bot issues: 0
  • Bot pull requests: 3
Top Authors
Issue Authors
  • iurisilvio (5)
  • LinasKo (4)
  • yeldarby (3)
  • drakshayanidesai (3)
  • SkalskiP (2)
  • gpadiolleau (2)
  • cdeil (2)
  • tomershukhman (2)
  • AlainPilon (2)
  • Drakshayani-123 (1)
  • maxsitt (1)
  • aggiehorns (1)
  • IvanHahan (1)
  • hebrotem (1)
  • fcakyon (1)
Pull Request Authors
  • tonylampada (43)
  • iurisilvio (40)
  • lrosemberg (21)
  • capjamesg (21)
  • PacificDou (19)
  • Jacobsolawetz (17)
  • SolomonLake (15)
  • pre-commit-ci[bot] (15)
  • probicheaux (13)
  • ryanjball (12)
  • stellasphere (10)
  • ogjaylowe (10)
  • FrancescoSaverioZuppichini (10)
  • paulguerrie (10)
  • cdragos (8)
Top Labels
Issue Labels
bug (6) enhancement (2) documentation (1)
Pull Request Labels
codex (9) enhancement (5) dependencies (5) bug (3) caption-dataset (2)

Dependencies

requirements.txt pypi
  • Pillow >=7.1.2
  • PyYAML >=5.3.1
  • certifi ==2021.5.30
  • chardet ==4.0.0
  • cycler ==0.10.0
  • idna ==2.10
  • kiwisolver ==1.3.1
  • matplotlib *
  • numpy >=1.18.5
  • opencv-python >=4.1.2
  • pyparsing ==2.4.7
  • python-dateutil *
  • python-dotenv *
  • requests *
  • requests_toolbelt *
  • six *
  • tqdm >=4.41.0
  • urllib3 ==1.26.6
  • wget *
setup.py pypi
  • Pillow >=7.1.2
  • Pillow ==9.0.1
  • PyYAML >=5.3.1
  • certifi ==2021.5.30
  • chardet ==4.0.0
  • cycler ==0.10.0
  • glob2 *
  • idna ==2.10
  • kiwisolver ==1.3.1
  • matplotlib *
  • numpy >=1.18.5
  • opencv-python-headless ==4.2.0.32
  • pyparsing ==2.4.7
  • python-dateutil *
  • python-dotenv *
  • requests *
  • requests_toolbelt *
  • six *
  • tqdm >=4.41.0
  • urllib3 ==1.26.6
  • wget *
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
pyproject.toml pypi