Motion Clouds: Synthesis of random textures for motion perception (Leon et al. 2012)

 Download zip file 
Help downloading and running models
Accession:146953
We describe a framework to generate random texture movies with controlled information content. In particular, these stimuli can be made closer to naturalistic textures compared to usual stimuli such as gratings and random-dot kinetograms. We simplified the definition to parametrically define these "Motion Clouds" around the most prevalent feature axis (mean and bandwith): direction, spatial frequency, orientation.
Reference:
1 . Leon PS, Vanzetta I, Masson GS, Perrinet LU (2012) Motion clouds: model-based stimulus synthesis of natural-like random textures for the study of motion perception. J Neurophysiol 107:3217-26 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Connectionist Network;
Brain Region(s)/Organism:
Cell Type(s):
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: Python;
Model Concept(s): Pattern Recognition; Temporal Pattern Generation; Spatio-temporal Activity Patterns; Parameter Fitting; Methods; Perceptual Categories; Noise Sensitivity; Envelope synthesis; Sensory processing; Motion Detection;
Implementer(s):
#!/usr/bin/env python
"""
A smooth transition while changing parameters

(c) Laurent Perrinet - INT/CNRS

"""

import MotionClouds as mc
import numpy as np

name = 'smooth'
play = False #True

#initialize
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
color = mc.envelope_color(fx, fy, ft)

name_ = mc.figpath + name

seed = 123456
B_sf_ = [0.025, 0.05, 0.1, 0.2, 0.4, 0.2, 0.1, 0.05]
im = np.empty(shape=(mc.N_X, mc.N_Y, 0))
name_ = mc.figpath + name + '-B_sf'
if mc.anim_exist(name_):
    for i_sf, B_sf in enumerate(B_sf_):
        im_new = mc.random_cloud(color * mc.envelope_gabor(fx, fy, ft, B_sf=B_sf), seed=seed)
        im = np.concatenate((im, im_new), axis=-1)

    if not(play): mc.anim_save(mc.rectif(im), name_)
    # mplayer figures/smooth-B_sf.mpg -fs -loop 0

name_ += '_smooth'
if mc.anim_exist(name_):
    smooth = (ft - ft.min())/(ft.max() - ft.min()) # smoothly progress from 0. to 1.
    N = len(B_sf_)
    im =  np.empty(shape=(mc.N_X, mc.N_Y, 0))
    for i_sf, B_sf in enumerate(B_sf_):
        im_old = mc.random_cloud(color * mc.envelope_gabor(fx, fy, ft, B_sf=B_sf), seed=seed)
        im_new = mc.random_cloud(color * mc.envelope_gabor(fx, fy, ft, B_sf=B_sf_[(i_sf+1) % N]), seed=seed)
        im = np.concatenate((im, (1.-smooth)*im_old+smooth*im_new), axis=-1)

    if play:
        mc.play(mc.rectif(im))
    else:
        mc.anim_save(mc.rectif(im), name_)
    #    mplayer figures/smooth-B_sf_smooth.mpg -fs -loop 0

Loading data, please wait...