-
Notifications
You must be signed in to change notification settings - Fork 450
Real-time Interactive Training with ml5.NeuralNetwork examples #194
Conversation
video quality aside here's a version with sound https://twitter.com/shiffman/status/1178445523709255681 |
@joeyklee here's an interesting bug with Here is some simple code to demonstrate: function setup() {
const options = {
inputs: 2,
outputs: 1,
}
const neural = ml5.neuralNetwork(options);
neural.data.addData([100, 50], [1]);
neural.data.addData([100, 100], [2]);
neural.data.addData([100, 200], [2]);
neural.data.normalize();
neural.data.normalizedData.tensors.inputs.print();
}
A version of the Fiebrink pixels example in progress will be pushed to this branch momentarily. |
I filtered out pixel values that don't change (all the alphas) and the example is working, see: https://twitter.com/shiffman/status/1178868124730449920 for a video. |
@shiffman - wow! Nice examples. I am planning to start a refactor of the neural net class to see if maybe we can clean up the code base as well as integrate these considerations (plus all those we learned through this process). I'll point you to the refactor soon! |
@shiffman Just noting that I've updated these examples in this PR together with: #195 as it relates to ml5js/ml5-library#591 |
Great! Closing. . . |
@joeyklee oops, i think this was merged before I created the face example. I'm just going to add it back in via another branch I'm working in. |
β Description π
This is a new example that I plan to demonstrate in the IMA course and I also hope to make a video tutorial about it. This is inspired by @fiebrink1's work on wekinator and course Machine Learning for Musicians and Artists.
This is a very simple demonstration where with training data as follows:
Then the neural network predicts a frequency based on mouse position and plays the note using a
p5.Oscillator
object.β Screenshots πΌ
Here is a GIF demonstration (but you cannot hear the sound of course.)