
# PSoC4 NN Reference Example

This code example demonstrates how PSoC4 uses neural networks (NN) to process data from CAPSENSE&trade;.

The demo is based on [PSoC&trade; 4100S Max](https://www.infineon.com/cms/en/product/microcontroller/32-bit-psoc-arm-cortex-microcontroller/psoc-4-32-bit-arm-cortex-m0-mcu/psoc-4100/)

The demo includes three connected parts:

- streaming data from the PSoC&trade; 4100S Max Pioneer Kit into Imagimob&trade;
- creating / training NNs in Imagimob&trade; for touch button detection, slider position calculation, slider gesture recognition
- demonstrating parallel work of classic and NN-based algorithm in the PSoC&trade; 4100S Max Kit

The projects related to the first part are located in the `data_streaming` folder.
The projects related to the second and third parts are located in the `data_processing` folder.

## Data Streaming Projects

Corresponding Imagimob&trade; data collection project and ModusToolbox&trade; project with integrated Imagimob&trade; streaming protocol are located in the data_streaming folder:

- `imagimob_data_collection`
- `mtb_signals_streaming`

## Neural Networks Imagimob Projects

The following Imagimob NN projects are located in the `data_processing/imagimob_nn_projects` folder:

1. **button_nn** - NN for touch button detection
2. **position_nn** - NN for slider position calculation
3. **gestures_nn** - NN for slider gesture recognition

Each NN Imagimob project contains two main subfolders: `Data` and `Models`:

- `Data` contains data for model training, testing, and validation along with a special formatting scripts
- `Models` contains the trained models for each project

## ModusToolbox PSoC4 NN Demo Project

The ModusToolbox project that demonstrates how PSoC4 uses NNs for CAPSENSE signals processing is located in the `mtb_nn_demo_project` folder.
