Comments (2)
I've taken a look and not found an elegant solution for the problem. The PR opened by @hvaria suggest switch to headless opencv for CLI completely. The problems are the following:
- there are installations where we resolve both cli requirements and core lib requirements - in presence of both, without
libGL.so.1
being provided - even if there is nocv2.imshow(...)
invocation - we have error - which would be the case in @yeldarby example (all libs installed) even with the change - CLI uses visualisation (
inference infer
command) - so we cannot completely eliminate standard OpenCV
We could probably do the following (tradeoffs, pros and cons that I see outlined)
- have headless as a base requirement and have
[desktop]
extras in all libs and install standard cv on clients wish. Drawbacks:- people usually by default would try our lib in GUI-env - and would probably even use
cv.imshow(...)
to visualise, so asking them for additional effort may degenerate developer-experience
- people usually by default would try our lib in GUI-env - and would probably even use
- catching the error would be possible - may be not necessarily elegant, but could work. The core of that problem is not the fact that one cannot install standard CV without GUI - it's rather the fact of additional shared libs being required - so I am leaning towards that approach, if we cannot apply the next option
- it seems that this problem could be completely avoided - and probably that should be done. If you analyse the series of imports leading to this error - you will discover that in
inference_cli.lib.utils
we import opencv through supervision (btw - it's headless by default and drags this into dependencies we install withinference
) which is only used there due toread_yaml_file(...)
util - which can be re-implemented or import could be pushed to another module. In long run - we shall think of developing CLI modules to be more command-oriented - to isolate potential domains of errors
from inference.
I fully agree with your analysis and the outlined approach to navigate these complexities.
from inference.
Related Issues (20)
- LMM workflow step - rename to LLM
- Duplicate Inference with `client.infer_on_stream()` on Windows HOT 1
- Add error status code to benchmark output
- `Docker Getting Started` link in docs returns 404
- Error Running cogvlm model on Self-Hosted GPU Server with Roboflow Inference (Transformer Version) HOT 7
- Can't run inference on AWS Lambda HOT 1
- inference.core.exceptions.ModelArtefactError: Unable to load ONNX session. Cause: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /tmp/cache\chinese-calligraphy-recognition-sl0eb/2\best.onnx failed:Protobuf parsing failed. HOT 6
- Can add, delete, update stream realtime for only one pipeline has been run before? HOT 1
- Run Multiple Models all together. HOT 6
- Failed to install inference package ! Error "AttributeError: module 'pkgutil' has no attribute 'ImpImporter'" HOT 5
- current constellation of dependencies inconsistently breaking installation process HOT 2
- Refactor `inference.core.models.base.Model.infer_from_request` to always return `List[InferenceResponse]`
- Jetson 4.6.1: opset 17 not supported for onnxruntime-gpu 1.11.0 HOT 9
- Workflows block `DetectionOffsetBlock` is not preserving parent coordinates
- If I try to make an inference with a local RTSP, I still need to run API_KEY and server, right? HOT 2
- Need to skip Yoloact inst-seg tests for the parallel GPU inference server HOT 2
- ImportError HOT 1
- CropBlock - ensure parent_id of detection and cropped image match
- Add `image_id` to images metadata
- Is support for Jetpack 4.5.0 still needed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inference.