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

[QST] Installing cucim with pip under python in SideFX Houdini #559

Closed
Faitel opened this issue May 5, 2023 · 5 comments
Closed

[QST] Installing cucim with pip under python in SideFX Houdini #559

Faitel opened this issue May 5, 2023 · 5 comments
Labels
question Further information is requested

Comments

@Faitel
Copy link

Faitel commented May 5, 2023

Hello, I'd love to install cucim with python pip within Houdini 3D software on Windows 11, but I am getting the following error:
ERROR: Could not find a version that satisfies the requirement cucim (from versions: none)
ERROR: No matching distribution found for cucim
I have successfully installed cupy-cuda11x 12.0.0 for cuda 11.8 and used Cupy and Cupyx Scipy in code, which can be seen in the short video. Skimage CPU also works, but I'd like to accelerate it with CUDA to provide robust open-source image manipulation tools for Houdini users.
I'll appreciate any help, thank you.
pip list:
Package Version
accelerate 0.18.0
aiohttp 3.8.4
aiosignal 1.3.1
antlr4-python3-runtime 4.9.3
anyio 3.6.2
asn1crypto 0.24.0
async-timeout 4.0.2
asyncer 0.0.2
attrs 23.1.0
bcrypt 3.1.7
certifi 2022.12.7
cffi 1.12.3
chardet 3.0.4
charset-normalizer 3.1.0
click 7.1.2
clip-interrogator 0.6.0
colorama 0.4.6
coloredlogs 15.0.1
contourpy 1.0.7
controlnet-aux 0.0.3
cryptography 2.7
cupy-cuda11x 12.0.0
cycler 0.11.0
demjson 2.2.4
diffusers 0.16.1
ecdsa 0.13
einops 0.6.1
fastapi 0.95.1
fastrlock 0.8.1
filelock 3.12.0
filetype 1.2.0
Flask 1.0.3
Flask-Script 2.0.6
flatbuffers 23.3.3
fonttools 4.39.3
frozenlist 1.3.3
fsspec 2023.4.0
ftfy 6.1.1
furl 2.1.0
future 0.18.2
Genshi 0.7.3
h11 0.14.0
huggingface-hub 0.14.1
humanfriendly 10.0
idna 3.4
ImageHash 4.3.1
imageio 2.28.1
importlib-metadata 6.6.0
importlib-resources 5.12.0
itsdangerous 0.24
Jinja2 2.10.1
joblib 1.2.0
kiwisolver 1.4.4
llvmlite 0.40.0
lxml 4.7.1
Mako 1.2.0
MarkupSafe 0.23
matplotlib 3.7.1
mercantile 1.2.1
mpmath 1.3.0
multidict 6.0.4
networkx 3.1
nltk 3.8.1
nose 1.3.7
numba 0.57.0
numpy 1.24.0
omegaconf 2.3.0
onnxruntime 1.14.1
open-clip-torch 2.18.0
openai 0.27.6
opencv-contrib-python 4.7.0.72
opencv-python 4.7.0.72
opencv-python-headless 4.7.0.72
orderedmultidict 1.0.1
packaging 23.1
paramiko 2.6.0
Pillow 9.5.0
pip 23.1.2
platformdirs 3.5.0
plumbum 1.6.7
pooch 1.7.0
protobuf 3.20.3
psutil 5.9.5
pycparser 2.12
pycrypto 2.6.1
pycurl 7.43.0.3
pydantic 1.10.7
Pygments 2.4.2
PyMatting 1.1.8
PyNaCl 1.3.0
PyOpenGL 3.1.1a1
pyparsing 3.0.9
pyreadline3 3.4.1
python-dateutil 2.8.2
lz4 3.1.0
python-multipart 0.0.6
pytz 2019.3
PyWavelets 1.4.1
PyYAML 6.0
regex 2023.5.5
rembg 2.0.35
requests 2.29.0
rpyc 4.1.0
safetensors 0.3.1
scikit-image 0.19.3
scikit-learn 1.2.2
scipy 1.10.1
sentence-transformers 2.2.2
sentencepiece 0.1.99
setuptools 67.7.2
simplejson 3.16.0
six 1.16.0
sniffio 1.3.0
starlette 0.26.1
sympy 1.11.1
threadpoolctl 3.1.0
tifffile 2023.4.12
timm 0.6.13
tokenizers 0.13.3
torch 2.0.0+cu118
torchaudio 2.0.1+cu118
torchmetrics 0.11.4
torchvision 0.15.1+cu118
tqdm 4.65.0
transformers 4.28.1
typing_extensions 4.5.0
urllib3 1.26.15
uvicorn 0.22.0
watchdog 3.0.0
wcwidth 0.2.6
Werkzeug 2.0.3
wheel 0.40.0
Whoosh 3.0.0
yarl 1.9.2
zipp 3.15.0

@Faitel Faitel added the question Further information is requested label May 5, 2023
@gigony
Copy link
Contributor

gigony commented May 16, 2023

Hi @Faitel,

Apologies for the delay in responding to your query. Your application of CuPy/cuCIM within Houdini appears quite impressive!

Although we do not yet officially support the Windows Python package, you can refer to the link below to install the Image processing component (utilizing CuPy) of cuCIM.

Please use the following command to accomplish this:

pip install -e "git+https://github.com/rapidsai/[email protected]#egg=cucim&subdirectory=python/cucim" scipy scikit-image

Thanks!

@Faitel
Copy link
Author

Faitel commented May 17, 2023

Thank you very much @gigony, cucim works like a charm!

Maybe except the Piecewise Affine Transform example

tform = PiecewiseAffineTransform()
tform.estimate(src, dst)

but it seems this is not related to gpu or cpu computations and the code is slow by itself.

Have you ever had any problems with the Piecewise Affine Transforms performance?

@jakirkham
Copy link
Member

Maybe that should go in a new issue with a minimal example?

@gigony
Copy link
Contributor

gigony commented May 18, 2023

Hi @Faitel ,
Good to hear that it is working!

Looks like the symptom is related to this link:

From @grlee77 (#208 (comment)),

Can you provide some context of the sizes of the src and dst arrays that are being used with the estimate method in your application? I did not spend much time thinking about this _geometry.py module on the cuCIM side and it is probably one area where we are unlikely to get a benefit over staying on the CPU given the small sizes of the affine matrices. PiecewiseAffineTransform has a particular difficulty in that it relies on methods from scipy.spatial.Delaunay that do not have a corresponding GPU implementation in CuPy, requiring us to transfer to/from the host in multiple places!

For that reason this _geometry.py is possibly the only place in cuCIM where the classes accept both NumPy or CuPy arrays as inputs. Most of the rest of the library only allows CuPy arrays. This is probably something we should discuss further to decide on the desired behavior long term.

Could you please create a new issue with a minimal example so we can track the issue?

@jakirkham
Copy link
Member

Have you ever had any problems with the Piecewise Affine Transforms performance?

This is now being tracked in issue: #698

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

No branches or pull requests

3 participants