Giter Club home page Giter Club logo

multimodal's Introduction

Multimodal Learning with NMF

A set of tools and experimental scripts used to achieve multimodal learning with nonnegative matrix factorization (NMF).

This repository contains code to reproduce the experiments from the publications:

[Mangin2015]
O. Mangin, D. Filliat, L. ten Bosch, P.Y. Oudeyer, MCA-NMF: Multimodal concept acquisition with non-negative matrix factorization PLOS ONE (October 21, 2015) (bibtex)
[Mangin2013]
O. Mangin, P.Y. Oudeyer, Learning semantic components from sub symbolic multi modal perception Joint IEEE International Conference on Development and Learning and on Epigenetic Robotics (ICDL EpiRob), Osaka (Japan) (2013) (bibtex)

Please consider citing these papers when re-using the code in scientific publications.

Usage

This code is intended to work on its own. It however requires the dependencies mentioned below to be installed and available on the operating system. Please note the following elements.

  • Locations: The file local.py is meant to hold local configuration of paths to data, features, etc. A template is provided in the repository. The paths defined in that file are only used when no path argument is provided to related functions (for examples the dataset loaders, or feature generators).
  • Data: The experimental scripts require data (see below). This data must be accessible from the script and eventually pre-processed. For the motion data, pre-processing can be achieved through multimodal/db/scripts/build_choreo2_features. Alternatively, all features and metadata for the databases can be downloaded by running multimodal/db/scripts/download_dbs. This removes the need to pre-process the choreo2 dataset.
  • Experiments: Just run the experimental script. Be sure to generate the required features. For the moment, the ACORNS Caregiver dataset is not available online, however feature files can be provided on request.

So for a quick hand on, just:

  1. Install dependencies:
pip install numpy scipy matplotlib librosa
  1. Download and install the sources:
git clone http://github.com/omangin/multimodal.git
cd multimodal
python setup.py develop --user
  1. Download databases features and metadata (run from where you downloaded the repository):
./multimodal/db/scripts/download_dbs
  1. Reproduce [Mangin2013]'s experiment:
./multimodal/experiments/icdl2013.py

Source files hierarchy:

Directories

  • db: helpers to load and pre-process data
  • features: helpers to build features
  • lib: general purpose helpers
  • experiments: experimental scripts
  • test: a few unit tests

Main files in multimodal

  • experiment.py This file contains the main logic of the experimental setup. It defines classes to run multimodal experiments in a consistent and simplified manner. These include data preparation, training and evaluation.
  • learner.py Contains a class that abstracts the process of learning from multiple modalities. Contains the learning mechanism based on the NMF algorithm (itself included in lib/nmf.py).
  • evaluation.py Helpers to evaluate learning results.
  • pairing.py Helpers to generate associations of samples from different modalities with same labels.
  • plots.py Plot functions to generate specific figures.

Experimental scripts (in samples)

  • icdl2013.py Runs experiments and generate results corresponding to Mangin2013. Uses Acorns Caregiver database for speech sounds as well as the Choreo2 dataset.
  • image_sound.py Runs experiments similar to Mangin2013 with speech sounds from the Acorns Caregiver database and images from the image database.
  • launcher.py Script to run many experiments with variations of parameters. Requires expjobs and some time or a cluster.
  • image_sound_eval_sliding_windows.py Script to run experiments with speech sound and images in which the learner is evaluated on its recognition sound from small time windows.
  • plot_image_sound_eval_sliding_windows.py Interactive and static plots from the previous experiment.
  • plot_info_matrix.py Script to generate plot of the mutual information between sample labels and internal coefficients. The script re-uses a trained dictionary obtained from launcher.py.
  • two_modalities.py and three_modalities.py run an experiment from a configuration file. Mainly used by launcher.py.

Data

  • Acorns Caregiver is available online. Please refer to the article by Bergmann et al. for permission. However, feature and metadata files can be downloaded through the code (see the download_meta_and_features function in db/acorns.py or use multimodal/db/scripts/download_dbs). See also DOI-Acorns .
  • Choreo1 can be found at flowers.inria.fr/choreo/doc.
  • Choreo2 can be found at flowers.inria.fr/choreo2. See also DOI-Choreo for features.
  • Object images (not publicly available yet). Pictures acquired by Natalia Lyubova and David Filliat as frames from interaction with an iCub robot, through an RGBD sensor (red, green, and blue camera coupled with a depth sensor). Feature and meta files can be downloaded (see the download_meta_and_features function in db/objects.py or use multimodal/db/scripts/download_dbs). See also DOI-Images .

License

This code is distributed under the new BSD license. Please see LICENSE for more details.

Acknowledgement

Requirements

  • python >2.7 or >3
  • numpy
  • scipy
  • librosa (for sound feature computation)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.