Giter Club home page Giter Club logo

neuralspot's People

Contributors

apage224 avatar carloshmorales avatar jconn avatar scttl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

neuralspot's Issues

Raw audio streaming test

Instead of encoding, can we stream raw audio over BLE? If so, NNSE w/no codec might be possible on AP3.

basic_tf_stub

  • refactor to use C instead of H files in example
  • rename to 'kitchen_sink' - update documents everywhere to reflect this

minor issues with current code

Neuralspot is coming along nicely @carloshmorales!

Here's a few little gotchas I ran into when trying to utilize my own nest for speech enhancement (most of which I've just manually worked around for the time being):

  1. nest isn't relocatable as the dependencies under the ../make directory are not available from the <nest_dir>/Makefile
  2. passing a BINDIR value that is outside the nest subtree doesn't work. May just want to document this somewhere? Possibly even add a check to ensure conformance?
  3. Setting AUDIO_DEBUG=1 uncovered a lot of missing headers/code, most notably SEGGER_RTT. Maybe it makes sense to treat this as another extern module? I've manually extracted 7.70a from the main Jlink SDK to move forward with what I need. Also need to add and compile the .c code that comes with it.
  4. Some AUDADC_* references were missing

Document AP3

  • Main readme
  • blog
  • AS readme
  • multiplatform blog

Include Target SVD File

It would be nice to include the targets' SVD files and copied into the generated nest. This will make it easier to flash and debug.

Missing and malformed package dependencies

A number of Python package dependencies are missing to run AutoDeploy. eRPC url is also malformed which silently fails and causes pip to fallback to latest eRPC from PyPi.

  • tensorflow
  • tabulate
  • tqdm
  • pydantic
  • pydantic-argparse

AutoDeploy enhancements: Typehints, verbosity flag

For AutoDeploy, it would be nice to leverage static type hints for the various functions, especially those that use Pydantic models.

AutoDeploy CLI should expose a verbosity flag to control amount of logs, data pushed to stdout and stderr. E.g. only dump layer statistics when verbosity is high, Capture output of make commands when they fail.

Clicking on the link in this line leads to a page "not found"

This part of the component allows developers to easily configure the platform's power modes, which involves turning peripherals on or off, and configuring the MCU's cache, memory, and clock modes. Configuration can be used in two ways: the developer can choose one of the predefined optimized power settings (defined [here](https://github.com/AmbiqAI/neuralSPOT/neuralspot/ns-peripherals/src/ns_power.c)), or can specify their own like so:

NSAutoDeploy & NSPerf bugs

On commit 296b185, I am unable to run ns_autodeploy.

From fresh install, I run the following

make PLATFORM=apollo4p_evb
cd tools/
python -m ns_autodeploy \
--tflite-filename model.tflite \
--model-name my model \
--cpu-mode 192 --runs 2 \
--arena-size-scratch-buffer-padding 10 \
--max-arena-size 80 \
--verbosity 4 
  1. If I add --measure-power the script fails as the params for ns_perf don't match ns_autodeploy (missing joulescope and a bunch of others).

  2. If neuralSPOT is not built with NS_MLPROFILE then the minimal example fails due to the following bug in the template and in some of the examples:

#ifdef NS_MLPROFILE
    ns_timer_config_t *tickTimer;
    ns_perf_mac_count_t *mac_estimates; ///< Optional, from tflm_profiler tool
#else
    void *tickTimer;
    void *mac_estimate; ///< Optional, from tflm_profiler tool
#endif

-> mac_estimate should be mac_estimates

As for ns_perf, when I run the following it hangs with the following message dumped INFO: handle_cmd_gpi_req s/gpi/+/!req. I'm on Mac M1 with GUI Joulescope UI 1.0.62, Joulescope driver 1.4.10, and python joulescope==1.1.13 and and pyjoulescope driver is 1.4.10. I do pre-launch Joulescope app and quit (green LED on scope). I also have Joulescope GPIO hooked up to EVB according to docs (PIN22 -> IN0, PIN23 -> IN1, PIN24 -> OUT0, GND -> GND).

make PLATFORM=apollo4p_evb
cd tools/
python -m ns_perf \
--cpu-mode "NS_MAXIMUM_PERF" \
--joulescope \
--tflite-filename model.tflite \
--max-arena-size 100 \
--arena-size-scratch-buffer-padding 20 \
--runs-power 100 \
--model-name modelperf \
--verbosity 4  

If I make local changes to get ns_autodeploy to work it does run completely so I don't think there is any issue with arena size or model architecture.

NNID Multithreading

NNID model grabs CPU for too long - modify to suspend so that AP3 can run this without timing out BLE.

AutoDeploy hangs when TFLM AllocateTensors() fails

On certain models, the reported arena size by TFLM is insufficient and will result in subsequent AllocateTensors call to fail. This will cause AutoDeploy to hang when then trying to feed input stimulus.

For insufficient tensor arena, we might want to provide additional arena padding CLI argument.
For latter issue, AutoDeploy should verify TFLM model initialization is successful before attempting to send inputs.

[RPC, ubuntu] basic_tf_stub example

-Platform: apollo4p
-os : ubuntu
I tried the basic_tf_stub example on ubuntu for checking whether PRC is working.
I followed the instruction // #define RPC_ENABLED in basic_tf_stub.cc and uncomment it and compile it. It seems not working.

  1. NS_USB1_PRESENT below seems not existing.
    #ifdef NS_USB1_PRESENT
    // #define RPC_ENABLED
    #endif
  2. After I did make deploy, I can not find the ttyACM0 or ttyACM1. Usually, I can find it as below
poyupaulchen@paul:~/Documents/esc/evb$ ls -la /dev/serial/by-id
total 0
drwxr-xr-x 2 root root 80 Feb 28 17:26 .
drwxr-xr-x 4 root root 80 Feb 28 16:42 ..
lrwxrwxrwx 1 root root 13 Feb 28 16:42 usb-SEGGER_J-Link_000900030197-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Feb 28 17:26 usb-TinyUSB_TinyUSB_Device_123456-if00 -> ../../ttyACM1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.