NRP Visualization (Spike Monitor Setup)


#1

Hey,

i have a camera image that is translated into an input layer, which in turn results in an output layer, so quite a normal approach. The problem comes with the visualization inside of the NRP. I can either get the correct visualization for the input layer (sensors) or output layer (motors), but not both. To clarify, consider the following screenshots:

In the first screenshot, the SpikeMonitor is set to sensors which results in the correct visualization for that layer, but the output layer is wrong:

In this screenshot the SpikeMonitor is set to motors, which results in correct vis. of the output layer but (compare to the picture above) the input layer is wrong:

In a final try i set up circuit = sensors + motors in the brain model, and set the SpikeMonitor to that, which does not work either:

Any advice what is going wrong here?

On a different subject, is there any way to build a custom visualization inside the NRP (aside from flat, cube, sphere…)?

Thanks in advance,
Ben


#2

hey,
this is closely related to my problem, and as it is already fixed, what is currently the best way to do it?

https://bitbucket.org/hbpneurorobotics/neurorobotics-platform/issues/3/recording-multiple-population

Regards,
Ben


#3

Hello Ben,

Regarding: “On a different subject, is there any way to build a custom visualization inside the NRP (aside from flat, cube, sphere…)?”

It is possible to use a .json file where you can specify the XYZ coordinates of your neurons in the brainvisualizer. The .json file should be in your experiment folder and it should be linked to the exc file this way:

<configuration type="brainvisualizer" src="MYFILE.json"/>

The JSON can be formatted this way:

{“positions”: [[x,y,z] , …, …]}

Where each position corresponds to the index of a neuron.

You can also specify colors:

“colors”: [[R, G, B], …, …]

If you need, it is also possible to specify the position per population (instead of the previous absolute mode):

{“populations”:{“MY POPULATION NAME”:{“positions”:[ [x,y,z], … ]} }

Best,
Yves.


#4

Hey Yves,

thanks for the info, i set it up as you said, but in the brainvisualizer i just get “initializing” and nothing happens. Any ideas?

And, is there someone who can advise on how to tackle the other problem?

Regards,
Ben


#5

Any updates on the specified problems?

And @yschmid, as already stated, either i am missing something, or there is a problem with the json approach to define a custom brainvisualizer.
Is it possible to specify a custom visualization for just one population, while the others stay the way they are by default, or do i have to specify it for every population even though i just want to change one?

Thanks in advance,
Ben


#6

Hello,

I am actually having a similar issue when I try to custom the brain visualizer display. May be we can combine our efforts to solve the problem. What I set in my $HBP/Experiments/myExperiment/ folder is the following:

  1. I define several populations in my brain file, located in $HBP/Models/brain_model/myBrainModel.py —> see here
  2. I have a transfer function that monitors all the spikes (may be that’s what you are missing). For some reason, I just need to say I want to monitor one (any) of the population I defined in the brain file to make it work —> see here
  3. I wrote some code to read my brain file and generate [x,y,z] indexes for every neuron in every population I use in my brain file —> see here (in a normal situation, this file is huge)
  4. I tell where the neuron positions are defined, in the .exc file —> see here

However, although the brain visualizer works with classic displays (sphere, cube, etc.), I don’t see any custom view option when I run my experiment.

Any idea anyone?

Thanks!
I hope this can trigger some progress towards the original poster’s question.

Best,
Alban


#7

@yschmid any hints on this issue???


#8

Since the brain file is using absolute indexes and that a neuron can be linked to several populations, you have to be sure that all your population list contains a complete list of all neurons (set position to 0,0,0 if it is not used by a population).

For instance, if you have 3 neurons in total, and two populations, each population should contain 3 positions.

Please note that unless you have neurons shared by several populations, you can just use the simple mode without population:

{“positions”: [[x,y,z] , …, …]}

I agree that it is a bit difficult to debug. Adding at least some clear error messages would be helpful. I’d add this to the backlog.


#9

Another useful feature would an import / export file from the UI of the brainviz. The export would prepare the file for you and you’d just have to update the content with your stuff and re-import it. I think it would be very helpful.


#10

Yeah, that would actually be quite nice… especially when you have a lot of layers or just a lot of neurons in general


#11

I just want to leave a comment here for anyone else who stumbles across this:

If you add that JSON configuration as mentioned above to your exc file, make sure the configuration tag is next to any other configuration tag in the file, or else your experiment will crash with a long error, the end of which is:

raise pyxb.UnrecognizedContentError(self, self.__automatonConfiguration, value, location)
UnrecognizedContentError: Invalid content {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}configuration at <unknown>[15:4] (expect {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}experimentControl or {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}experimentEvaluation or {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}cameraPose or {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}rosLaunch or {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}rngSeed or {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}physicsEngine or {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}gzbridgesettings)

See also the ExD description of Element configuration.