Inference

Latest version: v0.9.23

Safety actively analyzes 623383 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.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

0.9.19

GroundingDINO bugfixes and enhancements!

Allows users to pass custom box_threshold and text_threshold params to Grounding DINO core model.
Update docs to reflect box_threshold and text_threshold params.
Fixes error by filtering out detections where text similarity is lower than text_threshold and Grounding DINO returns None for class ID.
Fixes images passed to Grounding DINO model being loaded as RBG instead of BGR.
Adds NMS to Grounding DINO, optionally using class agnostic NMS via CLASS_AGNOSTIC_NMS env var.

Try it out:

from inference.models.grounding_dino import GroundingDINO

model = GroundingDINO(api_key="")

results = model.infer(
{
"image": {
"type": "url",
"value": "https://media.roboflow.com/fruit.png",
},
"text": ["apple"],

Optional params
"box_threshold": 0.5
"text_threshold": 0.5
}
)

print(results.json())


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

0.9.18

🚀 Added

🎥 🎥 Multiple video sources 🤝 `InferencePipeline`
Previous versions of the `InferencePipeline` could only support a single video source. However, from now on, you can pass multiple videos into a single pipeline and have all of them processed! Here is a demo:

<video src="https://github.com/roboflow/inference/assets/146137186/0cf8338a-7fe4-4e07-83c4-600abbeb7c10"></video>

Here's how to achieve the result:

python
from inference import InferencePipeline
from inference.core.interfaces.stream.sinks import render_boxes

pipeline = InferencePipeline.init(
video_reference=["your_video.mp4", "your_other_ideo.mp4"],
model_id="yolov8n-640",
on_prediction=render_boxes,
)
pipeline.start()
pipeline.join()


There were a lot of internal changes made, but the majority of users should not experience any breaking changes. Please visit our [📖 documentation](https://inference.roboflow.com/using_inference/inference_pipeline/) to discover all the differences. If you are affected by the changes we needed to introduce, here is the [🔧 migration guide](https://inference.roboflow.com/using_inference/inference_pipeline/#migrate-to-changes-introduced-in-v0918).

Barcode detector in `workflows`
Thanks to chandlersupple, we have ability to detect and read barcodes in `workflows`.
<p align="center">
<img src="https://github.com/roboflow/inference/assets/146137186/5b9d2374-f90b-4c08-9b03-8b7b4f0b4ff4" width=480 />
</p>

Visit our [📖 documentation](https://inference.roboflow.com/workflows/detect_barcodes/) to see how to bring this step into your workflow.

🌱 Changed

Easier data collection in `inference` 🔥

We've introduced a new parameter handled by the `inference` server (including hosted `inference` at Roboflow platform). This parameter, called `active_learning_target_dataset`, can now be added to requests to specify the Roboflow project where collected data should be stored.

Thanks to this change, you can now collect datasets while using [Universe](https://universe.roboflow.com/) models. We've also updated [Active Learning 📖 docs](https://inference.roboflow.com/enterprise/active-learning/active_learning/)

python
from inference_sdk import InferenceHTTPClient, InferenceConfiguration

prepare and set configuration
configuration = InferenceConfiguration(
active_learning_target_dataset="my_dataset",
)
client = InferenceHTTPClient(
api_url="https://detect.roboflow.com",
api_key="<YOUR_ROBOFLOW_API_KEY>",
).configure(configuration)

run normal request and have your data sampled 🤯
client.infer(
"./path_to/your_image.jpg",
model_id="yolov8n-640",
)


Other changes
* Add `inference_id` to batches created by AL by robiscoding in https://github.com/roboflow/inference/pull/319
* Improvements in 📖 documentation regarding `RGB vs BGR` topic by probicheaux in https://github.com/roboflow/inference/pull/330


🔨 Fixed
Thanks to contribution of hvaria 🏅 we have two problems solved:
* Ensure Graceful Interruption of Benchmark Process - Fixing for Bug 313: in https://github.com/roboflow/inference/pull/325
* Better error handling in inference CLI: in https://github.com/roboflow/inference/pull/328

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

**Full Changelog**: https://github.com/roboflow/inference/compare/v0.9.17...v0.9.18

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.