You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another suggestion is to not make it a required dependency and start recommending opencv-python-headless as alternative for opencv-python. Much better in docker images.
Dilip-Jain
added a commit
to Dilip-Jain/alibi-detect
that referenced
this issue
Oct 1, 2023
Pull Request #853
Just created a pull request to solve this issue.
Replaced OpenCV's GaussianBlur and filter2D with their counterparts from SciPy.
Substituted OpenCV's affineTransform and warp functions with the corresponding functionalities from scikit-image.
OpenCV is now an optional library with cv2 import dynamically handled within perturbations.py (for future-proofing and people (system/environment) with OpenCV can leverage its functionality too).
PS: I implemented every alternative (known to me) using scipy, scikit-image, custom numpy convolution, etc., and compared the results using Mean Squared Error (MSE) and Structural Similarity Index (SSI). If anyone is interested in those comparisons, let me know I'll put the notebook somewhere online.
opencv
is a fairly heavy dependency and requires building (see recent CI failures), but we only use it in one place for making image perturbations (https://github.com/SeldonIO/alibi-detect/blob/master/alibi_detect/utils/perturbation.py). We should either explore replacing it with another library that's lighter (potentially scikit-image) or make it an optional dependency.The text was updated successfully, but these errors were encountered: