Giter VIP home page Giter VIP logo

finger-angles-predictions-emg's Introduction

Hi folks! 🤙

Happy to see you there 🙂 Sit back, relax, and enjoy come sweet coding time ☕

🔥 Now doing

  • Making workspaces more collaborative @gphy
  • Creating coding activities and projects for bachelor students @uLaval
  • Working on new tools and librairies (like Disma!)
  • Learning best-practices in Rust

❤️ What I love

  • User-oriented Web UIs that are fully responsive, inclusive and carefully designed
  • Domain-Driven architectures based on flexible, extensible and reusable modules
  • Small librairies to make my life (and yours!) easier
  • Automated and optimized tooling to move faster and with more confidence

💡 To see more

finger-angles-predictions-emg's People

Contributors

emmanuelngoran avatar vigenere23 avatar xx-code avatar

Watchers

 avatar  avatar

finger-angles-predictions-emg's Issues

Détecter l'angle d'un doigt

Créer un pipeline OpenCV pour mesurer et sauvegarder l'angle d'un doigt en temps réel, à l'aide de marqueurs visuels.

  • setup le script
  • Faire la détection d’une main
  • Faire la détection des différents doigts (pouvoir différencier l’index, le majeur, le pouce…)
  • Faire la détection des angles de chaque doigts

Add Queues Usage Watch

Create a process to show queues usage.

  • Show usage / max size
  • Show usage in %
  • Update the stats every 1 to 5 seconds (with a sleep() in a while loop)

Extraction du dataset d'entraînement

Trouver comment sélectionner des blocs de données aléatoires à partir du couplage signal--angle des données d'entraînement.

  • Comment sont récoltées les données? Est-ce simplement une série linéaire? Ou possèdent-elles des indicateurs de temps?
  • Devrait-on sélectionner par quantité de données ou par quantité de temps?
  • Quelles seront les fréquences d'acquisition des angles et des signaux? Sont-elles fixes? Sont-elles connues?

Accelerate Serial Data Fetching

Split data fetching and processing into 2 distinct processes :

  • Create new process for data fetching only
  • Create new process for data processing (segmentation, convertion, filtering, etc.)
  • Create new queue for communication between processes
    • The queue should receive bytes directly (technically byte strings in Python)
  • Both processes may need to be aware of both start and stop bytes as well as message length in order to receive and process data correctly (at least to mimic the current strategies)

Techniques et outils de régression

  • Quels outils utiliser?
  • Quelles méthodes semblent possibles et adaptées au problème?
  • Décrire démarche d'analyse de régression
    • Sélection de variable
    • Performance
    • etc.

Refactor UART sending protocol

https://electronics.stackexchange.com/questions/10249/serial-uart-communication

We could implement some UART protocol to make the UART sending/receiving strategy flexible. This should make supporting multi-channel ADC (#13) and buffered sending (for #7 and #10) way easier.

Here's a potential solution :

#bytes name content desc
1 sync \n Like a start byte. Use with Python's read_until('\n')
1 channels 1 to 255 Either the number of (ADC) channels that are sent **, or the channel number ***.
1 data length 1 to 255 Number of data bytes. Use with Python's read(length)
length data splitted integers Data (integers) sent as bytes.

** : Splitting strategy to be determined (ABAB or AABB) -> both are as efficient in Python, but ABAB should be easier in C.
*** : This will mean harder handling on the MSP since one buffer will be needed for each channel (each packet will only contain data for 1 channel). But this would make the Python code very fast and easy to use.

This will give a data ratio of length / (length + 2), which with 30 bytes of data (32 total, without checksum) results in 94% (compared to current 50-60%) while being extremely flexible.

To ensure flexible usage on Python's end, we should use a new class that wraps this info :

DataType = Var('DataType', List[int], bytes)

class DataPacket[DataType]:
  channels/channel_id: int
  data: DataType

... or something similar.

Investigate UART settings

There are some very interesting UART configurations that should be checked :

  • Parity check (+1 bit)
    • Tried but not working
  • Number of stop bits (default : 1, up to 2) no need
  • TX interrupt (instead of using blocking while loops) no need

These settings MUST be set on both the MSP430 and Python scripts.

Add better timestamping

Au lieu d'ajouter le timestamp sur les données lorsque traitées, plutôt ajouter un start_time et end_time lors de la collecte en batch, puis répartir ce temps sur les données lors du parsing.

Autre possibilité

Calculer et envoyer le timestamp à partir du MSP 430.

Problème : requiert au moins 64 bits (8 bytes) additionnel alors que les données sont seulement 16 bits (2 bytes) chaque...

Improve plotting technique

  • Use a fixed timed refresh window with continuous updating. This should minimize redraw time and thus improve both readability dans usability of the plot
    • Matplotlib not fast enough (redraws everything instead of just adding 1 node)

Rapport 1

Sections :

  • Mise en contexte
  • Objectifs
  • Revue de la littérature
  • Description de la contribution (originalité, nouveauté)
  • Shéma bloc
  • Rôles des membres et planification
  • Avancements
    • Section à détailler / expliquer davantage

Setup AI

  • Créer le projet Python de base (dossiers, dépendances, etc.)
  • Créer un premier pipeline AI

Optimize serial data segmentation

Current data segmentation algorithm preprocessing is in at least O(4n), because it :

  • Checks for all start bytes matching
  • Checks for all stop bytes matching
  • Extract all message bytes (O(n) for each byte in message, currently 2 bytes)

Then, iteration over the zipped arrays of bytes takes O(1) access time.

Also, this method trashes and retries the entire batch if only 1 message is corrupted, which leads to large error losses.

Propositions

A single for loop with controlled iteration could be faster by achieving O(1) amortized preprocessing time since it would be achieve during the data access iteration.

Proposition 1

  • Iterate until start byte is found
  • Accumulate next bytes until stop byte is found (do not accumulate stop byte) [could be slow]
    • Early stop is buffer > content length
  • If buffer < content length, trash and continue to next start byte
  • Return the message content (in bytes, not splitted)
  • Continue to next start byte

Proposition 2 (maybe faster)

  • Iterate until start byte is found
  • Get next bytes until message length +1 is reached [fast]
  • If last byte is not the stop byte, trash and continue to next start byte
  • Return the message content (in bytes, not splitted, and without the stop byte)
  • Continue to next start byte

Proposition 3 (faster if possible

Check if numpy can achieve such algorithm faster with parallelization

Placement des électrodes

  • Combien d'électrodes?
  • Où les placer?
  • Quel ordre de potentiel recherche-t-on? (V? mV? uV?)

Supposer un placement pour le pouce.

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.