Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Clojure][Scala] Converting an ndarray to a BufferedImage is really slow #15123

Closed
Chouffe opened this issue Jun 1, 2019 · 4 comments · Fixed by #16219
Closed

[Clojure][Scala] Converting an ndarray to a BufferedImage is really slow #15123

Chouffe opened this issue Jun 1, 2019 · 4 comments · Fixed by #16219

Comments

@Chouffe
Copy link
Contributor

Chouffe commented Jun 1, 2019

When calling the to-image function from the clojure package which interops with the Scala Image/toImage, it is really slow to create the BufferedImage. Waiting for 4-5 seconds on a 1024x576px image ("Pug_cookie.jpg").

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Scala

@frankfliu
Copy link
Contributor

@mxnet-label-bot add [scala, performance, clojure]

@lanking520
Copy link
Member

Yeah it is kind of slow due to the naïve implementation of https://github.com/apache/incubator-mxnet/blob/master/scala-package/core/src/main/scala/org/apache/mxnet/Image.scala#L174-L192. In a sense of converting them pixel by pixel. You can try to use some third-party library to accelerate them

@Chouffe
Copy link
Contributor Author

Chouffe commented Jun 28, 2019

Would there be a way to batch (per row or column) the actual RGB conversion?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants