NameOfFeature

image classification of bird

Description

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Quickstart

  1. // Initialize the magicFeature
  2. const magic = ml5.magicFeature('sparkles', modelLoaded);
  3. // When the model is loaded
  4. function modelLoaded() {
  5. console.log('Model Loaded!');
  6. }
  7. // Make some sparkles
  8. magic.makeSparkles(100, (err, results) => {
  9. console.log(results);
  10. });

Usage

Initialize

  1. const magic = ml5.magicFeature(requiredInput, ?optionalInput1, ?optionalInput2);

Parameters

  • requiredInput: REQUIRED. Notice there is no question mark in front of the input.

  • optionalInput1: OPTIONAL. Notice the ? indicates an optional parameter.

  • optionalInput2: OPTIONAL. A description of some kind of object with some properties. Notice the ? indicates an optional parameter.

    1. {
    2. sparkleCount: 100,
    3. delightFactor: 1.0,
    4. party: true,
    5. };

Properties


.property1

String. A description of the property associated with the new model instance.



.property2

Object. A description of the property associated with the new model instance.



.property3

Object. A description of the property associated with the new model instance.


Methods


.makeSparkles()

Given a number, will make magicSparkles

  1. classifier.makeSparkles(?numberOfSparkles, ?callback);

📥 Inputs

  • numberOfSparkles: Optional. Number. The number of sparkles you want to return.
  • callback: Optional. Function. A function to handle the results of .makeSparkles(). Likely a function to do something with the results of makeSparkles.

📤 Outputs

  • Object: Returns an array of objects. Each object contains {something, anotherThing}.


.makeDisappear()

Given an image, will make objects in the image disappear

  1. classifier.makeDisappear(input, ?numberOfObjects, ?callback);

📥 Inputs

  • input: REQUIRED. HTMLImageElement | HTMLVideoElement | ImageData | HTMLCanvasElement. The image or video you want to run the function on.
  • numberOfObjects: Optional. Number. The number of objects you want to disappear.
  • callback: Optional. Function. A function to handle the results of .makeDisappear(). Likely a function to do something with the results of the image where objects have disappeared.

📤 Outputs

  • Image: Returns an image.

Examples

p5.js

p5 web editor

plain javascript

Demo

No demos yet - contribute one today!

Tutorials

MagicFeature Tutorial 1 via CodingTrain

MagicFeature Tutorial 2 via CodingTrain

Acknowledgements

Contributors:

  • Name 1
  • Name 2

Credits:

  • Paper Reference | Website URL | Github Repo | Book reference | etc

Source Code