EOgmaNeo is Ogma Corp's embedded and event based version of OgmaNeo



Join the chat at https://gitter.im/ogmaneo/Lobby


Welcome to the EOgmaNeo library!

EOgmaNeo is Ogma Corp's embedded and event based version of OgmaNeo

It is our primary and preferred implementation of Sparse Predictive Hierarchies, a fully online sequence predictor. This is no longer the case, please use OgmaNeo2.

EOgmaNeo currently runs exclusive on the CPU, unlike OgmaNeo. However, for most tasks, it is much faster. It also performs better in terms of end-result.

EOgmaNeo performs some optimizations not yet present in OgmaNeo, resulting in a massive speed boost. For example, on weaker hardware such as the Raspberry Pi it will run happily at 60FPS with ~10,000,000 synapses.

We used this software to build a small self-contained online-learning self driving model car: Blog post

The advantage of our software over standard Deep Learning techniques is primarily speed. A single Raspberry Pi 3 is enough to run simulations of networks with tens of millions of synapses at high framerates, while Deep Learning is often restricted to offline training on very large and expensive GPUs.

Bindings to Python are also included. The binding API approximately mimics the C++ API. Refer to README.md files in each subdirectory to discover more about each binding, and how to build and use them.


For a more detailed introduction, see OVERVIEW.md

EOgmaNeo is a fully online learning algorithm, so data must be passed in an appropriately streamed fashion.

The simplest usage of the predictive hierarchy involves calling:

    // Compute system
    eogmaneo::ComputeSystem cs(4); // Number of threads to use, e.g. CPU Core count

    eogmaneo::Hierarchy h;

    // Layer descriptors

   // Layer size
   int layerWidth = 
   int layerHeight = 
   int layerColumnSize = 

   for (
   int l = 
   0; l < lds.size(); l++) {
   _width = layerWidth;
   _height = layerHeight;
   _columnSize = layerColumnSize;
   // ...

   // Create the hierarchy
    h.create({ { 
   2 } }, { 
   16 }, { 
   true }, lds, 
   // Input width x height, input column size, whether to predict, layer descriptors, and seed

You can then step the simulation with:

    h.step(cs, sdrs, true); // Input SDRs, learning is enabled

And retrieve predictions with:

    std::vector<int> predSDR = h.getPredictions(0); // Get SDR at first (0) visible layer index.

Important note: Inputs are presented in a columnar SDR format. This format consists of a list of active units, each corresponding to a column of input. This vector is in raveled form (1-D array of size width x height).

All data must be presented in this form. To help with conversion, we included a few "pre-encoders" - encoders that serve to transform various kinds of data into columnar SDR form.

Currently available pre-encoders:

  • ImageEncoder
  • KMeansEncoder
  • GaborEncoder

You may need to develop your own pre-encoders depending on the task. Sometimes, data can be binned into columns without any real pre-encoding, such as bounded scalars.


EOgmaNeo requires: a C++1x compiler, and CMake.

The library has been tested extensively on:

  • Windows using Microsoft Visual Studio 2013 and 2015,
  • Linux using GCC 4.8 and upwards,
  • Mac OSX using Clang, and
  • Raspberry Pi 3, using Raspbian Jessie with GCC 4.8


Version 3.1, and upwards, of CMake is the required version to use when building the library.


The following commands can be used to build the EOgmaNeo library:

mkdir build; cd build

The cmake command can be passed the following optional settings:

  • CMAKE_INSTALL_PREFIX to determine where to install the library and header files. Default is a system-wide install location.
  • BUILD_PREENCODERS to include the Random and Corner pre-encoders into the library.

make install can be run to install the library. make uninstall can be used to uninstall the library.

On Windows it is recommended to use cmake-gui to define which generator to use and specify optional build parameters.


C++ examples can be found in the source/examples directory. Python, Java, and C# examples can be found in their sub-directories.

Refer to README.md files found in each sub-directory for further information.


Refer to the CONTRIBUTING.md file for information on making contributions to EOgmaNeo.

License and Copyright

Creative Commons License
The work in this repository is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. See the EOGMANEO_LICENSE.md and LICENSE.md file for further information.

Contact Ogma via [email protected] to discuss commercial use and licensing options.

EOgmaNeo Copyright (c) 2017-2018 Ogma Intelligent Systems Corp. All rights reserved.

  • error on install

    error on install

    hi all, Trying to use this awesome software :).

    getting the below error.

    andrewcz@andrewcz-PORTEGE-Z30t-B ~/EOgmaNeo/build $ make install [ 10%] Building CXX object CMakeFiles/EOgmaNeo.dir/source/optional/OpenCVInterop.cpp.o In file included from /home/andrewcz/EOgmaNeo/source/optional/OpenCVInterop.cpp:12:0: /home/andrewcz/EOgmaNeo/source/optional/OpenCVInterop.h:12:34: fatal error: opencv2/features2d.hpp: No such file or directory #include "opencv2/features2d.hpp" ^ compilation terminated. make[2]: *** [CMakeFiles/EOgmaNeo.dir/source/optional/OpenCVInterop.cpp.o] Error 1 make[1]: *** [CMakeFiles/EOgmaNeo.dir/all] Error 2 make: *** [all] Error 2

    opened by andrewcz 26
  • Improvement suggestion for ImageEncoder.cpp

    Improvement suggestion for ImageEncoder.cpp

    Here are some small modifications but I believe that can reduce the runtime significantly. I attach the modified version here... (Please change txt-extension into cpp-extension) Thanks ImageEncoder.txt

    opened by Thanh-Binh 1
  • Merging latest reinforcement learning code

    Merging latest reinforcement learning code

    This latest RL code is based off of a (previously experimental) branch in 222464/EOgmaNeo called FiniteHorizon, which was then merged into RL.

    Includes a new encoder based on a new masked Hebbian competitive learning algorithm, which outperforms all others on reinforcement learning tasks so far.

    Other changes include improved thread pool and a large performance improvement to the ImageEncoder (it now outputs far more fluid SDRs without forgetting).

    opened by 222464 0
  • Release v1.2

    Release v1.2

    • Hierarchy predicting using a 'double reconstruction' algorithm
    • Removal of Corner and Random Pre-Encoders
    • Adding the KMeans Pre-Encoder
    • Addition of a reinforcement learning Agent interface
    opened by rcrowder 0
  • Release v1.1.0

    Release v1.1.0

    • Hierarchy and Layer updates
    • Tweaks to reinforcement learning code
    • Made pre-encoders (Random and Corner) optional
    • New OpenCV based FAST feature detector pre-encoder
    • Bug fixes with language bindings using VisAdpater and OpenCVInterop
    opened by rcrowder 0
  • Patch release

    Patch release

    • Changes to match EOgmaNeo::System class renaming
    • Fixed Java(JNI) shared library loading
    • Add port of Python sineWaveExample to Java
    • Correct a few README issues
    opened by rcrowder 0
  • Help needed for reinforcement learning problem

    Help needed for reinforcement learning problem

    Hi there,

    i would like to use EOgmaNeo and apply it to a reinforcement learning problem. I have inputs as a vector at each time step. But I don't know how to pass these inputs to the learning agent, i.e EOgmaNeo and get the action.

    Please any help appretiated.


    opened by dsimba 17
Open source modules to interface Metavision Intelligence Suite with event-based vision hardware equipment

Metavision: installation from source This page describes how to compile and install the OpenEB codebase. For more information, refer to our online doc

PROPHESEE 106 Dec 27, 2022
ROS wrapper for real-time incremental event-based vision motion estimation by dispersion minimisation

event_emin_ros ROS wrapper for real-time incremental event-based vision motion estimation by dispersion minimisation (EventEMin). This code was used t

Imperial College London 2 Jan 10, 2022
We implemented our own sequential version of GA, PSO, SA and ACA using C++ and the parallelized version with CUDA support

We implemented our own sequential version of GA, PSO, SA and ACA using C++ (some using Eigen3 as matrix operation backend) and the parallelized version with CUDA support. All of them are much faster than the popular lib scikit-opt.

Aron751 4 May 7, 2022
Real-Time Neural 3D Hand Pose Estimation from an Event Stream [ICCV 2021]

EventHands: Real-Time Neural 3D Hand Pose Estimation from an Event Stream Project Page Index TRAIN.md -- how to train the model from scratch EVAL_REAL

null 23 Nov 7, 2022
VNOpenAI 31 Dec 26, 2022
A lightweight C++ machine learning library for embedded electronics and robotics.

Fido Fido is an lightweight, highly modular C++ machine learning library for embedded electronics and robotics. Fido is especially suited for robotic

The Fido Project 413 Dec 17, 2022
Spying on Microcontrollers using Current Sensing and embedded TinyML models

Welcome to CurrentSense-TinyML CurrentSense-TinyML is all about detecting microcontroller behaviour with current sensing and TinyML. Basically we are

Santander Security Research 71 Sep 17, 2022
Real time eye tracking for embedded and mobile devices.

drishti Real time eye tracking for embedded and mobile devices in C++11. NEWS (2018/08/10) Native iOS, Android, and "desktop" variants of the real-tim

null 356 Dec 14, 2022
Pure C ONNX runtime with zero dependancies for embedded devices

?? cONNXr C ONNX Runtime A onnx runtime written in pure C99 with zero dependencies focused on embedded devices. Run inference on your machine learning

Alvaro 140 Dec 4, 2022
A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support.

Libonnx A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support. Getting Started The library's

xboot.org 442 Dec 25, 2022
Low dependency(C++11 STL only), good portability, header-only, deep neural networks for embedded

LKYDeepNN LKYDeepNN 可訓練的深度類神經網路 (Deep Neural Network) 函式庫。 輕量,核心部份只依賴 C++11 標準函式庫,低相依性、好移植,方便在嵌入式系統上使用。 Class diagram 附有訓練視覺化 demo 程式 訓練視覺化程式以 OpenCV

Lin Kao-Yuan 44 Nov 7, 2022
DeepSpeech is an open source embedded (offline, on-device) speech-to-text engine which can run in real time on devices ranging from a Raspberry Pi 4 to high power GPU servers.

Project DeepSpeech DeepSpeech is an open-source Speech-To-Text engine, using a model trained by machine learning techniques based on Baidu's Deep Spee

Mozilla 20.8k Jan 9, 2023
C++11 wrapper for the LMDB embedded B+ tree database library.

lmdb++: a C++11 wrapper for LMDB This is a comprehensive C++ wrapper for the LMDB embedded database library, offering both an error-checked procedural

D.R.Y. C++ 263 Dec 27, 2022
An example of Pyston embedded in a C++ program.

EmbeddedPyston About This repository holds an example of the Pyston interpreter embedded within a C++ program. This repository is available as a GitHu

Molly 5 Apr 1, 2022
Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package.

Frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch Copyright 2006-2020 Ko van der Sloot, Maarten van Gompel, Antal van den

Language Machines 70 Dec 14, 2022
The PULP Ara is a 64-bit Vector Unit, compatible with the RISC-V Vector Extension Version 0.9, working as a coprocessor to CORE-V's CVA6 core

Ara Ara is a vector unit working as a coprocessor for the CVA6 core. It supports the RISC-V Vector Extension, version 0.9. Dependencies Check DEPENDEN

null 185 Dec 24, 2022
the C++ version of solov2 with ncnn

the C++ version of SOLOV2 with ncnn

DayBreak 70 Jan 4, 2023
Final version of Plan 9 4th Edition from Bell Labs

This is a re-release of the final version of the 4th Edition of Plan 9 from Bell Labs distributed directly by Bell Labs. 4th Edition was originally r

Serge Vakulenko 8 Jun 21, 2022
the C++ version of Seq2Seq with ncnn

the C++ version of Seq2Seq with ncnn

DayBreak 22 Nov 3, 2022