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

resize diff between java djl and python cv2 #3222

Open
GuoQuanhao opened this issue May 29, 2024 · 1 comment
Open

resize diff between java djl and python cv2 #3222

GuoQuanhao opened this issue May 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@GuoQuanhao
Copy link

Does NDImageUtils.resize has the same result with cv2.resize? They all use bilinear by default. I got some diff between NDImageUtils.resize and cv2.resize

@GuoQuanhao GuoQuanhao added the bug Something isn't working label May 29, 2024
@frankfliu
Copy link
Contributor

They are not the same. If you want to get the same result you should resize the Image object instead of resize NDArray use OpenCVImageFactory class

See this example: https://github.com/deepjavalibrary/djl/blob/master/examples/src/main/java/ai/djl/examples/inference/cv/SemanticSegmentation.java#L89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants