# How to Load images in either Knet or MXNet

**URL:** https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677
**Category:** Machine Learning
**Created:** [July 27, 2018, 2:20am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677 "2018-07-27T02:20:20Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hskramer](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@hskramer](https://discourse.julialang.org/u/hskramer)
#### Post date: [July 27, 2018, 2:20am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/1 "2018-07-27T02:20:20Z")

</div>

My images are from google street views 74K. I read and gone through every tutorial still can’t load an image. They are 50x50 rgb jpg images  
any help would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [July 27, 2018, 3:18am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/2 "2018-07-27T03:18:26Z")

</div>

I think you’re looking for [https://github.com/JuliaIO/FileIO.jl](https://github.com/JuliaIO/FileIO.jl) and [GitHub - JuliaIO/ImageMagick.jl: Thin Wrapper for the library ImageMagick](https://github.com/JuliaIO/ImageMagick.jl)

Read the readme for both, I found the FileIO system a little confusing as well.

But basically install them both and run:

```julia
using FileIO
img = load(filename)

```

Edit: unless I misunderstood and you’re loading particularly large images or something specific? what units did you mean with 50 x 50 ?

---

<div class="post-metadata">

### Author: ![hskramer](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@hskramer](https://discourse.julialang.org/u/hskramer)
#### Post date: [July 27, 2018, 3:22am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/3 "2018-07-27T03:22:26Z")

</div>

pixels

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [July 27, 2018, 3:22am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/4 "2018-07-27T03:22:53Z")

</div>

Well you should be fine then 🙂

---

<div class="post-metadata">

### Author: ![hskramer](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@hskramer](https://discourse.julialang.org/u/hskramer)
#### Post date: [July 27, 2018, 3:23am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/5 "2018-07-27T03:23:31Z")

</div>

OK ,  
Thank You

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [July 27, 2018, 3:25am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/6 "2018-07-27T03:25:19Z")

</div>

If that works for you, you can mark it as the solution.

---

<div class="post-metadata">

### Author: ![hskramer](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@hskramer](https://discourse.julialang.org/u/hskramer)
#### Post date: [July 27, 2018, 3:28am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677/7 "2018-07-27T03:28:48Z")

</div>

I will give it a try and see how it goes looks like it should work.
