Skip to content

Commit

Permalink
Source code release (v1.0)!
Browse files Browse the repository at this point in the history
  • Loading branch information
lrzpellegrini committed Nov 3, 2021
1 parent 809dfc5 commit ebc1ad0
Show file tree
Hide file tree
Showing 22,155 changed files with 5,321,940 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.cxx/

*.iml
.gradle
.idea/

.DS_Store
/build
/captures
.externalNativeBuild

*.apk
*.ap_
*.aab
*.dex
*.class
bin/
gen/
out/
.gradle/
build/
local.properties
proguard/
*.log
.navigation/
captures/

.externalNativeBuild
freeline.py
freeline/
freeline_project_description.json

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

vcs.xml

lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/

keystore.properties
release/
2 changes: 2 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build

80 changes: 80 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
ndkVersion "20.0.5594570"
defaultConfig {
applicationId "it.mibiolab.clapp"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-fopenmp"
arguments "-DANDROID_STL=c++_shared"
}
}
ndk {
abiFilters 'arm64-v8a'/*, 'armeabi-v7a'*/
/*abiFilters 'x86'*/
abiFilters.clear()
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
version "3.10.2"
path "src/main/cpp/CMakeLists.txt"
}
}
splits {
abi {
// Enables building multiple APKs per ABI.
enable true

// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86 and x86_64.

// Resets the list of ABIs that Gradle should create APKs for to none.
reset()

// Specifies a list of ABIs that Gradle should create APKs for.
include 'arm64-v8a'/*, 'armeabi-v7a'*/

// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk false

}
}
compileOptions {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
buildToolsVersion = '28.0.3'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'

// https://mvnrepository.com/artifact/commons-io/commons-io
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
}

clean.doFirst {
delete ".externalNativeBuild"
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
32 changes: 32 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.mibiolab.clapp">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:name="it.mibiolab.clapp.MyApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:largeHeap="true">
<activity
android:name="it.mibiolab.clapp.ClassifyCamera"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"></activity>
<activity android:name="it.mibiolab.clapp.PermissionActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
83 changes: 83 additions & 0 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.4.1)
include(ExternalProject)

set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}" CACHE INTERNAL "Cmake prefix path" FORCE)
set(CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}" CACHE INTERNAL "Cmake find root path" FORCE)

set(BUILD_SHARED_LIBS ON)

set(LMDB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb)

add_library( # Sets the name of the library.
native-lib

# Sets the library as a shared library.
SHARED)
set(LMDB_LIBRARY lmdb)

target_sources(native-lib
PUBLIC
# Provides a relative path to your source file(s).
native-lib.cpp
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/lmdb.h
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/mdb.c
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.h
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.c
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/cwr_app.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/cwr_app.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/cwr.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/cwr.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/visualization.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/visualization.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/train_utils.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/train_utils.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/model_status_reporter.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/model_status_reporter.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/rehearsal_memory.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/rehearsal_memory.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/training_status_reporter.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/myapp_training_reporter.h
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/src/myapp_training_reporter.cpp
${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include/picosha2.h)

#set(gflags_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/lib/cmake/gflags)
#set(glog_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/lib/cmake/glog)
#set(leveldb_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/lib/cmake/leveldb)
#set(Snappy_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/lib/cmake/Snappy)
# OpenCV install directory structure is strange and requires an explicit *_DIR set to the OpenCVConfig.cmake location
set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/sdk/native/jni)
#set(OpenBLAS_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/share/cmake/OpenBLAS)
#set(Caffe_DIR ${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/share/Caffe)
find_package(gflags REQUIRED)
find_package(glog REQUIRED)
find_package(leveldb REQUIRED)
find_package(Snappy REQUIRED)
find_package(OpenCV REQUIRED)
find_package(OpenBLAS REQUIRED)
find_package(Caffe REQUIRED)
find_package(Threads)
find_package(Boost REQUIRED)

file(GLOB allLibs "${CMAKE_SOURCE_DIR}/libsroot/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/**/*.so")

# Copies shared libraries to output directory (so that they will be added to the final APK)
foreach(lib_path ${allLibs})
add_custom_command(TARGET native-lib POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${lib_path} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
endforeach()

find_library(log-lib log)

target_include_directories(native-lib PUBLIC ${CMAKE_SOURCE_DIR}/native-lib/CwrApp/include ${LMDB_INCLUDE_DIR})
target_link_libraries(
native-lib

${log-lib}
Snappy::snappy
leveldb::leveldb
${Boost_LIBRARIES}
glog::glog
gflags
OpenBLAS::OpenBLAS
${OpenCV_LIBS}
caffe)
41 changes: 41 additions & 0 deletions app/src/main/cpp/libsroot/arm64-v8a/Debug/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.


License Agreement
For Open Source Computer Vision Library
(3-clause BSD License)

Copyright (C) 2000-2019, Intel Corporation, all rights reserved.
Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.
Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.
Copyright (C) 2015-2016, Itseez Inc., all rights reserved.
Third party copyrights are property of their respective owners.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the names of the copyright holders nor the names of the contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

This software is provided by the copyright holders and contributors "as is" and
any express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are disclaimed.
In no event shall copyright holders or contributors be liable for any direct,
indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.
1 change: 1 addition & 0 deletions app/src/main/cpp/libsroot/arm64-v8a/Debug/README.android
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See http://opencv.org/platforms/android
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
///////////////////////////////////////////////////////////////////////////////
/// \file accumulators.hpp
/// Includes all of the Accumulators Framework
//
// Copyright 2005 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_ACCUMULATORS_ACCUMULATORS_HPP_EAN_28_10_2005
#define BOOST_ACCUMULATORS_ACCUMULATORS_HPP_EAN_28_10_2005

#include <boost/accumulators/framework/accumulator_set.hpp>
#include <boost/accumulators/framework/accumulator_concept.hpp>
#include <boost/accumulators/framework/accumulator_base.hpp>
#include <boost/accumulators/framework/extractor.hpp>
#include <boost/accumulators/framework/external.hpp>
#include <boost/accumulators/framework/features.hpp>
#include <boost/accumulators/framework/parameters/accumulator.hpp>
#include <boost/accumulators/framework/parameters/sample.hpp>
#include <boost/accumulators/framework/parameters/weight.hpp>
#include <boost/accumulators/framework/parameters/weights.hpp>
#include <boost/accumulators/framework/accumulators/external_accumulator.hpp>
#include <boost/accumulators/framework/accumulators/droppable_accumulator.hpp>
#include <boost/accumulators/framework/accumulators/reference_accumulator.hpp>
#include <boost/accumulators/framework/accumulators/value_accumulator.hpp>

#endif
Loading

0 comments on commit ebc1ad0

Please sign in to comment.