Skip to content

Commit

Permalink
Merge pull request #7 from rcrowder/release-1_2
Browse files Browse the repository at this point in the history
Release v1.2
  • Loading branch information
rcrowder authored Oct 20, 2017
2 parents 758d803 + d225c9a commit 072e8f0
Show file tree
Hide file tree
Showing 27 changed files with 1,683 additions and 1,158 deletions.
12 changes: 10 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
1.2 October, 2017
===================

- 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

1.1.2 August, 2017
==================

Expand All @@ -9,14 +17,14 @@
- Reward averaging
- Save/load bug fix

1.1 July, 2017
1.1 July, 2017
===============

- 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
- Bug fixes with language bindings using VisAdapter and OpenCVInterop

1.0.1 July, 2017
================
Expand Down
61 changes: 24 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ project(EOgmaNeo)
set(CMAKE_VERBOSE_MAKEFILE OFF)

set(EOGMANEO_MAJOR_VERSION 1)
set(EOGMANEO_MINOR_VERSION 1)
set(EOGMANEO_PATCH_VERSION 2)
set(EOGMANEO_VERSION
${EOGMANEO_MAJOR_VERSION}.${EOGMANEO_MINOR_VERSION}.${EOGMANEO_PATCH_VERSION})
set(EOGMANEO_MINOR_VERSION 2)
set(EOGMANEO_PATCH_VERSION 0)
set(EOGMANEO_VERSION ${EOGMANEO_MAJOR_VERSION}.${EOGMANEO_MINOR_VERSION}.${EOGMANEO_PATCH_VERSION})

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")

Expand All @@ -28,13 +27,13 @@ endif()
message(STATUS "Bitness: ${BITNESS}")

if(NOT CMAKE_BUILD_TYPE)
message("CMAKE_BUILD_TYPE not set, setting it to Release")
set(CMAKE_BUILD_TYPE Release)
message("CMAKE_BUILD_TYPE not set, setting it to Release")
set(CMAKE_BUILD_TYPE Release)
endif()
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

option(BUILD_SHARED_LIBS OFF)
message(STATUS "Shared libs: ${BUILD_SHARED_LIBS}")
option(BUILD_TESTS OFF)
message(STATUS "Build tests: ${BUILD_TESTS}")

option(BUILD_PREENCODERS OFF)
message(STATUS "Build pre-encoders: ${BUILD_PREENCODERS}")
Expand All @@ -57,8 +56,8 @@ endif()
find_package(OpenCV HINTS /usr/local/opt/opencv3)

if(OpenCV_FOUND)
#message(STATUS "Found existing OpenCV in ${OpenCV_INCLUDE_DIRS}")
include_directories(${OpenCV_INCLUDE_DIRS})
#message(STATUS "Found existing OpenCV in ${OpenCV_INCLUDE_DIRS}")
include_directories(${OpenCV_INCLUDE_DIRS})
endif()


Expand All @@ -75,14 +74,11 @@ file(GLOB_RECURSE EOGMANEO_SRC
)

if (BUILD_PREENCODERS)
file(GLOB_RECURSE EOGMANEO_CORNERENCODER_SRC "source/optional/CornerEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_CORNERENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_RANDOMENCODER_SRC "source/optional/RandomEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_RANDOMENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_IMAGEENCODER_SRC "source/optional/ImageEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_IMAGEENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_KMEANSENCODER_SRC "source/optional/KMeansEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_KMEANSENCODER_SRC})
endif()

if(SFML_FOUND)
Expand All @@ -100,40 +96,30 @@ if(SFML_FOUND)
target_link_libraries(EOgmaNeo ${SFML_LIBRARIES})
endif()
if(OpenCV_FOUND)
target_link_libraries(EOgmaNeo ${OpenCV_LIBS})
endif()

if(BUILD_SHARED_LIBS)
add_definitions(-DOGMA_DLL)

# Use CMake to generate SharedLib.h instead?
# include (GenerateExportHeader)
# generate_export_header(OgmaNeo
# BASE_NAME OgmaNeo
# EXPORT_MACRO_NAME OgmaNeo_EXPORT
# EXPORT_FILE_NAME OgmaNeo_Export.h
# STATIC_DEFINE OgmaNeo_BUILT_AS_STATIC
# )
target_link_libraries(EOgmaNeo ${OpenCV_LIBS})
endif()

if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

set_property(TARGET EOgmaNeo PROPERTY CXX_STANDARD 14)
set_property(TARGET EOgmaNeo PROPERTY CXX_STANDARD_REQUIRED ON)

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if(BITNESS EQUAL 64)
set_target_properties(EOgmaNeo PROPERTIES COMPILE_FLAGS "-m64" LINK_FLAGS "-m64")
endif()
if(BITNESS EQUAL 64)
set_target_properties(EOgmaNeo PROPERTIES COMPILE_FLAGS "-m64" LINK_FLAGS "-m64")
endif()
endif()

if(BUILD_TESTS)
add_executable(TestSaveLoad source/testing/TestSaveLoad.cpp)
target_link_libraries(TestSaveLoad PUBLIC EOgmaNeo)
endif()

# Offer the user the choice of overriding the installation directories
set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
set(INSTALL_INCLUDE_DIR include/oegmaneo CACHE PATH
"Installation directory for header files")
set(INSTALL_INCLUDE_DIR include/oegmaneo CACHE PATH "Installation directory for header files")

message(STATUS "CMake install prefix = ${CMAKE_INSTALL_PREFIX}")

Expand Down Expand Up @@ -199,7 +185,8 @@ install(DIRECTORY "${3RDPARTY_PATH}/include/"
DESTINATION include/eogmaneo
FILES_MATCHING PATTERN "*.h*")

install(EXPORT EOgmaNeoTargets DESTINATION "${INSTALL_CMAKE_DIR}")
install(EXPORT EOgmaNeoTargets
DESTINATION "${INSTALL_CMAKE_DIR}")

# Uninstall target
configure_file(
Expand Down
9 changes: 3 additions & 6 deletions Cs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,11 @@ file(GLOB_RECURSE EOGMANEO_SRC
)

if(BUILD_PREENCODERS)
file(GLOB_RECURSE EOGMANEO_CORNERENCODER_SRC "../source/optional/CornerEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_CORNERENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_RANDOMENCODER_SRC "../source/optional/RandomEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_RANDOMENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_IMAGEENCODER_SRC "../source/optional/ImageEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_IMAGEENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_KMEANSENCODER_SRC "../source/optional/KMeansEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_KMEANSENCODER_SRC})
endif()

if(SFML_FOUND)
Expand Down
14 changes: 10 additions & 4 deletions Cs/cseogmaneo.i
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "ComputeSystem.h"
#include "Layer.h"
#include "Hierarchy.h"
#include "Agent.h"
#include "Preprocessing.h"
#ifdef BUILD_PREENCODERS
#include "RandomEncoder.h"
#include "ImageEncoder.h"
#include "CornerEncoder.h"
#include "KMeansEncoder.h"
#endif
#ifdef SFML_FOUND
#include "VisAdapter.h"
Expand All @@ -39,21 +39,27 @@
%template(StdPairi) std::pair<int, int>;
%template(StdVecPairi) std::vector<std::pair<int, int> >;
%template(StdVecLayerDesc) std::vector<eogmaneo::LayerDesc>;
%template(StdVecQLayerDesc) std::vector<eogmaneo::QLayerDesc>;
%template(StdVecf) std::vector<float>;
%template(Std2DVecf) std::vector<std::vector<float> >;
%template(StdVecb) std::vector<bool>;

%ignore eogmaneo::ForwardWorkItem;
%ignore eogmaneo::BackwardWorkItem;
%ignore eogmaneo::PredictionWorkItem;

%ignore eogmaneo::QForwardWorkItem;
%ignore eogmaneo::QBackwardWorkItem;
%ignore eogmaneo::QLearnWorkItem;

%include "ComputeSystem.h"
%include "Layer.h"
%include "Hierarchy.h"
%include "Agent.h"
%include "Preprocessing.h"
#ifdef BUILD_PREENCODERS
%include "RandomEncoder.h"
%include "ImageEncoder.h"
%include "CornerEncoder.h"
%include "KMeansEncoder.h"
#endif

#ifdef SFML_FOUND
Expand Down
9 changes: 3 additions & 6 deletions Java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@ file(GLOB_RECURSE EOGMANEO_SRC
)

if (BUILD_PREENCODERS)
file(GLOB_RECURSE EOGMANEO_CORNERENCODER_SRC "../source/optional/CornerEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_CORNERENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_RANDOMENCODER_SRC "../source/optional/RandomEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_RANDOMENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_IMAGEENCODER_SRC "../source/optional/ImageEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_IMAGEENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_KMEANSENCODER_SRC "../source/optional/KMeansEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_KMEANSENCODER_SRC})
endif()

if(SFML_FOUND)
Expand Down
14 changes: 10 additions & 4 deletions Java/jeogmaneo.i
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "ComputeSystem.h"
#include "Layer.h"
#include "Hierarchy.h"
#include "Agent.h"
#include "Preprocessing.h"
#ifdef BUILD_PREENCODERS
#include "RandomEncoder.h"
#include "KMeansEncoder.h"
#include "ImageEncoder.h"
#include "CornerEncoder.h"
#endif
#ifdef SFML_FOUND
#include "VisAdapter.h"
Expand All @@ -39,24 +39,30 @@
%template(StdPairi) std::pair<int, int>;
%template(StdVecPairi) std::vector<std::pair<int, int> >;
%template(StdVecLayerDesc) std::vector<eogmaneo::LayerDesc>;
%template(StdVecQLayerDesc) std::vector<eogmaneo::QLayerDesc>;
%template(StdVecf) std::vector<float>;
%template(Std2DVecf) std::vector<std::vector<float> >;
%template(StdVecb) std::vector<bool>;

%ignore eogmaneo::ForwardWorkItem;
%ignore eogmaneo::BackwardWorkItem;
%ignore eogmaneo::PredictionWorkItem;

%ignore eogmaneo::QForwardWorkItem;
%ignore eogmaneo::QBackwardWorkItem;
%ignore eogmaneo::QLearnWorkItem;

// Handle operator overloading
%rename(get) operator();

%include "ComputeSystem.h"
%include "Layer.h"
%include "Hierarchy.h"
%include "Agent.h"
%include "Preprocessing.h"
#ifdef BUILD_PREENCODERS
%include "RandomEncoder.h"
%include "KMeansEncoder.h"
%include "ImageEncoder.h"
%include "CornerEncoder.h"
#endif

#ifdef SFML_FOUND
Expand Down
9 changes: 3 additions & 6 deletions Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,11 @@ file(GLOB_RECURSE EOGMANEO_SRC
)

if (BUILD_PREENCODERS)
file(GLOB_RECURSE EOGMANEO_CORNERENCODER_SRC "../source/optional/CornerEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_CORNERENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_RANDOMENCODER_SRC "../source/optional/RandomEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_RANDOMENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_IMAGEENCODER_SRC "../source/optional/ImageEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_IMAGEENCODER_SRC})

file(GLOB_RECURSE EOGMANEO_KMEANSENCODER_SRC "../source/optional/KMeansEncoder.*")
list(APPEND EOGMANEO_SRC ${EOGMANEO_KMEANSENCODER_SRC})
endif()

if(SFML_FOUND)
Expand Down
16 changes: 10 additions & 6 deletions Python/pyeogmaneo.i
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "ComputeSystem.h"
#include "Layer.h"
#include "Hierarchy.h"
#include "Agent.h"
#include "Preprocessing.h"
#ifdef BUILD_PREENCODERS
#include "RandomEncoder.h"
#include "KMeansEncoder.h"
#include "ImageEncoder.h"
#include "CornerEncoder.h"
#endif
#ifdef SFML_FOUND
#include "VisAdapter.h"
Expand All @@ -50,31 +50,35 @@
%template(StdPairi) std::pair<int, int>;
%template(StdVecPairi) std::vector<std::pair<int, int> >;
%template(StdVecLayerDesc) std::vector<eogmaneo::LayerDesc>;
%template(StdVecQLayerDesc) std::vector<eogmaneo::QLayerDesc>;
%template(StdVecf) std::vector<float>;
%template(Std2DVecf) std::vector<std::vector<float> >;
%template(StdVecb) std::vector<bool>;

%ignore eogmaneo::ForwardWorkItem;
%ignore eogmaneo::BackwardWorkItem;
%ignore eogmaneo::PredictionWorkItem;

%ignore eogmaneo::QForwardWorkItem;
%ignore eogmaneo::QBackwardWorkItem;
%ignore eogmaneo::QLearnWorkItem;

%include "ComputeSystem.h"
%include "Layer.h"
%include "Hierarchy.h"
%include "Agent.h"
%include "Preprocessing.h"
#ifdef BUILD_PREENCODERS
%include "RandomEncoder.h"
%include "KMeansEncoder.h"
%include "ImageEncoder.h"
%include "CornerEncoder.h"
#endif

#ifdef SFML_FOUND
%ignore eogmaneo::SDR;
%ignore eogmaneo::WeightSet;
%ignore eogmaneo::Network;
%ignore eogmaneo::Caret;
%include "VisAdapter.h"
#endif

#ifdef OPENCV_FOUND
%include "OpenCVInterop.h"
#endif
10 changes: 4 additions & 6 deletions Python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,15 @@ def get_outputs(self):
sources=["pyeogmaneo.i",
"../source/eogmaneo/ComputeSystem.cpp",
"../source/eogmaneo/Hierarchy.cpp",
"../source/eogmaneo/Layer.cpp",
"../source/eogmaneo/Agent.cpp",
"../source/eogmaneo/Preprocessing.cpp",
"../source/eogmaneo/ThreadPool.cpp",
"../source/optional/CornerEncoder.cpp",
"../source/optional/ImageEncoder.cpp",
"../source/optional/RandomEncoder.cpp",]
"../source/optional/KMeansEncoder.cpp",
"../source/optional/ImageEncoder.cpp",]
)

setup(
name="eogmaneo",
version="1.1.2",
version="1.2",
description="Python bindings for the EOgmaNeo library",
long_description='https://github.com/ogmacorp/EOgmaNeo',
author='Ogma Intelligent Systems Corp',
Expand Down
Loading

0 comments on commit 072e8f0

Please sign in to comment.