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

Can we use opencv-headless? #104

Open
thompson318 opened this issue Jan 12, 2022 · 9 comments
Open

Can we use opencv-headless? #104

thompson318 opened this issue Jan 12, 2022 · 9 comments

Comments

@thompson318
Copy link
Collaborator

No description provided.

@thompson318
Copy link
Collaborator Author

Not using headless leads to some Qt binaries being included in the build, which can mess things up when we include in something using PySide etc. Like this, opencv/opencv-python#46

@thompson318
Copy link
Collaborator Author

@tdowrick @MattClarkson I'm looking at using opencv-contrib-python-headless here to try and avoid downstream library conflicts with PySide2 (and just to simplify dependencies in general). This would break anything here with a GUI, namely sksurgeryimage/display/identify_cameras.py and sksurgeryimage/ui/ImageCropper.py. However neither of them appear to be integral to sksurgeryimage, they just seem to be useful utilities. If we want to keep them we could just move them to a separate library that has a GUI. Do either of you have an opinion on this?

thompson318 added a commit that referenced this issue Jan 12, 2022
@tdowrick
Copy link
Contributor

I don't think either of those two are used anymore, or can be moved if needed, so I think you can go ahead and make the change.

thompson318 added a commit that referenced this issue Jan 12, 2022
thompson318 added a commit that referenced this issue Jan 12, 2022
@MattClarkson
Copy link
Contributor

@thompson318 - turns out these things are referenced in BARD. Can we re-open? The question is also which packaged need updating, as some have a requirements.txt that explicitly names opencv-python-contrib as well, so you'd get both.

@tdowrick
Copy link
Contributor

Where in bard is this used? I tried to find it but couldn't see the import statement.

@thompson318 thompson318 reopened this Feb 10, 2022
@thompson318
Copy link
Collaborator Author

I've repopened it for now. I don't think it's used directly by BARD, but maybe in the tutorial instructions. My preference would be to update the tutorial instructions and try and use opencv-headless wherever possible.

@thompson318
Copy link
Collaborator Author

I can't find any reference to ImageCropper in BARD or MPHY0026

@mxochicale
Copy link

I am having a conflict using opencv-contrib-python-headless>=4.7.0.72 for https://github.com/SciKit-Surgery/scikit-surgeryutils:

The conflict is caused by:
    The user requested opencv-contrib-python-headless>=4.7.0.72
    scikit-surgeryvtk 2.0.0 depends on opencv-contrib-python-headless>=4.7.0.72
    scikit-surgeryimage 0.10.1 depends on opencv-contrib-python-headless>=4.2.0.32
    scikit-surgeryarucotracker 0.2.8 depends on opencv-contrib-python-headless<4.7

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
REFERENCE: https://github.com/SciKit-Surgery/scikit-surgeryutils/actions/runs/5253786647/jobs/9491551217

@thompson318, can we go for a scikit-surgeryimage new release v0.11.0, fixing opencv-contrib-python-headless version?

@thompson318
Copy link
Collaborator Author

I don't understand why pip is choosing arucotracker 0.2.8. I can see it doing it here:
https://github.com/SciKit-Surgery/scikit-surgeryutils/actions/runs/5253786647/jobs/9491551217#step:5:159
but I don't get where the requirement is coming from. If we can fix that so it uses an up to date version of aruco tracker then it should fix the conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants