make dep onnxruntime optional? #1342
hubutui
started this conversation in
Ideas / Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
onnxruntime is introduce since #1262 for SAM support.
We need to modify
labelme/labelme/ai/models/segment_anything.py
Line 6 in 67e489b
We could use
try catch
here. If onnxruntime is not available, then SAM is not available, but other function should still work.Of course, we still need to change other codes, for example, we need to disable "Create AI-Polygon" menu item if onnxruntime is not found. I'm not sure how to do this yet.
Beta Was this translation helpful? Give feedback.
All reactions