GithubHelp home page GithubHelp logo

Comments (2)

PawelPeczek-Roboflow avatar PawelPeczek-Roboflow commented on May 22, 2024

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 no cv2.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
  • 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 with inference) which is only used there due to read_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.

hvaria avatar hvaria commented on May 22, 2024

I fully agree with your analysis and the outlined approach to navigate these complexities.

from inference.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.