Can dnn model made under Python be used under JAVA [closed]
I am a new to OpenCV and would like to develop using Python, but the people I support use Java. We are wondering if models created under one programming language be used under another.
Yes this should be possible. Open cv can read and evaluate several models. The way the models were created (python, c++, assembler, texteditor) plays no role here - it just has to be a valid model from opencv point of view.
As always - there are exception. For example in tensorflow your python code IS the model (hello missing abstraction), so if you have any custom cost functions for example - it can be that you cannot read it in open cv.
For reasons given above and also for performance reasons i tend to use the native solution(tensorflow, torch, yolo).
the short answer would be: if you can use it with cv2.dnn from python, it will be no problem in java.
you would have to write some things diffferently in java though, so it would help to know your specific use-case.