Skip to content

Commit

Permalink
Upload mtb-example-ml-gesture-classification 1.1.0.272
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Aug 13, 2021
1 parent bbc43eb commit 80a6acf
Show file tree
Hide file tree
Showing 32 changed files with 3,737 additions and 14,239 deletions.
30 changes: 24 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ VERBOSE=
NN_TYPE=float

# Model Name to be loaded to the firmware
NN_MODEL_NAME="test_model"
NN_MODEL_NAME="magic_wand"

# Folder name containing the model and regression data
NN_MODEL_FOLDER=./mtb_ml_gen

# Shield used to gather IMU data
#
# CY_028_TFT_SHIELD -- Using the 028-TFT shield
# CY_028_SENSE_SHIELD -- Using the 028-SENSE shield
SHIELD_DATA_COLLECTION=CY_028_TFT_SHIELD

################################################################################
# Advanced Configuration
################################################################################
Expand Down Expand Up @@ -128,6 +134,14 @@ DEFINES+=CY_ML_FIXED_POINT_8_IN=1 CY_ML_FIXED_POINT_8_NN=1
COMPONENTS+=ML_INT8x8
endif

# Depending which shield is used for data collection, add specific DEFINE
ifeq (CY_028_TFT_SHIELD, $(SHIELD_DATA_COLLECTION))
DEFINES+=CY_BMI_160_IMU=1
endif
ifeq (CY_028_SENSE_SHIELD, $(SHIELD_DATA_COLLECTION))
DEFINES+=CY_BMX_160_IMU=1
endif

# Select softfp or hardfp floating point. Default is softfp.
VFP_SELECT=hardfp

Expand Down Expand Up @@ -158,12 +172,16 @@ LDLIBS=
# Path to the linker script to use (if empty, use the default linker script).
LINKER_SCRIPT=

# Custom pre-build commands to run.
PREBUILD=

# Custom post-build commands to run.
POSTBUILD=

PREBUILD=
PREBUILD+=rm -rf bmi160;
PREBUILD+=mkdir bmi160/;
PREBUILD+=cp $(SEARCH_BMI160_driver)/bmi160* bmi160/;
PREBUILD+=cp $(SEARCH_BMI160_driver)/LICENSE bmi160/;
ifeq (CY_028_SENSE_SHIELD, $(SHIELD_DATA_COLLECTION))
PREBUILD+=sed -i 's/UINT8_C(0xD1)/UINT8_C(0xD8)/' bmi160/bmi160_defs.h;
endif
CY_IGNORE+=$(SEARCH_BMI160_driver)

################################################################################
# Paths
Expand Down
205 changes: 124 additions & 81 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions deps/BMI160_driver.mtb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/BoschSensortec/BMI160_driver#bmi160_v3.9.1#$$ASSET_REPO$$/BMI160_driver/bmi160_v3.9.1
2 changes: 1 addition & 1 deletion deps/BMM150-Sensor-API.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/BoschSensortec/BMM150-Sensor-API#bmm150_v1.0.3#$$ASSET_REPO$$/BMM150-Sensor-API/bmm150_v1.0.3
https://github.com/BoschSensortec/BMM150-Sensor-API#bmm150_v2.0.0#$$ASSET_REPO$$/BMM150-Sensor-API/bmm150_v2.0.0
2 changes: 1 addition & 1 deletion deps/TARGET_CY8CKIT-062S2-43012.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/TARGET_CY8CKIT-062S2-43012#latest-v2.X#$$ASSET_REPO$$/TARGET_CY8CKIT-062S2-43012/latest-v2.X
https://github.com/cypresssemiconductorco/TARGET_CY8CKIT-062S2-43012#latest-v2.X#$$ASSET_REPO$$/TARGET_CY8CKIT-062S2-43012/latest-v2.X
2 changes: 1 addition & 1 deletion deps/ml-inference.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/ml-inference#latest-v1.X#$$ASSET_REPO$$/ml-inference/latest-v1.X
https://github.com/cypresssemiconductorco/ml-inference#latest-v1.X#$$ASSET_REPO$$/ml-inference/latest-v1.X
2 changes: 1 addition & 1 deletion deps/retarget-io.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/retarget-io#latest-v1.X#$$ASSET_REPO$$/retarget-io/latest-v1.X
https://github.com/cypresssemiconductorco/retarget-io#latest-v1.X#$$ASSET_REPO$$/retarget-io/latest-v1.X
1 change: 1 addition & 0 deletions deps/sensor-motion-bmi160.mtb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/cypresssemiconductorco/sensor-motion-bmi160#latest-v1.X#$$ASSET_REPO$$/sensor-motion-bmi160/latest-v1.X
1 change: 1 addition & 0 deletions deps/sensor-orientation-bmx160.mtb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/Infineon/sensor-orientation-bmx160#latest-v1.X#$$ASSET_REPO$$/sensor-orientation-bmx160/latest-v1.X
13 changes: 8 additions & 5 deletions design.mtbml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
"quantization": {
"float32": true,
"int16": true,
"int16x16": true,
"int16x8": true,
"int16x16": false,
"int16x8": false,
"int8": true,
"int8x8": true
"int8x8": false
}
},
"name": "magic_wand",
"output_dir": "mtb_ml_gen",
"target": "CY8C62xA",
"validation": {
"feat_col_first": 0,
"feat_col_count": 127,
"feat_col_first": 1,
"feat_col_last": 0,
"inputFormat": "CSV",
"inputType": "PRNG",
"max_samples": 100,
"path": "",
"path": "../../output_O_nrsh3.csv",
"quantization": {
"float32": true,
"int16": true,
Expand All @@ -31,6 +32,8 @@
"int8": true,
"int8x8": true
},
"target_col_count": 5,
"target_col_first": 0,
"target_cols": "0"
},
"version": 1
Expand Down
Binary file added images/circle.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/magic-wand-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/side-to-side.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/square.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions mtb_ml_gen/info/acc_flt.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Memory to be allocated for scratch memory : 29.27 kB
Memory to be allocated for scratch memory : 58.52 kB
Memory to be allocated for persistent memory : 0.52 kB
Memory size for NN model weights & biases : 30.98 kB
Memory size for NN model weights & biases : 21.32 kB
Accuracy for 32-bit floating-point implementation : 100.00
Expand Down
116 changes: 58 additions & 58 deletions mtb_ml_gen/info/log_flt.txt
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
0.000000 0.002884 0.201892 0.795224
0.000000 0.000000 0.061531 0.938469
0.000000 0.000000 0.388461 0.611539
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000001 0.999999
0.000000 0.000000 0.000000 1.000000
0.000000 0.302395 0.697605 0.000000
0.000000 0.000000 0.999840 0.000160
0.000000 0.000000 0.000042 0.999958
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.014888 0.985112
0.000000 0.000000 0.883854 0.116146
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000014 0.999986
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 0.357041 0.642959
0.000000 0.000000 0.000003 0.999997
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000319 0.999681
0.000000 0.000000 0.000001 0.999999
0.000000 0.000000 0.000000 1.000000
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000207 0.999793
0.000000 0.000000 0.999998 0.000002
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.507783 0.492217
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.992606 0.007394
0.000000 0.000000 0.000029 0.999971
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000166 0.999834
0.000000 0.000000 0.999744 0.000256
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 0.779391 0.220609
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.205345 0.794655
0.000000 0.996010 0.003990 0.000000
0.000000 0.000000 0.042306 0.957694
0.000000 0.000000 0.002042 0.997958
0.000000 0.000000 0.000037 0.999963
0.000000 0.000000 0.000299 0.999701
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000016 0.000000 0.999984
0.000000 0.000000 0.281387 0.718613
0.000000 0.000000 0.016562 0.983438
0.000000 0.000000 0.944263 0.055737
0.000000 0.000000 0.519666 0.480334
0.000000 0.000000 0.999557 0.000443
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.999999 0.000001
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.898541 0.101459
0.000000 0.000015 0.000000 0.999985
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000003 0.999997
0.000000 0.000000 1.000000 0.000000
0.000000 0.000024 0.000200 0.999776
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.999957 0.000043
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.001649 0.998351
0.000000 0.999705 0.000034 0.000261
0.000000 0.000000 0.173531 0.826469
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.039226 0.960774
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.999998 0.000002
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000031 0.999969
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000057 0.999943
Loading

0 comments on commit 80a6acf

Please sign in to comment.