Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inference-cli with batch processing for Workflows #838

Merged
merged 20 commits into from
Nov 28, 2024

Conversation

PawelPeczek-Roboflow
Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow commented Nov 26, 2024

Description

New command in inference-cli to process data with Workflows, making it possible to:

  • process videos - one passes video path and specifies output dir and can run any workflow, responses from each frame will be saved in output directory as CSV of JSONL file

  • process individual image - results dumped into output dir - one may use python package or API to run workflow

  • process directory of images - results dumped into output dir - with sub-dir for each image - one may use python package or API to run workflow and request aggregation of all JSON results into single JSONL or CSV

  • when workflow returns image:

    • for video processing it saves output video file (only dimensionality=1 outputs, as otherwise it does not make sense)
    • for image processing - output is saved in image results sub-directory
    • one may disable image-outputs saving
    • image outputs do not get collected in JSON / CSV files to save space
  • processing of directory of images is indempotent:

    • can resume after failure (processed images got denoted in log file)
    • this behaviour can be overriden - to force re-processing
  • processing can run really fast against hosted API:

    • single-stage workflow with yolov8n-640 - one client could run over 65 images per second
    • 2-stage-workflow with yolov8n-640 and classifier - one client could run at 30 images per second

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

  • CI still 🟢
  • new tests

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

inference_cli/workflows.py Fixed Show resolved Hide resolved
inference_cli/workflows.py Fixed Show resolved Hide resolved
@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit a011334 into main Nov 28, 2024
74 checks passed
@PawelPeczek-Roboflow PawelPeczek-Roboflow deleted the feature/inference_cli_with_workflows branch November 28, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants