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

Input images with more than 3 channels. #401

Closed
NDKoehler opened this issue Oct 26, 2015 · 9 comments
Closed

Input images with more than 3 channels. #401

NDKoehler opened this issue Oct 26, 2015 · 9 comments

Comments

@NDKoehler
Copy link

Is there a possibility to concatenate mutliple 3 channel images to a set of 9 channel input images while still using dynamic image augmentation (and if possible recordios)?

gz.

@piiswrong
Copy link
Contributor

I believe you can create 3 data sets and use concat symbol.

@NDKoehler
Copy link
Author

I also thought about this possibility, but the model.fit() routine just takes on dataiter as input. I guess its not possible atm.

@antinucleon
Copy link
Contributor

When we design the model we want to cover a general need but not long tail,
so I think there are some possible solution.

  1. if dataset is not large, use numpy iterator
  2. use low level symbolic api
  3. write a new iterator (in Python)

You may find this notebook of low level API is useful:
https://github.com/dmlc/mxnet/blob/master/example/notebooks/simple_bind.ipynb
if you want to do 1 or 2

On Thu, Oct 29, 2015 at 03:19 Liquidburner [email protected] wrote:

I also thought about this possibility, but the model.fit() routine just
takes on dataiter as input. I guess its not possible atm.


Reply to this email directly or view it on GitHub
#401 (comment).

@pluskid pluskid closed this as completed Oct 29, 2015
@pluskid pluskid reopened this Oct 29, 2015
@pluskid
Copy link
Contributor

pluskid commented Oct 29, 2015

I would like to advocate the Julia binding's current way of handling data and label here.

  • the user name the output of data iter, and the name should match some input in the network symbol
  • the model.py assumes all the provided name by the user's data iter is input (either data or label or both)

so there is no need to rely on the name having a _data postfix and supporting multiple input will be straightforward. The current feed forward model then should be able to handle pretty general case like the three input data stream here or auto encoder where data itself is just labels.

I could try to port this to the python side later if needed.

(Sorry was on my phone and accidentally closed the issue...)

@tqchen
Copy link
Member

tqchen commented Oct 29, 2015

@pluskid Your proposal seems general enough to be used in cases such as multiple inputs and etc. This is definitely an interesting direction we should go

@pluskid
Copy link
Contributor

pluskid commented Oct 29, 2015

OK, I'm currently doing some refactoring to simplify the Julia side IO interface. I will try to push changes for the the Python side maybe next week if nobody has come up with a better idea by then. But feel free to comment if there is any caveat about that choice that I might missed @tqchen @antinucleon

@NDKoehler
Copy link
Author

Thanks for your answers. Multi image stream support for the python interface would be great, since many problems (especially medical ones) consist of many different views of the same object. The Julia side already supports multiple input images streams? @pluskid

@pluskid
Copy link
Contributor

pluskid commented Oct 31, 2015

It supports slightly more general notion of inputs to a network. So for example multiple inputs could be feeder into a network. But since the underlying imageio is the same, I guess you will still have to create three streams of images each with 3 channels.

@tqchen
Copy link
Member

tqchen commented Nov 21, 2015

now that both julia and python data interface should support multiple input data, please feel free to reopen this or open a new issue if there is any questions

@tqchen tqchen closed this as completed Nov 21, 2015
iblislin added a commit to iblislin/incubator-mxnet that referenced this issue Mar 18, 2018
* `+`
* `-`
* `*`
* `/`
* `%`
* `^`

```julia
julia> x = NDArray([1 2 3;
                    4 5 6])
2×3 mx.NDArray{Int64,2} @ CPU0:
 1  2  3
 4  5  6

julia> y = NDArray([1;
                    10])
2-element mx.NDArray{Int64,1} @ CPU0:
  1
 10

julia> x .+ y
2×3 mx.NDArray{Int64,2} @ CPU0:
  2   3   4
 14  15  16
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants