Inference

Latest version: v0.11.0

Safety actively analyzes 630848 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

127.0.0.19001

result = client.infer_from_yolo_world(
inference_input=YOUR_IMAGE,
class_names=["dog", "cat"],
)


Active Learning 🤝 `workflows`
Active Learning data collection made simple with `workflows` 🔥 Now, with just a little bit of configuration you can start data collection to improve your model over time. Just take look how easy it is:

<div align="center">
<video src="https://github.com/roboflow/inference/assets/146137186/06e0b355-51f3-486d-8a5b-07123284b0e9" />
</div>

Key features:
* works for all models supported at Roboflow platform, including the ones from Roboflow Universe - making it trivial to use off-the-shelf model during project kick-off stage to collect dataset while serving meaningful predictions
* combines well with multiple `workflows` blocks - including `DetectionsConsensus` - making it possible to sample based on predictions of models ensemble 💥
* Active Learning block may use project-level config of Active Learning or define Active Learning strategy directly in the block definition (refer to [Active Learning documentation 📖 ](https://github.com/roboflow/inference/blob/main/inference/core/active_learning/README.md) for details on how to configure data collection)

See [documentation 📖 ](https://github.com/roboflow/inference/tree/main/inference/enterprise/workflows#activelearningdatacollector) of new `ActiveLearningDataCollector` to find detailed info.

🌱 Changed
`InferencePipeline` now works with all models supported at Roboflow platform 🎆
For a long time - `InferencePipeline` worked only with object-detection models. This is no longer the case - from now on, other type of models supported at Roboflow platform (including stubs - like `my-project/0`) work under `InferencePipeline`. No changes are required in existing code. Just put `model_id` of your model and the pipeline should work. Sinks suited for detection-only models were adjusted to ignore non-compliant formats of predictions and produce warnings notifying about incompatibility.

🔨 Fixed
* Bug in `yolact` model in https://github.com/roboflow/inference/pull/266

🏆 Contributors
paulguerrie (Paul Guerrie), probicheaux (Peter Robicheaux), PawelPeczek-Roboflow (Paweł Pęczek)


**Full Changelog**: https://github.com/roboflow/inference/compare/v0.9.10...v0.9.11

0.11.0

🚀 Added

🎉 PaliGemma in `inference`! 🎉

You've probably heard about [new PaliGemma model](https://blog.roboflow.com/paligemma-multimodal-vision/), right? We have it supported in new release of `inference` thanks to probicheaux.

To run the model, you need to build and `inference` server your GPU machine using the following commands:
bash
clone the inference repo
git clone https://github.com/roboflow/inference.git

navigate into repository root
cd inference

build inference server with PaliGemma dependencies
docker build -t roboflow/roboflow-inference-server-paligemma -f docker/dockerfiles/Dockerfile.paligemma .

run server
docker run -p 9001:9001 roboflow/roboflow-inference-server-paligemma


<details>
<summary>👉 To prompt the model visit our <a href="https://github.com/roboflow/inference/blob/main/examples/paligemma/paligemma_client.py">examples 📖 <a/> or use the following code snippet:</summary>

python
import base64
import requests
import os

PORT = 9001
API_KEY = os.environ["ROBOFLOW_API_KEY"]
IMAGE_PATH = "<PATH-TO-YOUR>/image.jpg"

def encode_bas64(image_path: str):
with open(image_path, "rb") as image:
x = image.read()
image_string = base64.b64encode(x)
return image_string.decode("ascii")

def do_gemma_request(image_path: str, prompt: str):
infer_payload = {
"image": {
"type": "base64",
"value": encode_bas64(image_path),
},
"api_key": API_KEY,
"prompt": prompt
}
response = requests.post(
f'http://localhost:{PORT}/llm/paligemma',
json=infer_payload,
)
return response.json()


print(do_gemma_request(
image_path=IMAGE_PATH,
prompt="Describe the image"
))


</details>

🌱 Changed
* documentations updates:
* document source_id parameter of VideoFrame by sberan in https://github.com/roboflow/inference/pull/395
* fix workflows specification URL and other docs updates by SolomonLake in https://github.com/roboflow/inference/pull/398
* add link to Roboflow licensing by capjamesg in https://github.com/roboflow/inference/pull/403

🔨 Fixed
* Bug introduced into `InferencePipeline.init_with_workflow(...)` in `v0.10.0` causing import errors yielding misleading error message informing about broken dependencies:

inference.core.exceptions.CannotInitialiseModelError: Could not initialise workflow processing due to lack of dependencies required. Please provide an issue report under https://github.com/roboflow/inference/issues

Fixed with this PR https://github.com/roboflow/inference/pull/407


**Full Changelog**: https://github.com/roboflow/inference/compare/v0.10.0...v0.11.0

0.10.0

🚀 Added

🎊 Core modules of `workflows` are `Apache-2.0` now

We're excited to announce that the core of `workflows` is now open-source under the Apache-2.0 license! We invite the community to explore the `workflows` ecosystem and contribute to its growth. We have plenty of ideas for improvements and would love to hear your feedback.

Feel free to check out our [examples](https://github.com/roboflow/inference/blob/main/examples/notebooks/workflows.ipynb) and [docs 📖 ](https://inference.roboflow.com/workflows/about/).

🏗️ Roboflow `workflows` are changing before our eyes

We've undergone a major refactor of the `workflows` Execution Engine to make it more robust:
* `blocks` can now be stand-alone modules - what makes them separated from Execution Engine
* `bocks` now expose OpenAPI manifests for automatic parsing and validation
* custom `plugins` with `blocks` can be created, installed via pip, and integrated with our core library `blocks`.

Thanks to SkalskiP and stellasphere we've made the documentation much better. Relying on new blocks self-describing capabilities we can now automatically generate `workflows` docs - you can now see exactly how to connect different blocks and how JSON definitions should look like.

![image](https://github.com/roboflow/inference/assets/146137186/aa4ff885-189d-4a34-9860-6112d0d425cc)

**Visit our [docs 📖 ](https://inference.roboflow.com/workflows/about/) to discover more**

❗ There are minor breaking changes in manifests of some steps (`DetectionsFilter`, `DetectionsConsensus`, `ActiveLearningDataCollector`) as we needed to fix shortcuts made in initial version. Migration would require plugging output of another `step` into fields `image_metadata`, `prediction_type` of mentioned blocks.

🔧 `inference --version`

Thanks to Griffin-Sullivan we have now a new command in `inference-cli` available to show details on what version of `inference*` packages are installed.

bash
inference --version


🌱 Changed
* Huge general docs upgrade by LinasKo (https://github.com/roboflow/inference/pull/385, https://github.com/roboflow/inference/pull/378, https://github.com/roboflow/inference/pull/372) fixing broken links, general structure and aliases for keypoints coco-models

🔨 Fixed
* Inconsistency in builds due to release of `fastapi` package by grzegorz-roboflow https://github.com/roboflow/inference/pull/374
* Middleware error in `inference server` - making every response not getting `HTTP 2xx` into `HTTP 500` 😢 - introduced in [v0.9.23](https://github.com/roboflow/inference/releases/tag/v0.9.23) - thanks probicheaux for taking the effort to fix it
* bug that was present in post-processing of all `instance-segmentation` models making batch inference faulty when some image yields zero predictions - huge kudos to grzegorz-roboflow for spotting the problem and [fixing it](https://github.com/roboflow/inference/pull/387).

🏅 New Contributors
* Griffin-Sullivan made their first contribution in https://github.com/roboflow/inference/pull/339

**Full Changelog**: https://github.com/roboflow/inference/compare/v0.9.23...v0.10.0

0.9.23

What's Changed
* Improve benchmark output; fix exception handling by grzegorz-roboflow in https://github.com/roboflow/inference/pull/354
* Minor docs update, API key in InferenceHTTPClient by LinasKo in https://github.com/roboflow/inference/pull/357
* Add api key fallback for model monitoring by hansent in https://github.com/roboflow/inference/pull/366
* Downgrade transformers to avoid faulty release of that package by PawelPeczek-Roboflow in https://github.com/roboflow/inference/pull/363
* Upped skypilot version by bigbitbus in https://github.com/roboflow/inference/pull/367
* Lock Grounding DINO package version to 0.2.0 by skylargivens in https://github.com/roboflow/inference/pull/368

New Contributors
* LinasKo made their first contribution in https://github.com/roboflow/inference/pull/357

**Full Changelog**: https://github.com/roboflow/inference/compare/v0.9.22...v0.9.23

0.9.22

What's Changed
* Add new endpoints for workflows and prepare for future deprecation by PawelPeczek-Roboflow in https://github.com/roboflow/inference/pull/336
* Update description for workflows steps by grzegorz-roboflow in https://github.com/roboflow/inference/pull/345
* Add error status code to benchmark output by grzegorz-roboflow in https://github.com/roboflow/inference/pull/351
* Add more test cases to cover tests/inference/unit_tests/core/utils/test_postprocess.py::post_process_polygons by grzegorz-roboflow in https://github.com/roboflow/inference/pull/352
* Inference TensorRT execution provider container revival by probicheaux in https://github.com/roboflow/inference/pull/347
* Bugfix for gaze detection (batch request) by PacificDou in https://github.com/roboflow/inference/pull/358
* Allow alternate video sources by sberan in https://github.com/roboflow/inference/pull/348
* Skip encode image as jpeg if no-resize is specified by PacificDou in https://github.com/roboflow/inference/pull/359

New Contributors
* grzegorz-roboflow made their first contribution in https://github.com/roboflow/inference/pull/345

**Full Changelog**: https://github.com/roboflow/inference/compare/v0.9.20...v0.9.22

0.9.20

What's Changed
* Bump version for pypi wheels

**Full Changelog**: https://github.com/roboflow/inference/compare/v0.9.19...v0.9.20

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.