is a recurrent neural network model trained on millions of doodles collected from the Quick, Draw! game. The
model can create new drawings (from a list of categories) based on an initial path.
Quickstart :
// Create a new SketchRNN Instance
const model = ml5.sketchRNN('cat', modelReady);
// When the model is loaded
function modelReady() {
console.log('SketchRNN Model Loaded!');
}
// Reset the model's current stat
model.reset();
// Generate a new stroke
model.generate(gotSketch);
function gotSketch(err, result) {
// Do something with the result
}
Usage :
* Initialize :
const sketchrnn = ml5.sketchRNN(model, ?callback);
* Parameters :
* model : The name of the model to use.
* callback : Optional. A function to be called once the model is loaded. If no callback is provided, it will return a promise that will be resolved once the model has loaded.