Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TensorFlow.js to 1.0.2 #336

Merged
merged 8 commits into from
May 16, 2019
Merged

Update TensorFlow.js to 1.0.2 #336

merged 8 commits into from
May 16, 2019

Conversation

WenheLI
Copy link
Member

@WenheLI WenheLI commented Mar 25, 2019

β†’ Description πŸ“

Upgrade TF.js dependency to 1.0.2 and changes some APIs.
This is about #333

β†’ Relevant documentation 🌴

I changed the tf.loadModel to tf.loadLayersModel , tf.fromPixels to tf.browser.fromPixels, tf.batchNormalization to tf.batchNorm and changes the parameters' order, and add await afront of the buffer.

@joeyklee
Copy link
Contributor

@WenheLI - WoW! amazing. Thanks so much for your speediness! Quick question: did you also manage to see if there might be some issues related to: #332 ? If not, we can look into this next :) Let us know + thanks again!

@WenheLI
Copy link
Member Author

WenheLI commented Mar 25, 2019

@joeyklee The SketchRNN doesn't work for my version either. Below is the screenshot. I am thinking it might be API changes about magenta.
sketch

@joeyklee
Copy link
Contributor

@WenheLI - yes quite likely the case. Also it seems in github at least, the tfjs version is also not recent: https://github.com/tensorflow/magenta-js/blob/master/sketch/package.json#L10

@WenheLI
Copy link
Member Author

WenheLI commented Mar 26, 2019

Yes, it seems like they didn't update the tfjs version to 1.0.2 for sketchRnn(They only upgrade the music model). We may need to wait for them to do the upgrade first, though it is weird that the changes about tfjs 1.0.2 should not effect on the sketchRnn model.

@joeyklee
Copy link
Contributor

@WenheLI - I'm just checking to make sure things are all good here and plan to merge soon. So super cool! Thanks for looking into this. I'll ping you again when I merge. Thanks!

@joeyklee
Copy link
Contributor

joeyklee commented Mar 29, 2019

update:

see: #336 (comment)

original:

Hmm so a weird thing is when I try to access ml5 at localhost:8080/ml5.js after running npm start I receive a secure connection error:

Screen Shot 2019-03-29 at 12 11 50

My terminal outputs the following when I run npm start

➜  ml5-library git:(ericdevopensource-development) βœ— npm start

> ml5@0.2.2 start /Users/joeyklee/Cosmos/src/github/ml5-src/ml5-library
> webpack-dev-server --open --config webpack.dev.babel.js

(node:35606) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
β„Ή ο½’wdsο½£: Project is running at http://localhost:8080/
β„Ή ο½’wdsο½£: webpack output is served from /
β„Ή ο½’wdsο½£: Content not from webpack is served from /Users/joeyklee/Cosmos/src/github/ml5-src/ml5-library/dist
β„Ή ο½’wdmο½£: wait until bundle finished: /
⚠ rwdm」: Hash: 2c0de63b3454f3a829e6
Version: webpack 4.1.1
Time: 16782ms
Built at: 3/29/2019 12:11:41 PM
     Asset       Size  Chunks                    Chunk Names
    ml5.js   8.69 MiB    main  [emitted]  [big]  main
index.html  172 bytes          [emitted]
Entrypoint main [big] = ml5.js
[./node_modules/@tensorflow/tfjs/dist/tf.esm.js] 656 bytes {main} [built]
[./node_modules/babel-polyfill/lib/index.js] 833 bytes {main} [built]
[./node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js] 23.9 KiB {main} [built]
[./node_modules/babel-runtime/core-js/object/assign.js] 94 bytes {main} [built]
[./node_modules/babel-runtime/helpers/extends.js] 544 bytes {main} [built]
[./node_modules/core-js/shim.js] 8.03 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 7.75 KiB {main} [built]
[./src/PitchDetection/index.js] 9.36 KiB {main} [built]
[./src/PoseNet/index.js] 11.2 KiB {main} [built]
[./src/SketchRNN/index.js] 6.72 KiB {main} [built]
[./src/StyleTransfer/index.js] 11.2 KiB {main} [built]
[./src/Word2vec/index.js] 11.7 KiB {main} [built]
   [0] multi (webpack)-dev-server/client?http://localhost:8080 babel-polyfill ./src/index.js 52 bytes {main} [built]
[./src/YOLO/index.js] 12 KiB {main} [built]
[./src/index.js] 2.76 KiB {main} [built]
    + 695 hidden modules

WARNING in ./node_modules/@tensorflow/tfjs-data/dist/tf-data.esm.js
17:72134-72149 "export 'deprecationWarn' was not found in '@tensorflow/tfjs-core'
 @ ./node_modules/@tensorflow/tfjs-data/dist/tf-data.esm.js
 @ ./node_modules/@tensorflow/tfjs/dist/tf.esm.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 babel-polyfill ./src/index.js
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/html-webpack-plugin/default_index.ejs] 376 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 527 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 519 bytes {0} [built]
β„Ή ο½’wdmο½£: Compiled with warnings.

This causes the ml5 examples also to not work.

I do get results when I open my browser at 127.0.0.1:8080/ml5.js but we should still be able to access ml5 via localhost.

Are you also seeing this same issue @shiffman or @yining1023 ?

@yining1023
Copy link
Member

Maybe it might work on HTTP? http://localhost:8080/ml5.js

@joeyklee
Copy link
Contributor

Maybe it might work on HTTP? http://localhost:8080/ml5.js

Ah! I realized that I have a funky setting in my localhost:8080 for a self-signed https certification for another project. Whoops! I'll update my comment above.

@joeyklee
Copy link
Contributor

@WenheLI - Hi! So taking a first look, it seems like there are some breaking changes that might need further inspection.

If you can have a look at running ml5 with https://github.com/ml5js/ml5-examples/tree/master/p5js/FeatureExtractor/FeatureExtractor_Image_Classification - you'll see that some functions are no longer part of the class e.g. mobilenet.getlayer().

Can you check and see whether or not you can resolve some of these issues?

Thank you so much!

@WenheLI
Copy link
Member Author

WenheLI commented Mar 29, 2019

@joeyklee I see the problem is that the Mobilenet uses GraphModel to load model instead of LayerModel that makes the getLayers not work. I will try to fix it!

@WenheLI
Copy link
Member Author

WenheLI commented Mar 30, 2019

@joeyklee Fixed the getLayer bug! I currently followed the official example's solution that is to load the model from URL instead of using the model package.

https://github.com/tensorflow/tfjs-examples/blob/master/webcam-transfer-learning/index.js#L39

@joeyklee
Copy link
Contributor

@WenheLI - wow! you are amazing + so fast. I will have a look this weekend and do some further checks on the rest of the examples to make sure things are in working order. If you don't mind also having a look as well, that would be super. So excited for this one!

"@tensorflow-models/mobilenet": "1.0.0",
"@tensorflow-models/posenet": "1.0.0",
"@tensorflow-models/knn-classifier": "1.0.0",
"@tensorflow/tfjs": "1.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is up to 1.0.4 now :)

@@ -17,6 +16,7 @@ import { saveBlob } from '../utils/io';
import callCallback from '../utils/callcallback';

const IMAGE_SIZE = 224;
const BASE_URL = 'https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible you should try to use TFHub, see the URLs here: https://github.com/tensorflow/tfjs-models/blob/master/mobilenet/src/index.ts#L31

We're going to deprecate the googleapis.com links at some point in the near future in favor of TF Hub :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, apologies, you're using this as a layers model. we only have the graph model on TF Hub. You can continue to use this for now, or alternatively you can find the activation in the graph model you load from TF Hub. Either is fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nsthorat - oh! excellent note. Thank you for pointing this out. Once we get ml5 up to tf1.0+ we can go through and make sure to switch over asap. Thanks so much!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nsthorat -

oh, apologies, you're using this as a layers model. we only have the graph model on TF Hub. You can continue to use this for now, or alternatively you can find the activation in the graph model you load from TF Hub. Either is fine.

  • Noted! Thank you. Good to know there are options :)

@joeyklee
Copy link
Contributor

Hi All! Just to communicate what's on my plan regarding Tensorflow update to 1.0:
I think it makes sense to:

  1. merge as many PRs for new and incoming ml5 models
  2. then systematically update tensorflow versions as mentioned: Upgrade tf.js dependency to 1.0Β #333 (comment)

There are a number of PRs that won't be affected by the new TF version, so I think those can be added as we go along.

@joeyklee
Copy link
Contributor

@WenheLI - Alrighty! So I've taken a chance now to look at the updates and actually it seems your PR covers most of the issues! Super cool.

I've started a list of examples I've tested against the ml5 version using tf1.0.2 and it seems we have some things that are broken. We know that SketchRNN is not working, but there's a few other examples that are broken.

Do you mind having a look to see if you might be able to resolve some of these errors that are shown here: ml5js/ml5-examples#128

I will also have a look! Thanks!

@joeyklee
Copy link
Contributor

joeyklee commented Apr 26, 2019

Re SketchRNN:

UPDATE 2019/05/14: magenta-js/sketch 0.2.0 is now using tfjs 1.0.2 :)

@WenheLI
Copy link
Member Author

WenheLI commented Apr 26, 2019

@joeyklee Sure! I can try to solve some of these errors. Maybe I can take a look at KNNClassification first.

@joeyklee
Copy link
Contributor

@joeyklee Sure! I can try to solve some of these errors. Maybe I can take a look at KNNClassification first.

  • Excellent. Your PR is so helpful to get an overview of all those changes that need to be made. I think we can make the update pretty soon!
  • We might also try to look into the SketchRNN stuff... it would be great to not lose this feature! πŸ€ͺ

@nsthorat
Copy link
Contributor

Please let me know if there are any issues with the update or you need any assistance!

@joeyklee
Copy link
Contributor

Please let me know if there are any issues with the update or you need any assistance!

Thanks @nsthorat - It seems most of our examples are working. I have a feeling that the biggest question mark is to address the broken SketchRNN issue with magenta. More details soon! Thanks so much for keeping an eye on this issue :)

@joeyklee
Copy link
Contributor

@WenheLI - I hope you're well. Just a quick check-in to see if you might have had a chance to look into any of the breaking changes by chance. I will continue looking into things this week! Thanks!

@WenheLI
Copy link
Member Author

WenheLI commented May 13, 2019

@joeyklee Sorry Joey, I am in a busy final week right now. I will look into them after Wednesday!

@joeyklee
Copy link
Contributor

@joeyklee Sorry Joey, I am in a busy final week right now. I will look into them after Wednesday!

No problem! Good luck with your exams + projects! We can touch base again whenever you're feeling ready. Thanks!

@joeyklee
Copy link
Contributor

joeyklee commented May 14, 2019

Hi All, just a quick update from my side, I've made a PR to magenta-js for an update to SketchRNN to use tfjs 1.0.2. Fingers crossed :) magenta/magenta-js#310

UPDATE: yay! magenta-js/sketch is now using tfjs 1.0.2! ✨ - Make sure to update magenta-js npm dependency to the version upgrade!!! ==> see: https://github.com/ml5js/ml5-library/tree/update-tfjs-102

@joeyklee
Copy link
Contributor

joeyklee commented May 14, 2019

@WenheLI - I took a moment now to look at the KNNclassifier - (currently working on this branch: https://github.com/ml5js/ml5-library/tree/update-tfjs-102) and it looks like what is broken at the moment is that .infer() is not a part of this.mobilenet.

I think this has something to do with the way that we are getting mobilenet at:

async loadModel() {
    this.mobilenet = await tf.loadLayersModel(`${BASE_URL}${this.version}_${this.alpha}_${IMAGE_SIZE}/model.json`);

...

if we bring in mobilenet as we previously did, then the infer() method is still attached to the mobilenet object:

e.g. this.test = await mobilenet.load(this.version, this.alpha);

Screen Shot 2019-05-14 at 17 21 45

Screen Shot 2019-05-14 at 17 25 21

Maybe this helps?

Update: And actually if we do this, if kind of works using this example: https://github.com/ml5js/ml5-examples/tree/release/p5js/KNNClassification/KNNClassification_Video

import * as mobilenet from '@tensorflow-models/mobilenet';

...

class Mobilenet {
  constructor(options, callback) {
    this.mobilenet = null;
    this.test = null

...


 async loadModel() {
    this.mobilenet = await tf.loadLayersModel(`${BASE_URL}${this.version}_${this.alpha}_${IMAGE_SIZE}/model.json`);
    console.log("--------- NEW way of adding mobilenet ------")
    console.log(this.mobilenet)
    const layer = this.mobilenet.getLayer(this.layer);
    
    console.log("--------- OLD way of adding mobilenet ------")
    this.test = await mobilenet.load(this.version, this.alpha);
    console.log(this.test)

...

infer(input, endpoint) {

    ...

    return this.test.infer(imgToPredict, endpointToPredict);
  }

@WenheLI
Copy link
Member Author

WenheLI commented May 14, 2019

@joeyklee - I see where the problem is! If we use the previous way, we imported a Mobilenet class with a graph model(in the previous tfjs version, it comes with a layer model), and it is the class coming with classify, infer, and load functions. See the link.

While in our implementation right now, I import the Mobilenet as a single layer model(as the Feature Extractor is using the layer model). In this way, we are missing the helper functions inside the Mobilenet class. I will take a closer look tomorrow!

@joeyklee
Copy link
Contributor

joeyklee commented May 14, 2019

@joeyklee - I see where the problem is! If we use the previous way, we imported a Mobilenet class with a graph model(in the previous tfjs version, it comes with a layer model), and it is the class coming with classify, infer, and load functions. See the link.

While in our implementation right now, I import the Mobilenet as a single layer model(as the Feature Extractor is using the layer model). In this way, we are missing the helper functions inside the Mobilenet class. I will take a closer look tomorrow!

@WenheLI
Copy link
Member Author

WenheLI commented May 16, 2019

@joeyklee - Hi, Joey, I was looking into the KNN examples and I found there is an error about magnet/sketch. Below is the screenshot.
image
Below is the source code for the error.
image

It seems to be an internal problem with magenta, can you have a check if it is the same with your environment?
The code is downloaded directly from the https://github.com/ml5js/ml5-library/tree/update-tfjs-102. And I did not make any modification yet. Might be a problem of dependencies?

@joeyklee
Copy link
Contributor

joeyklee commented May 16, 2019

@joeyklee - Hi, Joey, I was looking into the KNN examples and I found there is an error about magnet/sketch. Below is the screenshot.
image
Below is the source code for the error.
image

It seems to be an internal problem with magenta, can you have a check if it is the same with your environment?
The code is downloaded directly from the https://github.com/ml5js/ml5-library/tree/update-tfjs-102. And I did not make any modification yet. Might be a problem of dependencies?

  • Hmm strange. I don't have the same errors. I also did a fresh clone of the repo using the update-tfjs-102 branch and ran npm install && npm start and did not receive any errors when examining the examples.
git clone -b update-tfjs-102 https://github.com/ml5js/ml5-library.git
  • Maybe rm node_modules and npm install again? Also make sure to clear the browser cache?

@WenheLI
Copy link
Member Author

WenheLI commented May 16, 2019

@joeyklee - Hi, Joey, I was looking into the KNN examples and I found there is an error about magnet/sketch. Below is the screenshot.
image
Below is the source code for the error.
image
It seems to be an internal problem with magenta, can you have a check if it is the same with your environment?
The code is downloaded directly from the https://github.com/ml5js/ml5-library/tree/update-tfjs-102. And I did not make any modification yet. Might be a problem of dependencies?

  • Hmm strange. I don't have the same errors. I also did a fresh clone of the repo using the update-tfjs-102 branch and ran npm install && npm start and did not receive any errors when examining the examples.
  • Maybe rm node_modules and npm install again? Also make sure to clear the browser cache?
  • It turned out to be a cache from npm side. It works right now.
  • Right now, I am trying to bring back the Mobilenet class. Thus, I need to deal with the activations for this.mobilenetFeatures in loadModel. Currently, I am thinking extract layer information from graph nodes and reconstruct essential layers for it. It is kind like a detour, do you have any better implementation/ideas?

@joeyklee
Copy link
Contributor

@WenheLI

It turned out to be a cache from npm side. It works right now.

  • excellent! thanks for checking that.

Right now, I am trying to bring back the Mobilenet class. Thus, I need to deal with the activations for this.mobilenetFeatures in loadModel. Currently, I am thinking extract layer information from graph nodes and reconstruct essential layers for it. It is kind like a detour, do you have any better implementation/ideas?

  • hmm interesting proposition. I'm not exactly sure at the moment, but I will also keep digging around. I'm wondering, did the KNN have to change from the previous implementation?

@WenheLI
Copy link
Member Author

WenheLI commented May 16, 2019

From what I invested so far, by changing the mobile net class under featureExtractor, we can fix most of the problems for KNN. Thus, I don't think we need to change KNN at this moment.

@joeyklee
Copy link
Contributor

joeyklee commented May 16, 2019

@WenheLI - Alrighty! As now all of the major ml5 functions are currently working as of: https://github.com/ml5js/ml5-library/tree/update-tfjs-102 I will now merge this PR #336 into development then subsequently merge in https://github.com/ml5js/ml5-library/tree/update-tfjs-102

Our major tasks to take care before our release will then be:

  1. clean up / fix the hack for getting mobilenet to work β˜‘οΈ
  2. update the functions that are not using tfjs 1.0.2 yet. These include:βœ…
    • CVAEβœ…
    • UNETβœ…
    • Sentiment βœ…
  3. Merge in DCGAN βœ…

Let's do this! Thanks!!

@joeyklee joeyklee merged commit fa21652 into ml5js:development May 16, 2019
@nsthorat
Copy link
Contributor

tf.setPlatform not being defined is likely because of a double import of tfjs (probably from you and then another from magenta).

@joeyklee
Copy link
Contributor

tf.setPlatform not being defined is likely because of a double import of tfjs (probably from you and then another from magenta).

  • Oh! I didn't even think about that. I wonder how we handled this before in the previous ml5 versions. @shiffman @yining1023 might you know about this by chance?

@nsthorat
Copy link
Contributor

Filed an issue: #372

joeyklee added a commit that referenced this pull request May 24, 2019
* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release
joeyklee pushed a commit that referenced this pull request Jun 2, 2019
* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer
joeyklee added a commit that referenced this pull request Jun 2, 2019
* changing vector->word in word2vec results

* added pix2pix class, pix2pix.transfer method, a checkpointsloader for pix2pix model

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve #151 (comment)

* Address #151 (comment)

* Address #151 (comment)

* Address #151 (comment)

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
#244

#244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. #279 (comment)

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in #313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in #313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated readme and package.json with v0.3.1

* add /dist to .gitignore
joeyklee added a commit that referenced this pull request Jun 2, 2019
* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve #151 (comment)

* Address #151 (comment)

* Address #151 (comment)

* Address #151 (comment)

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
#244

#244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. #279 (comment)

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in #313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in #313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated readme and package.json with v0.3.1

* add /dist to .gitignore

* rm dist files
joeyklee added a commit that referenced this pull request Jun 2, 2019
* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release
joeyklee added a commit that referenced this pull request Jun 3, 2019
…re dev (#479)

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve #151 (comment)

* Address #151 (comment)

* Address #151 (comment)

* Address #151 (comment)

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
#244

#244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. #279 (comment)

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in #313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in #313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated package-lock
joeyklee added a commit that referenced this pull request Oct 17, 2019
* Updates dev with release and Removes /dist from past commits and future dev (#479)

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve https://github.com/ml5js/ml5-library/pull/151#discussion_r196475143

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196484426

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196517984

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196518890

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
https://github.com/ml5js/ml5-library/issues/244

https://github.com/ml5js/ml5-library/issues/244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. https://github.com/ml5js/ml5-library/pull/279#issuecomment-465890231

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146450d65aa1ad9f1ef67bf912a792b0d8a0.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated package-lock

* pass vector to dcgan compute

* Adds face-api.js to ml5.js (#482)

* initial commit - add classifyExpressions

* added classifyExpressionsMultiple() and classifyExpressionsSingle()

* remove modelPath requirement in favor of defaults

* updated index with links to tiny landmarks

* adds option to add relative path or absolute url

* updated url checking for models

* changed function names

* updated functions to .detect() and .detectSingle()

* check undefined, otherwise assign

* added resize function to results by default

* code cleanup

* added test to faceapi

* added tests

* added face parts to result.parts

* code cleanup

* changed options from withFaceX to withX

* code cleanup

* code cleanup

* fixed conditional to include face .withFaceDescriptor(s)

* docs: add jepster-dk as a contributor (#489)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xanderjakeq as a contributor (#490)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add catarak as a contributor (#491)

* docs: update README.md

* docs: update .all-contributorsrc

* [WIP]Change p5Utils into a class

* dcgan: use random vector if no latent vector is given

* dcgan check if arg is array

* updated code of conduct with adapted p5 community statement (#492)

* updated code of conduct with adapted p5 community statement

* Update CODE_OF_CONDUCT.md

rm coding train from donation // todo - add other relevant orgs next

Co-Authored-By: Daniel Shiffman <daniel.shiffman@gmail.com>

* updated enforcement with ashley and dan

* rm redundant all contributors badge (#497)

* Readme updates (#505)

* added package.lock

* updates links to latest website

* rm 'with no external deps'

* set correct url to image (#507)

* docs: add dcbriccetti as a contributor (#506)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Sblob1 as a contributor (#513)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* Fu

* add command line arguments for testing single model

* Handling p5 Image in PoseNet singlePose

I have changed singlePose function in order to handle p5 Image types. 

However I'm not sure if the check is thorough enough. Any pointers are welcome.

* Adds ImageData support for all image handling functions (#525)

* added ImageData support to YOLO

* adds ImageData support to UNET

* adds ImageData support to StyleTransfer

* adds ImageData support to PoseNet

* adds ImageData support for ImageClassifier/darknet

* adds ImageData support for ImageClassifier/doodlenet

* adds ImageData support for BodyPix and cleans up conditionals

* adds ImageData support to faceApi and cleans up conditionals

* adds ImageData support for imageclassifier and cleans up conditional

* fix image handling for bodypix faceapi and imageclassifier

* update mobilenet imageData support

* check imagedata in yolo

* adds ImageData test to BodyPix

* adds check for canvas (#526)

* Fixes Posenet input arguments and related issues (#529)

* adds this.multiPose() to else{}

* fixes conditional check on object or string

* added kmeans

* added randomSample function

* re-ordered name placement

* fixed weird indentation error

* indentation

* removed optional keyword in docstring

* updates issue and pull request templates (#530)

* Created config class attribute to store instance params

* Adds release script helper (#534)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* Adds release script helper (#535)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* adds tagging to release:publish

* fixes typo

* added test to kmeans (#536)

* docs: add jwilber as a contributor (#537)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add tezzutezzu as a contributor (#538)

* docs: update README.md

* docs: update .all-contributorsrc

* Update Contributing and Github docs (#539)

* updated issue template:

* update PR template

* added new release how to

* docs: add EmmaGoodliffe as a contributor (#545)

* docs: update README.md

* docs: update .all-contributorsrc

* Update tfjs ~v1.2.2 (#544)

* updated tfjs to 1.2.2 and bumped face-api to 0.20.1

* bump tensorflow models

* bump body-pix version

* adds version 2 to feature extractor

* updated to mobilenetv2 api

* updates to posenet 2 api

* always process and resize images in mobilenet

* update test with version 2

* update posenet inputs and test

* fix issue with params in posenet

* updates conditional in p5Utils

* add loadImage test (#549)

* Update npm helper scripts for making releases (#552)

* updating release process scripts and docs

* updated release proces npm scripts and docs

* added release:sync and developement:sync"
"

* set fe to mobilenet v1 - use layers model (#554)

* Adds Docsify to consolidate documentation (#556)

* add docsify-cli as dev dep

* adds docs structure for docsify

* adds bodyPix documentation example

* update bodypix documentation

* adds imageClassifer docs

* added styleguide template and updated docs

* changed name of reference template

* added dev guidelines

* update dev guidelines

* adds posenet docs

* adds tutorials and faq

* add dev:docs npm script

* adds char rnn to docs

* Adds documentation for references to docsify docs (#557)

* add note on all contributors bot

* adds faceapi header img"

* adds design guidelines

* adds design guidelines to sidebar

* adds section for p5 web editor examples

* adds cvae refs

* update bodypix and charrnn docs

* added dcgan docs

* adds pitch detection docs

* adds featureExtractor docs

* adds knn classifier

* update tutorial refs

* adds pix2pix doc

* adds sentiment docs

* adds sketchrnn ref

* adds sound classifier

* adds styletransfer docs

* adds unet docs

* adds word2vec docs

* adds yolo docs

* adds acknowledgements section

* adds acknowledgements section

* Fixes Doodlenet - set new axes and .floor() (#559)

* change split axis to 3 axes

* use floor() instead of round()

* adds options for detection confidence (#561)

* Adds labels to custom image classification model from Teachable Machine output

* Addressing issue #590 part 1 (#592)
>The saved labels from Teachable Machine should be loaded by ml5. I believe this is working for sound classification, but not for images.

Fetching labels from metadata.json when loading models from the new Teachable Machine.

* docs: add EonYang as a contributor (#593)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lydiajessup as a contributor (#594)

* docs: update README.md

* docs: update .all-contributorsrc

* set alias for sidebar (#598)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* [Docs] Uses gh-pages to serve docsify docs (#599)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* adds header nav to docs

* updates alt text and image url

* adds getting started url

* adds reference index

* updates href to reference in nav (#601)

* [face-api] Removes expressions support from face-api in ml5.js (#602)

* rm faceapi expressions support

* rm expression ref in comment

* updates tests for faceapi

* fixes single detection and tests

* Update docs (#603)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* Revert "Update docs (#603)" (#604)

This reverts commit c6b78d0a7aedc7050a095386ad88300d91a761b2.

* Updates docsify docs (#605)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* rm neural net class from update-docs branch

* moves bodyPix to support preload() (#610)

* Adds preload support to faceApi  (#611)

* moves bodyPix to support preload()

* adds faceapi to preload

* Updates Docs with latest features (#612)

* adds face-api updates and neural network docs updates

* adds docs for nn functions

* adds save and load docs

* adds neural Network documentation

* fixes backticks

* adds sidebar dividers

* adds docs on model loading and contributors (#616)

* Updates gh templates (#617)

* updates PR template

* updates gh issues template

* updates template

* Generic Neural Network class (#485)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds blob reader for json

* [diy nn] moves tf-vis visualizations to helper class (#583)

* adds tfvis to neuralNetworkVis.js

* adds tfvis to class

* handle text and convert to json (#584)

* allow user more control in the case of classification

* allow user more control in the case of classification (#585)

* Refactoring DIY Neural Network (#591)

* [wip] refactoring data handling and logic separation

* wip adding convertRawToTensor

* adds conversion to tensor

* adds normalization step

* adds train()

* adds predictInternal()

* fixes unique value mapping issue

* comment out .print()

* return all regression results

* adds experimental normalizationOptions object

* quick fix for checking if normalizationOptions exists

* commenting out auto tensor printing

* adds checks for normalizationOptions

* fix obj ref in conditional

* adds .normalizeData() - keeps .normalize() for now

* changes whileTraining function when debug is true

* adds layer options for adding more than 2 layers - experimentalgit add .

* remove .normalize() in favor of .normalizeData()

* adds save() and load()

* adds data.warmUp() to allow training without normalization - handled internally on train

* updates outputs of .predict() and .classify() to be array

* Divide by 0 issue when data is not normalized (#596)

* skipping calculating inputMin and inputMax when data not normalized

* adds check for this.data.meta.isNormalized in predictInternal

* Diy nn code cleanup (#606)

* adds input/output checks to specify number or array of input/output names

* moves model creation to training to compile after input and output units have been calcd

* cleanup code in .trainInternal()

* move vars up to top of function in .trainInternal()

* rm model creation from .createModelFromDataInternal()

* code cleanup and adds comments to .initializeIOUnits()

* code cleanup

* [DIY NN] Adds .saveData() and .loadData() (#607)

* adds saveData function

* updates saveData() with input checks

* adds loadData function

* [Diy NN] Adds .predictMultiple() for batch predictions/classifications (#609)

* adds predictMultiple()

* rm ys.print()

* moves bodypix and faceapi to preload support to match base branch

* [DIY nn] Neural Net Fixes loading pre-trained model (#613)

* adds model_meta.json to savedfiles

* adds loading of model_meta.json - temp fix

* use substring method for url checking

* adds check for if input is JSON

* loadData and text variables mixed up (#615)

* [Diy nn] fix model loading load (Work in progress) (#618)

* adds input object as param to .load()

* adds fetch to retrieve data from urls in .load() based on object

* updates object handler

* fixes check for model.json

* fixes parsing and ordering files

* adds fix for p5 web editor - must use explicit json object to load models

* allows user to add video to .segment() and .segmentWithParts() (#619)

* updates unet docs (#620)

* adds basic test for defaults (#621)

* docs: add EmmaGoodliffe as a contributor (#622)

* docs: update README.md

* docs: update .all-contributorsrc

* adds fix for unet image return for p5 (#625)

* updates webpack dev server to 3.1.11 (#629)

* Fixes vulnerabilities noted by npm (#630)

* run npm audit fix

* bumps commitizen dep

* updated readme and readme updater (#632)

* Update NeuralNetwork docs (#631)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

…
joeyklee added a commit that referenced this pull request Nov 4, 2019
…ch (#676)

* ml5 release v0.4.0 (#640)

* Updates dev with release and Removes /dist from past commits and future dev (#479)

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve https://github.com/ml5js/ml5-library/pull/151#discussion_r196475143

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196484426

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196517984

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196518890

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
https://github.com/ml5js/ml5-library/issues/244

https://github.com/ml5js/ml5-library/issues/244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. https://github.com/ml5js/ml5-library/pull/279#issuecomment-465890231

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146450d65aa1ad9f1ef67bf912a792b0d8a0.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated package-lock

* pass vector to dcgan compute

* Adds face-api.js to ml5.js (#482)

* initial commit - add classifyExpressions

* added classifyExpressionsMultiple() and classifyExpressionsSingle()

* remove modelPath requirement in favor of defaults

* updated index with links to tiny landmarks

* adds option to add relative path or absolute url

* updated url checking for models

* changed function names

* updated functions to .detect() and .detectSingle()

* check undefined, otherwise assign

* added resize function to results by default

* code cleanup

* added test to faceapi

* added tests

* added face parts to result.parts

* code cleanup

* changed options from withFaceX to withX

* code cleanup

* code cleanup

* fixed conditional to include face .withFaceDescriptor(s)

* docs: add jepster-dk as a contributor (#489)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xanderjakeq as a contributor (#490)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add catarak as a contributor (#491)

* docs: update README.md

* docs: update .all-contributorsrc

* [WIP]Change p5Utils into a class

* dcgan: use random vector if no latent vector is given

* dcgan check if arg is array

* updated code of conduct with adapted p5 community statement (#492)

* updated code of conduct with adapted p5 community statement

* Update CODE_OF_CONDUCT.md

rm coding train from donation // todo - add other relevant orgs next

Co-Authored-By: Daniel Shiffman <daniel.shiffman@gmail.com>

* updated enforcement with ashley and dan

* rm redundant all contributors badge (#497)

* Readme updates (#505)

* added package.lock

* updates links to latest website

* rm 'with no external deps'

* set correct url to image (#507)

* docs: add dcbriccetti as a contributor (#506)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Sblob1 as a contributor (#513)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* Fu

* add command line arguments for testing single model

* Handling p5 Image in PoseNet singlePose

I have changed singlePose function in order to handle p5 Image types. 

However I'm not sure if the check is thorough enough. Any pointers are welcome.

* Adds ImageData support for all image handling functions (#525)

* added ImageData support to YOLO

* adds ImageData support to UNET

* adds ImageData support to StyleTransfer

* adds ImageData support to PoseNet

* adds ImageData support for ImageClassifier/darknet

* adds ImageData support for ImageClassifier/doodlenet

* adds ImageData support for BodyPix and cleans up conditionals

* adds ImageData support to faceApi and cleans up conditionals

* adds ImageData support for imageclassifier and cleans up conditional

* fix image handling for bodypix faceapi and imageclassifier

* update mobilenet imageData support

* check imagedata in yolo

* adds ImageData test to BodyPix

* adds check for canvas (#526)

* Fixes Posenet input arguments and related issues (#529)

* adds this.multiPose() to else{}

* fixes conditional check on object or string

* added kmeans

* added randomSample function

* re-ordered name placement

* fixed weird indentation error

* indentation

* removed optional keyword in docstring

* updates issue and pull request templates (#530)

* Created config class attribute to store instance params

* Adds release script helper (#534)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* Adds release script helper (#535)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* adds tagging to release:publish

* fixes typo

* added test to kmeans (#536)

* docs: add jwilber as a contributor (#537)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add tezzutezzu as a contributor (#538)

* docs: update README.md

* docs: update .all-contributorsrc

* Update Contributing and Github docs (#539)

* updated issue template:

* update PR template

* added new release how to

* docs: add EmmaGoodliffe as a contributor (#545)

* docs: update README.md

* docs: update .all-contributorsrc

* Update tfjs ~v1.2.2 (#544)

* updated tfjs to 1.2.2 and bumped face-api to 0.20.1

* bump tensorflow models

* bump body-pix version

* adds version 2 to feature extractor

* updated to mobilenetv2 api

* updates to posenet 2 api

* always process and resize images in mobilenet

* update test with version 2

* update posenet inputs and test

* fix issue with params in posenet

* updates conditional in p5Utils

* add loadImage test (#549)

* Update npm helper scripts for making releases (#552)

* updating release process scripts and docs

* updated release proces npm scripts and docs

* added release:sync and developement:sync"
"

* set fe to mobilenet v1 - use layers model (#554)

* Adds Docsify to consolidate documentation (#556)

* add docsify-cli as dev dep

* adds docs structure for docsify

* adds bodyPix documentation example

* update bodypix documentation

* adds imageClassifer docs

* added styleguide template and updated docs

* changed name of reference template

* added dev guidelines

* update dev guidelines

* adds posenet docs

* adds tutorials and faq

* add dev:docs npm script

* adds char rnn to docs

* Adds documentation for references to docsify docs (#557)

* add note on all contributors bot

* adds faceapi header img"

* adds design guidelines

* adds design guidelines to sidebar

* adds section for p5 web editor examples

* adds cvae refs

* update bodypix and charrnn docs

* added dcgan docs

* adds pitch detection docs

* adds featureExtractor docs

* adds knn classifier

* update tutorial refs

* adds pix2pix doc

* adds sentiment docs

* adds sketchrnn ref

* adds sound classifier

* adds styletransfer docs

* adds unet docs

* adds word2vec docs

* adds yolo docs

* adds acknowledgements section

* adds acknowledgements section

* Fixes Doodlenet - set new axes and .floor() (#559)

* change split axis to 3 axes

* use floor() instead of round()

* adds options for detection confidence (#561)

* Adds labels to custom image classification model from Teachable Machine output

* Addressing issue #590 part 1 (#592)
>The saved labels from Teachable Machine should be loaded by ml5. I believe this is working for sound classification, but not for images.

Fetching labels from metadata.json when loading models from the new Teachable Machine.

* docs: add EonYang as a contributor (#593)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lydiajessup as a contributor (#594)

* docs: update README.md

* docs: update .all-contributorsrc

* set alias for sidebar (#598)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* [Docs] Uses gh-pages to serve docsify docs (#599)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* adds header nav to docs

* updates alt text and image url

* adds getting started url

* adds reference index

* updates href to reference in nav (#601)

* [face-api] Removes expressions support from face-api in ml5.js (#602)

* rm faceapi expressions support

* rm expression ref in comment

* updates tests for faceapi

* fixes single detection and tests

* Update docs (#603)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* Revert "Update docs (#603)" (#604)

This reverts commit c6b78d0a7aedc7050a095386ad88300d91a761b2.

* Updates docsify docs (#605)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* rm neural net class from update-docs branch

* moves bodyPix to support preload() (#610)

* Adds preload support to faceApi  (#611)

* moves bodyPix to support preload()

* adds faceapi to preload

* Updates Docs with latest features (#612)

* adds face-api updates and neural network docs updates

* adds docs for nn functions

* adds save and load docs

* adds neural Network documentation

* fixes backticks

* adds sidebar dividers

* adds docs on model loading and contributors (#616)

* Updates gh templates (#617)

* updates PR template

* updates gh issues template

* updates template

* Generic Neural Network class (#485)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds blob reader for json

* [diy nn] moves tf-vis visualizations to helper class (#583)

* adds tfvis to neuralNetworkVis.js

* adds tfvis to class

* handle text and convert to json (#584)

* allow user more control in the case of classification

* allow user more control in the case of classification (#585)

* Refactoring DIY Neural Network (#591)

* [wip] refactoring data handling and logic separation

* wip adding convertRawToTensor

* adds conversion to tensor

* adds normalization step

* adds train()

* adds predictInternal()

* fixes unique value mapping issue

* comment out .print()

* return all regression results

* adds experimental normalizationOptions object

* quick fix for checking if normalizationOptions exists

* commenting out auto tensor printing

* adds checks for normalizationOptions

* fix obj ref in conditional

* adds .normalizeData() - keeps .normalize() for now

* changes whileTraining function when debug is true

* adds layer options for adding more than 2 layers - experimentalgit add .

* remove .normalize() in favor of .normalizeData()

* adds save() and load()

* adds data.warmUp() to allow training without normalization - handled internally on train

* updates outputs of .predict() and .classify() to be array

* Divide by 0 issue when data is not normalized (#596)

* skipping calculating inputMin and inputMax when data not normalized

* adds check for this.data.meta.isNormalized in predictInternal

* Diy nn code cleanup (#606)

* adds input/output checks to specify number or array of input/output names

* moves model creation to training to compile after input and output units have been calcd

* cleanup code in .trainInternal()

* move vars up to top of function in .trainInternal()

* rm model creation from .createModelFromDataInternal()

* code cleanup and adds comments to .initializeIOUnits()

* code cleanup

* [DIY NN] Adds .saveData() and .loadData() (#607)

* adds saveData function

* updates saveData() with input checks

* adds loadData function

* [Diy NN] Adds .predictMultiple() for batch predictions/classifications (#609)

* adds predictMultiple()

* rm ys.print()

* moves bodypix and faceapi to preload support to match base branch

* [DIY nn] Neural Net Fixes loading pre-trained model (#613)

* adds model_meta.json to savedfiles

* adds loading of model_meta.json - temp fix

* use substring method for url checking

* adds check for if input is JSON

* loadData and text variables mixed up (#615)

* [Diy nn] fix model loading load (Work in progress) (#618)

* adds input object as param to .load()

* adds fetch to retrieve data from urls in .load() based on object

* updates object handler

* fixes check for model.json

* fixes parsing and ordering files

* adds fix for p5 web editor - must use explicit json object to load models

* allows user to add video to .segment() and .segmentWithParts() (#619)

* updates unet docs (#620)

* adds basic test for defaults (#621)

* docs: add EmmaGoodliffe as a contributor (#622)

* docs: update README.md

* docs: update .all-contributorsrc

* adds fix for unet image return for p5 (#625)

* updates webpack dev server to 3.1.11 (#629)

* Fixes vulnerabilities noted by npm (#630)

* run npm audit fix

* bumps commitizen dep

* updated readme and readme updater (#632)

* Update NeuralNetwork docs (#631)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] …
joeyklee added a commit that referenced this pull request Nov 6, 2019
* [neural net fix] Merges neural net fix in release to development branch (#676)

* ml5 release v0.4.0 (#640)

* Updates dev with release and Removes /dist from past commits and future dev (#479)

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve https://github.com/ml5js/ml5-library/pull/151#discussion_r196475143

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196484426

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196517984

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196518890

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
https://github.com/ml5js/ml5-library/issues/244

https://github.com/ml5js/ml5-library/issues/244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. https://github.com/ml5js/ml5-library/pull/279#issuecomment-465890231

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146450d65aa1ad9f1ef67bf912a792b0d8a0.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated package-lock

* pass vector to dcgan compute

* Adds face-api.js to ml5.js (#482)

* initial commit - add classifyExpressions

* added classifyExpressionsMultiple() and classifyExpressionsSingle()

* remove modelPath requirement in favor of defaults

* updated index with links to tiny landmarks

* adds option to add relative path or absolute url

* updated url checking for models

* changed function names

* updated functions to .detect() and .detectSingle()

* check undefined, otherwise assign

* added resize function to results by default

* code cleanup

* added test to faceapi

* added tests

* added face parts to result.parts

* code cleanup

* changed options from withFaceX to withX

* code cleanup

* code cleanup

* fixed conditional to include face .withFaceDescriptor(s)

* docs: add jepster-dk as a contributor (#489)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xanderjakeq as a contributor (#490)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add catarak as a contributor (#491)

* docs: update README.md

* docs: update .all-contributorsrc

* [WIP]Change p5Utils into a class

* dcgan: use random vector if no latent vector is given

* dcgan check if arg is array

* updated code of conduct with adapted p5 community statement (#492)

* updated code of conduct with adapted p5 community statement

* Update CODE_OF_CONDUCT.md

rm coding train from donation // todo - add other relevant orgs next

Co-Authored-By: Daniel Shiffman <daniel.shiffman@gmail.com>

* updated enforcement with ashley and dan

* rm redundant all contributors badge (#497)

* Readme updates (#505)

* added package.lock

* updates links to latest website

* rm 'with no external deps'

* set correct url to image (#507)

* docs: add dcbriccetti as a contributor (#506)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Sblob1 as a contributor (#513)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* Fu

* add command line arguments for testing single model

* Handling p5 Image in PoseNet singlePose

I have changed singlePose function in order to handle p5 Image types. 

However I'm not sure if the check is thorough enough. Any pointers are welcome.

* Adds ImageData support for all image handling functions (#525)

* added ImageData support to YOLO

* adds ImageData support to UNET

* adds ImageData support to StyleTransfer

* adds ImageData support to PoseNet

* adds ImageData support for ImageClassifier/darknet

* adds ImageData support for ImageClassifier/doodlenet

* adds ImageData support for BodyPix and cleans up conditionals

* adds ImageData support to faceApi and cleans up conditionals

* adds ImageData support for imageclassifier and cleans up conditional

* fix image handling for bodypix faceapi and imageclassifier

* update mobilenet imageData support

* check imagedata in yolo

* adds ImageData test to BodyPix

* adds check for canvas (#526)

* Fixes Posenet input arguments and related issues (#529)

* adds this.multiPose() to else{}

* fixes conditional check on object or string

* added kmeans

* added randomSample function

* re-ordered name placement

* fixed weird indentation error

* indentation

* removed optional keyword in docstring

* updates issue and pull request templates (#530)

* Created config class attribute to store instance params

* Adds release script helper (#534)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* Adds release script helper (#535)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* adds tagging to release:publish

* fixes typo

* added test to kmeans (#536)

* docs: add jwilber as a contributor (#537)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add tezzutezzu as a contributor (#538)

* docs: update README.md

* docs: update .all-contributorsrc

* Update Contributing and Github docs (#539)

* updated issue template:

* update PR template

* added new release how to

* docs: add EmmaGoodliffe as a contributor (#545)

* docs: update README.md

* docs: update .all-contributorsrc

* Update tfjs ~v1.2.2 (#544)

* updated tfjs to 1.2.2 and bumped face-api to 0.20.1

* bump tensorflow models

* bump body-pix version

* adds version 2 to feature extractor

* updated to mobilenetv2 api

* updates to posenet 2 api

* always process and resize images in mobilenet

* update test with version 2

* update posenet inputs and test

* fix issue with params in posenet

* updates conditional in p5Utils

* add loadImage test (#549)

* Update npm helper scripts for making releases (#552)

* updating release process scripts and docs

* updated release proces npm scripts and docs

* added release:sync and developement:sync"
"

* set fe to mobilenet v1 - use layers model (#554)

* Adds Docsify to consolidate documentation (#556)

* add docsify-cli as dev dep

* adds docs structure for docsify

* adds bodyPix documentation example

* update bodypix documentation

* adds imageClassifer docs

* added styleguide template and updated docs

* changed name of reference template

* added dev guidelines

* update dev guidelines

* adds posenet docs

* adds tutorials and faq

* add dev:docs npm script

* adds char rnn to docs

* Adds documentation for references to docsify docs (#557)

* add note on all contributors bot

* adds faceapi header img"

* adds design guidelines

* adds design guidelines to sidebar

* adds section for p5 web editor examples

* adds cvae refs

* update bodypix and charrnn docs

* added dcgan docs

* adds pitch detection docs

* adds featureExtractor docs

* adds knn classifier

* update tutorial refs

* adds pix2pix doc

* adds sentiment docs

* adds sketchrnn ref

* adds sound classifier

* adds styletransfer docs

* adds unet docs

* adds word2vec docs

* adds yolo docs

* adds acknowledgements section

* adds acknowledgements section

* Fixes Doodlenet - set new axes and .floor() (#559)

* change split axis to 3 axes

* use floor() instead of round()

* adds options for detection confidence (#561)

* Adds labels to custom image classification model from Teachable Machine output

* Addressing issue #590 part 1 (#592)
>The saved labels from Teachable Machine should be loaded by ml5. I believe this is working for sound classification, but not for images.

Fetching labels from metadata.json when loading models from the new Teachable Machine.

* docs: add EonYang as a contributor (#593)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lydiajessup as a contributor (#594)

* docs: update README.md

* docs: update .all-contributorsrc

* set alias for sidebar (#598)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* [Docs] Uses gh-pages to serve docsify docs (#599)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* adds header nav to docs

* updates alt text and image url

* adds getting started url

* adds reference index

* updates href to reference in nav (#601)

* [face-api] Removes expressions support from face-api in ml5.js (#602)

* rm faceapi expressions support

* rm expression ref in comment

* updates tests for faceapi

* fixes single detection and tests

* Update docs (#603)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* Revert "Update docs (#603)" (#604)

This reverts commit c6b78d0a7aedc7050a095386ad88300d91a761b2.

* Updates docsify docs (#605)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* rm neural net class from update-docs branch

* moves bodyPix to support preload() (#610)

* Adds preload support to faceApi  (#611)

* moves bodyPix to support preload()

* adds faceapi to preload

* Updates Docs with latest features (#612)

* adds face-api updates and neural network docs updates

* adds docs for nn functions

* adds save and load docs

* adds neural Network documentation

* fixes backticks

* adds sidebar dividers

* adds docs on model loading and contributors (#616)

* Updates gh templates (#617)

* updates PR template

* updates gh issues template

* updates template

* Generic Neural Network class (#485)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds blob reader for json

* [diy nn] moves tf-vis visualizations to helper class (#583)

* adds tfvis to neuralNetworkVis.js

* adds tfvis to class

* handle text and convert to json (#584)

* allow user more control in the case of classification

* allow user more control in the case of classification (#585)

* Refactoring DIY Neural Network (#591)

* [wip] refactoring data handling and logic separation

* wip adding convertRawToTensor

* adds conversion to tensor

* adds normalization step

* adds train()

* adds predictInternal()

* fixes unique value mapping issue

* comment out .print()

* return all regression results

* adds experimental normalizationOptions object

* quick fix for checking if normalizationOptions exists

* commenting out auto tensor printing

* adds checks for normalizationOptions

* fix obj ref in conditional

* adds .normalizeData() - keeps .normalize() for now

* changes whileTraining function when debug is true

* adds layer options for adding more than 2 layers - experimentalgit add .

* remove .normalize() in favor of .normalizeData()

* adds save() and load()

* adds data.warmUp() to allow training without normalization - handled internally on train

* updates outputs of .predict() and .classify() to be array

* Divide by 0 issue when data is not normalized (#596)

* skipping calculating inputMin and inputMax when data not normalized

* adds check for this.data.meta.isNormalized in predictInternal

* Diy nn code cleanup (#606)

* adds input/output checks to specify number or array of input/output names

* moves model creation to training to compile after input and output units have been calcd

* cleanup code in .trainInternal()

* move vars up to top of function in .trainInternal()

* rm model creation from .createModelFromDataInternal()

* code cleanup and adds comments to .initializeIOUnits()

* code cleanup

* [DIY NN] Adds .saveData() and .loadData() (#607)

* adds saveData function

* updates saveData() with input checks

* adds loadData function

* [Diy NN] Adds .predictMultiple() for batch predictions/classifications (#609)

* adds predictMultiple()

* rm ys.print()

* moves bodypix and faceapi to preload support to match base branch

* [DIY nn] Neural Net Fixes loading pre-trained model (#613)

* adds model_meta.json to savedfiles

* adds loading of model_meta.json - temp fix

* use substring method for url checking

* adds check for if input is JSON

* loadData and text variables mixed up (#615)

* [Diy nn] fix model loading load (Work in progress) (#618)

* adds input object as param to .load()

* adds fetch to retrieve data from urls in .load() based on object

* updates object handler

* fixes check for model.json

* fixes parsing and ordering files

* adds fix for p5 web editor - must use explicit json object to load models

* allows user to add video to .segment() and .segmentWithParts() (#619)

* updates unet docs (#620)

* adds basic test for defaults (#621)

* docs: add EmmaGoodliffe as a contributor (#622)

* docs: update README.md

* docs: update .all-contributorsrc

* adds fix for unet image return for p5 (#625)

* updates webpack dev server to 3.1.11 (#629)

* Fixes vulnerabilities noted by npm (#630)

* run npm audit fix

* bumps commitizen dep

* updated readme and readme updater (#632)

* Update NeuralNetwork docs (#631)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extract…
joeyklee added a commit that referenced this pull request Nov 14, 2019
* [v0.4.2] v0.4.2 (#685)

* [neural net fix] Merges neural net fix in release to development branch (#676)

* ml5 release v0.4.0 (#640)

* Updates dev with release and Removes /dist from past commits and future dev (#479)

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve https://github.com/ml5js/ml5-library/pull/151#discussion_r196475143

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196484426

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196517984

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196518890

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
https://github.com/ml5js/ml5-library/issues/244

https://github.com/ml5js/ml5-library/issues/244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. https://github.com/ml5js/ml5-library/pull/279#issuecomment-465890231

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146450d65aa1ad9f1ef67bf912a792b0d8a0.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated package-lock

* pass vector to dcgan compute

* Adds face-api.js to ml5.js (#482)

* initial commit - add classifyExpressions

* added classifyExpressionsMultiple() and classifyExpressionsSingle()

* remove modelPath requirement in favor of defaults

* updated index with links to tiny landmarks

* adds option to add relative path or absolute url

* updated url checking for models

* changed function names

* updated functions to .detect() and .detectSingle()

* check undefined, otherwise assign

* added resize function to results by default

* code cleanup

* added test to faceapi

* added tests

* added face parts to result.parts

* code cleanup

* changed options from withFaceX to withX

* code cleanup

* code cleanup

* fixed conditional to include face .withFaceDescriptor(s)

* docs: add jepster-dk as a contributor (#489)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xanderjakeq as a contributor (#490)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add catarak as a contributor (#491)

* docs: update README.md

* docs: update .all-contributorsrc

* [WIP]Change p5Utils into a class

* dcgan: use random vector if no latent vector is given

* dcgan check if arg is array

* updated code of conduct with adapted p5 community statement (#492)

* updated code of conduct with adapted p5 community statement

* Update CODE_OF_CONDUCT.md

rm coding train from donation // todo - add other relevant orgs next

Co-Authored-By: Daniel Shiffman <daniel.shiffman@gmail.com>

* updated enforcement with ashley and dan

* rm redundant all contributors badge (#497)

* Readme updates (#505)

* added package.lock

* updates links to latest website

* rm 'with no external deps'

* set correct url to image (#507)

* docs: add dcbriccetti as a contributor (#506)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Sblob1 as a contributor (#513)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* Fu

* add command line arguments for testing single model

* Handling p5 Image in PoseNet singlePose

I have changed singlePose function in order to handle p5 Image types. 

However I'm not sure if the check is thorough enough. Any pointers are welcome.

* Adds ImageData support for all image handling functions (#525)

* added ImageData support to YOLO

* adds ImageData support to UNET

* adds ImageData support to StyleTransfer

* adds ImageData support to PoseNet

* adds ImageData support for ImageClassifier/darknet

* adds ImageData support for ImageClassifier/doodlenet

* adds ImageData support for BodyPix and cleans up conditionals

* adds ImageData support to faceApi and cleans up conditionals

* adds ImageData support for imageclassifier and cleans up conditional

* fix image handling for bodypix faceapi and imageclassifier

* update mobilenet imageData support

* check imagedata in yolo

* adds ImageData test to BodyPix

* adds check for canvas (#526)

* Fixes Posenet input arguments and related issues (#529)

* adds this.multiPose() to else{}

* fixes conditional check on object or string

* added kmeans

* added randomSample function

* re-ordered name placement

* fixed weird indentation error

* indentation

* removed optional keyword in docstring

* updates issue and pull request templates (#530)

* Created config class attribute to store instance params

* Adds release script helper (#534)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* Adds release script helper (#535)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* adds tagging to release:publish

* fixes typo

* added test to kmeans (#536)

* docs: add jwilber as a contributor (#537)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add tezzutezzu as a contributor (#538)

* docs: update README.md

* docs: update .all-contributorsrc

* Update Contributing and Github docs (#539)

* updated issue template:

* update PR template

* added new release how to

* docs: add EmmaGoodliffe as a contributor (#545)

* docs: update README.md

* docs: update .all-contributorsrc

* Update tfjs ~v1.2.2 (#544)

* updated tfjs to 1.2.2 and bumped face-api to 0.20.1

* bump tensorflow models

* bump body-pix version

* adds version 2 to feature extractor

* updated to mobilenetv2 api

* updates to posenet 2 api

* always process and resize images in mobilenet

* update test with version 2

* update posenet inputs and test

* fix issue with params in posenet

* updates conditional in p5Utils

* add loadImage test (#549)

* Update npm helper scripts for making releases (#552)

* updating release process scripts and docs

* updated release proces npm scripts and docs

* added release:sync and developement:sync"
"

* set fe to mobilenet v1 - use layers model (#554)

* Adds Docsify to consolidate documentation (#556)

* add docsify-cli as dev dep

* adds docs structure for docsify

* adds bodyPix documentation example

* update bodypix documentation

* adds imageClassifer docs

* added styleguide template and updated docs

* changed name of reference template

* added dev guidelines

* update dev guidelines

* adds posenet docs

* adds tutorials and faq

* add dev:docs npm script

* adds char rnn to docs

* Adds documentation for references to docsify docs (#557)

* add note on all contributors bot

* adds faceapi header img"

* adds design guidelines

* adds design guidelines to sidebar

* adds section for p5 web editor examples

* adds cvae refs

* update bodypix and charrnn docs

* added dcgan docs

* adds pitch detection docs

* adds featureExtractor docs

* adds knn classifier

* update tutorial refs

* adds pix2pix doc

* adds sentiment docs

* adds sketchrnn ref

* adds sound classifier

* adds styletransfer docs

* adds unet docs

* adds word2vec docs

* adds yolo docs

* adds acknowledgements section

* adds acknowledgements section

* Fixes Doodlenet - set new axes and .floor() (#559)

* change split axis to 3 axes

* use floor() instead of round()

* adds options for detection confidence (#561)

* Adds labels to custom image classification model from Teachable Machine output

* Addressing issue #590 part 1 (#592)
>The saved labels from Teachable Machine should be loaded by ml5. I believe this is working for sound classification, but not for images.

Fetching labels from metadata.json when loading models from the new Teachable Machine.

* docs: add EonYang as a contributor (#593)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lydiajessup as a contributor (#594)

* docs: update README.md

* docs: update .all-contributorsrc

* set alias for sidebar (#598)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* [Docs] Uses gh-pages to serve docsify docs (#599)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* adds header nav to docs

* updates alt text and image url

* adds getting started url

* adds reference index

* updates href to reference in nav (#601)

* [face-api] Removes expressions support from face-api in ml5.js (#602)

* rm faceapi expressions support

* rm expression ref in comment

* updates tests for faceapi

* fixes single detection and tests

* Update docs (#603)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* Revert "Update docs (#603)" (#604)

This reverts commit c6b78d0a7aedc7050a095386ad88300d91a761b2.

* Updates docsify docs (#605)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* rm neural net class from update-docs branch

* moves bodyPix to support preload() (#610)

* Adds preload support to faceApi  (#611)

* moves bodyPix to support preload()

* adds faceapi to preload

* Updates Docs with latest features (#612)

* adds face-api updates and neural network docs updates

* adds docs for nn functions

* adds save and load docs

* adds neural Network documentation

* fixes backticks

* adds sidebar dividers

* adds docs on model loading and contributors (#616)

* Updates gh templates (#617)

* updates PR template

* updates gh issues template

* updates template

* Generic Neural Network class (#485)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds blob reader for json

* [diy nn] moves tf-vis visualizations to helper class (#583)

* adds tfvis to neuralNetworkVis.js

* adds tfvis to class

* handle text and convert to json (#584)

* allow user more control in the case of classification

* allow user more control in the case of classification (#585)

* Refactoring DIY Neural Network (#591)

* [wip] refactoring data handling and logic separation

* wip adding convertRawToTensor

* adds conversion to tensor

* adds normalization step

* adds train()

* adds predictInternal()

* fixes unique value mapping issue

* comment out .print()

* return all regression results

* adds experimental normalizationOptions object

* quick fix for checking if normalizationOptions exists

* commenting out auto tensor printing

* adds checks for normalizationOptions

* fix obj ref in conditional

* adds .normalizeData() - keeps .normalize() for now

* changes whileTraining function when debug is true

* adds layer options for adding more than 2 layers - experimentalgit add .

* remove .normalize() in favor of .normalizeData()

* adds save() and load()

* adds data.warmUp() to allow training without normalization - handled internally on train

* updates outputs of .predict() and .classify() to be array

* Divide by 0 issue when data is not normalized (#596)

* skipping calculating inputMin and inputMax when data not normalized

* adds check for this.data.meta.isNormalized in predictInternal

* Diy nn code cleanup (#606)

* adds input/output checks to specify number or array of input/output names

* moves model creation to training to compile after input and output units have been calcd

* cleanup code in .trainInternal()

* move vars up to top of function in .trainInternal()

* rm model creation from .createModelFromDataInternal()

* code cleanup and adds comments to .initializeIOUnits()

* code cleanup

* [DIY NN] Adds .saveData() and .loadData() (#607)

* adds saveData function

* updates saveData() with input checks

* adds loadData function

* [Diy NN] Adds .predictMultiple() for batch predictions/classifications (#609)

* adds predictMultiple()

* rm ys.print()

* moves bodypix and faceapi to preload support to match base branch

* [DIY nn] Neural Net Fixes loading pre-trained model (#613)

* adds model_meta.json to savedfiles

* adds loading of model_meta.json - temp fix

* use substring method for url checking

* adds check for if input is JSON

* loadData and text variables mixed up (#615)

* [Diy nn] fix model loading load (Work in progress) (#618)

* adds input object as param to .load()

* adds fetch to retrieve data from urls in .load() based on object

* updates object handler

* fixes check for model.json

* fixes parsing and ordering files

* adds fix for p5 web editor - must use explicit json object to load models

* allows user to add video to .segment() and .segmentWithParts() (#619)

* updates unet docs (#620)

* adds basic test for defaults (#621)

* docs: add EmmaGoodliffe as a contributor (#622)

* docs: update README.md

* docs: update .all-contributorsrc

* adds fix for unet image return for p5 (#625)

* updates webpack dev server to 3.1.11 (#629)

* Fixes vulnerabilities noted by npm (#630)

* run npm audit fix

* bumps commitizen dep

* updated readme and readme updater (#632)

* Update NeuralNetwork docs (#631)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

…
joeyklee added a commit that referenced this pull request Nov 14, 2019
* [devops] Merges fixes in release to development (#698)

* [v0.4.2] v0.4.2 (#685)

* [neural net fix] Merges neural net fix in release to development branch (#676)

* ml5 release v0.4.0 (#640)

* Updates dev with release and Removes /dist from past commits and future dev (#479)

* Remove unnecessary tf.tidy call

* Implement (err, value) callback style, add test for LSTMGenerator

* Callbackify Mobilenet.classify and Mobilenet.regressor

* Add events dep

* add travis.yml

* remove circleci

* removing test script

* removing package-lock.json

* update yarn.lock

* set up browserstack

* snapshot

* yarn test-travis from .travis.yml

* chmod +x trest-travis

* shebang

* bs launcher

* access key

* add a log

* kick travis

* snapshot

* change browserstack env names

* Added Browserstack badge

* Resolve https://github.com/ml5js/ml5-library/pull/151#discussion_r196475143

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196484426

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196517984

* Address https://github.com/ml5js/ml5-library/pull/151#discussion_r196518890

* Add license to callCallback, return this from ImageClassifier#loadModel

* Add mocha reporter back, try to make classes thenable

* Update karma configuration

- Fixes a weird bug where tensors were spuriously disposed by tfjs in testing environment due to there being multiple tfjs instances present on the page from the different builds
- Improves stack traces to make debugging easier by disabling minification in karma webpack.
- Only webpack the main package, this means that the test files have to use the global ml5 object.

* Add tests for Word2Vec

- validates that there are no leaked tensors
- validates basic functionality of nearest
- validates that add, subtract and average return things

- Fixes memory leaks in add, subtract, average, and addOrSubtract functions
- Adds a general dispose to the Word2Vec class

* Remove console.log

* Add an easy way to run test suite once

* Handle rejected promises

* fix eslint errors in lstm and w2v

* Support for callbacks in word2vec and fix tests.
Moved the YOLO weights to the examples repo.
Fix eslint in some files

* Add tests to imageclassifier
fix video issue in imageclassifier

* - Add test for YOLO
- Add test for Imageclassifier
- Resize img if necessary in utils

* - Add license to test files
- Style transfer test
- remove .test file in posenet

* - Update poseNet version to 0.1.3
- Add posnet test

* test commit

* - Fix issues in imageclassifier

* - update pitch detection to #158
- fix event emmiter in posenet
- fix constructor in yolo
- async video util

* temp fix to test leak

* Fix posenet on video ready

* refactor pix2pix to support promises

* support promise when create a new styletransfer method

* bump to version 0.1.0

* bump to 0.1.1

* update readme

* clarification and formatting changes to ensure steps are easy to follow

* ImageClassifier: predict: handle unsupported input

* add proper attributions for models

* Update index.js

* fix eslint for links

* Update index.js

* Update index.js

* Update index.js

* Update README.md (#207)

* Support canvas elements and canvases from p5.js in ImageClassifier (#206)

* Bugfix: PitchDetection returning the wrong pitch (#187)

When converted to the current syntax, the operation was the wrong way around.
See https://github.com/marl/crepe/blob/gh-pages/crepe.js#L141 for the original.

*  fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video) (#191)

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with v

* fix(addImage, classify, predict): now featureExtractor works with images (it was working only with video

* added darknet reference and darknet tiny classifiers (#201)

* added darknet reference and darknet tiny classifiers

* fixed linting stuff

* edits..

* edits2.0

* clean comments

* SketchRNN  (#189)

* init sketchrnn

* strokes

* add models

* stylefixes

* some more bugfixes

* comments

* update dependencies

* Load and save a custom model created with FeatureExtractor  (#219)

* load and save feature extractor model

* update learning rate

* add string an callback

* KNN Classifier (#171)

* added KNNClassifier class, and getFeatures method in ImageClassifier

* added knnclassifer.loaddataset, and savedataset from/as json file

* added featureExtractor.infer() to take in p5 videoelement

* support callback, and add 'label' for each class

* added getClassExampleCountByLabel, support label when save/load dataset

* update function naming, predictClass to classify, classLabel to label

* updates to way of handling strokes (#228)

* Fixing up SketchRNN (#232)

* Code of Conduct (#225)

Just noticing we don't have a code of conduct so adding to the main library repo (we can discuss whether we should put this across all repos -- probably, yes?) This is the [Contributor Covenant](https://www.contributor-covenant.org/).

* saving feature extrctor model with ml5Specs (#233)

* Stateful LSTM (#234)

* allow passing in of lstm state c and h. return more lstm info (c, h, probabilities)

* fix LSTM Stateful ness and other tweaks

* LSTM probabilities class property

* remove weird ind<100 check

* remove unnessecary initCells

* add LSTM methods state getter, setter and reset

* rename to charRNN and update stateful to match discussed api

* add callback to feed

* fix bug in predict

* adding new probabilites object

* new build

* Additional arguments option for SketchRNN (#237)

* Fixing up SketchRNN

* arguments fix for SketchRNN interactive

* adding build

* update version

* KNN update (#256)

* let knn.addExample() and classify() accept a plain array as input

* simplify and shorten knn api function names

* rename a variable in clearlabel()

* knn.save checks if file name has .json

* remove timestamp in the filename for .save()

* update package-loack to fix travis test on node 10

* update yarn lock

* fix - adds callback support for single functions in posenet re: #244 (#254)

* fix(adds callback support for single functions in posenet https://github.com/ml5js/ml5-library/issue

adds callback support for single functions in posenet
https://github.com/ml5js/ml5-library/issues/244

https://github.com/ml5js/ml5-library/issues/244

* rm package-lock.json

* fix(PoseNet/index.js): Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244

Add support for PoseNet `.singlePose()` & `.multiPose()` callback #244 & updated callback error
handling

#244

* rm error check when returning callback in posenet singlePose & multiPose

* fixed indentation

* temp rm cb function

* added cb function back in

* added yarn and package lock

* added lock files from ml5 master

* updating to version 0.2.0 (#264)

* V0.2.1 Tagged Release (#267)

* updating to version 0.2.0

* run build process and built lib

* Release v0.2.1 - npm publish issue

* added github issue template (#275)

* add different ways of including ml5js on the HTML header (#268)

(We will follow up and update the version to the latest which is v0.2.1)

* updated readme specifying versions for lib (#282)

* fix: Use Blobs to save files of larger sizes (#271)

* fix: Use Blobs to save files of larger sizes

fix #270

* use saveBlob() to save knn models, delete io.saveFile(), because saveBlob does the same thing and can handle big files

* Show the version number of the library. (#283)

Adds the library version from the package.json for each build.

* fix issue that server fails to listen dev folder (#287)

*     feat(KNNClassifier): Add loadData() that enables user to load dat… (#279)

*     feat(KNNClassifier): Add loadData() that enables user to load dataset from raw data instead of file

    With load(), file path needs to be provided to load dataset. This means that JSON file that has
    dataset needs to be located on the server. You can give a way to download dataset using save(), but
    you cannot give a way to upload that file and load the dataset. This commit adds loadData() that
    enables user to load dataset from raw data. By combining this method and <INPUT type="file"> tag,
    you can give a way for user to upload dataset file.

* Merge load(path, callback) and loadData(data, callback) into load(pathOrJson, callback).

* Merge load() and loadData() in a cleaner way without using Symbol.

Ref. https://github.com/ml5js/ml5-library/pull/279#issuecomment-465890231

* feat(src/PoseNet/index.js): Ability to access parts of pose by name.

Now can simply do pose.nose.x or pose.nose.confidence. Using original PoseNet naming scheme (i.e.
rightShoulder).

re #245

* Update ImageClassifier and FeatureExtractor to return [{label, confidence}] (#292)

* change imageClassifier.predict() to classify(), keep predict until later version

* update imageclassifier.classify results to [{label: .., confidence: ..}]

* update featureExtractor regressor return {value: 0-1}

* update featureextractor.classify to return [{label, confidence}]

* Support p5 preload with ml5 functions (#288)

* support p5 preload with ml5 functions

* make withPreload object clean

* an automatic script to initialize experiments dir (#295)

* an alternative way to test with experiments dir

* revert change for webpack.dev

* Change experiments to manual-test

* rename folder to manual-test

* update .gitignore

* patch style transfer for non-square and canvas-derived inputs (#311)

* fix preload bugs (#305)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* Release v0.2.2 πŸŽ‰ (#331)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Hi! I noticed that the changes made here: https://github.com/ml5js/ml5-library/pull/295 have not made their way into the documentation! (#318) (#319)

* Updated issues template and added PR template (#315)

* added github issue template

* updated issue template

* updated ISSUE_TEMPLATE with friendlier wording and structure

* added pr template

* added branch notes

* Updated CONTRIBUTING.md with npm run manual-test

* Add tests to CharRNN (#307) (#320)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Updated CONTRIBUTING docs and README (#322)

* updated readme specifying versions for lib

* added documentation to contributing.md

* added updates

* added label and confidence as output for yolo results (#316)

* added label and confidence as output

* updates yolo test to use label instead of className

* Increase test timeout (#321)

* added label and confidence as output

* updates yolo test to use label instead of className

* set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms

* Merges in https://github.com/ml5js/ml5-library/pull/313 via master using deprecating-master branch (#323)

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* added v0.2.2 to package.json in anticipation of new release

* Fixing an issue with prettier and eslint (#324)

* Fixing an issue with prettier and eslint

There is a conflict between arrow syntax rules in airbnb eslint
configuration and the way default prettier works in VSCode. These
additional setting should help anyone using VSCode with autoformat +
prettier to not run into problems building the library.

I am open to better ways of handling this of course!

(Note the changes in ImageClassifier are trivial and just testing).

* adding eslint-config-prettier as dev dependency

* trivial change to run tests again

* Adjust charrnn test option length (#326)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* Adjust charrnn length - comment 2nd test for now (#329)

* changed 500 to 100 to shorted test time

* fixed .tobe() to match option

* changed vocab size to 64

* changed timeout to 12000

* comment out second charRNN test for now to allow merging PRs

* Forcing magenta dependency to 0.1.2 (#328)

The SketchRNN example doesn't work with more recent magenta (0.1.4)
probably due to us lagging behind in versions of tf.js?

* SketchRNN creation function should be lowercase (#325)

This is related to the discussion in #297.

* added v0.2.2 to package.json in anticipation of new release (#330)

hooray adding release v0.2.2

* added latest v0.2.2

* Some minor README adjustments (#334)

* I am de-emphasizing `@latest` as in my experience this can lead to confusion.
* I don't think my name needs to be referenced!

* V0.2.3 (#341)

* ran npm install, added new package json version, and built dist

* updated package lock

* updated package lock and ran build

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* 🌈 New Release: ml5.js v0.3.0 πŸŽ‰ (#386)

* add ImageData as valid image type

* add CVAE

* add latent dim

* add random generate

* fix p5Image support

* fix CVAE parameter

* Added a parameter to the save function so that it is possible to add a custom filename to the model that is saved.

* Unet fix (#357)

Add uNet model and additional fixes

- adds uNet model from @zaidalyafeai ✨
- adds preload() for uNet
- uses loadImage on window.loadImage vs. window.p5.loadImage

* Added sentiment analysis (#339)

* Added sentiment analysis

* delete files

* fixed issues for pull request

* add p5 utils (#358)

* fix charRNN tests (#349)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* Add tests to CharRNN (#307)

* add tests to CharRNN

* test(CharRNN): add tests to CharRNN

added descriptive tests to ensure CharRNN behaves like its example

* remove dist

* check preload support for other nets and classifiers (#313)

Adds specified nets to support preload // TODO: add examples showing appropriate use of preload

* change CharRNN specs to meet time limit, add initial code for videoClassifier

* videoClassifier functioning

* charRNN functional

* fix out of date file

* add preload support for cvae (#360)

* Update TensorFlow.js to 1.0.2 (#336)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* Adds fixes to PR #332 for tfjs 1.0.2 updates (#366)

* upgrade to tfjs1.0.0

* fix loadModel

* fix buffer

* fix getLayer

* updated package lock

* added @tensorflow/tfjs-core as dependency

* add graphmodel for infer (#365)

* Add DCGAN Model into ml5 (#351)

* Create index.js

* updated index.js and DCGAN/index.js

* DCGAN updates and fixes (#362)

* Create index.js

* fixed DCGAN errors

* updates p5Utils destructuring, fixes linting issues, and updates tfjs to 1.0.2 to match dcgan reqs

* fixed cvae

* use this.model instead of using model as param to this.compute()

* Makes UNET compatible with tfjs 1.0.2 (#367)

* added package-lock

* updated UNET for use with tfjs 1.0.2

* Makes Sentiment compatible with tfjs 1.0.2 (#368)

* added package-lock

* rm sentiment-node

* changed loadModel to loadLayersModel

* Makes CVAE compatible with tfjs 1.0.2 (#369)

* added package-lock

* updates cvae to tfjs 1.0.2 api

* update tfjs to 1.1.2 (#373)

* featureExtractor: accept HTML canvas or p5 canvas when addImage(), classify() or predict()

* fix: KNNClassifier accepts a number as class index when addExample(features, number)

* added check for moz browser ref:https://stackoverflow.com/questions/48623376/typeerror-capturestream-is-not-a-function (#375)

This addresses the video capture breaking in YOLO and potentially other video based functions that require the use of .captureStream(). As the .captureStream() function is still experimental, this adds the moz prefix and a browser check to see if we are using firefox or not.

* rm todo

* updated package-lock.json

* Adds label number option to featureExtractor.classification()  (#376)

* changed numClasses to numLabels

* added num label as option to classification()

* updated FeatureExtractor Test with numLabels

* adds object as param to .classificaiton()

* moved options into this.config

* fix feature extractor test - add .config

* added pose:poseWithParts into .singlePose() (#381)

* Adds jsdoc inline-documentation - work in progress (#378)

* added jsdoc documentation for imageClassifier

* adds dcgan documentation - needs checking

* Add jsdoc (#382)

* Add jsdocs for CharRNN

* Add jsdocs for CVAE

* Add jsdocs for FeatureExtractor

* Add jsdocs for KNN

* Add jsdocs for PitchDetection

* Add jsdocs for Pix2pix

* Add jsdocs for posenet

* Add jsdocs for Sentiment

* Add jsdocs for styletransfer

* add linebreaks to long lines

* added basic docs to sketchRnn

* added basic docs to unet

* added basic docs to word2vec

* added basic yolo docs

* Adds V0.3.0 to package.json and Readme for new release (#385)

* changed package.json to v0.3.0

* added latest version reference in readme

* added lib min - will remove after this release

* added ml5.imageClassifier(doodleNet)

* doodlenet: transfer input img to black white image

* warm up model, comments

* added ml5.soundClassifier(speech-command)

* Revert "added ml5.soundClassifier(speech-command)"

This reverts commit 317c146450d65aa1ad9f1ef67bf912a792b0d8a0.

* update darknet link to use jsdelivr instead (#391)

* changed cdn link to doodlenet model (#390)

* adding ml5.soundClassifier(speech-commands) (#389)

* added ml5.soundClassifier(speech-commands)

* not require fs node module for testing

* Reuse getTopKClasses in doodlenet, darkneet and speech-commands

* fix: getTopKClasses return className and probability

* DCGAN refactor + preload (#398)

* restructure dcgan to accept path to manifest.json

* added check for absolute or relative url path

* rm console.log

* added DEFAULT if modelPath is null or undefined in jsonLoader

* use async/await in loadModel

* add dcgan to preload

* fixed breaking change

* updated index

* added modelReady prop

* shows preload working without additional async call to load manifest

* allows for preload

* added a bird image for testing purpose

* update bird image link from ml5-library for testing (#403)

* renaming model names to ml5.soundClassifier(SpeechCommands18w) (#404)

* ml5.featureExtractor loading models from the new teachable machine (#395)

* load model from new teachable machine

* featureExtractor use jointModel

* only train custom model but save the joint model

* Bodypix (#400)

* added BodyPix placeholder

* "@tensorflow-models/body-pix": "1.0.1",

* initial commit placeholder for bodypix

* added bodypix as bp and loadModel()

* added segment and segmentInternal

* change promise to async

* return result maskPerson and maskBackground

* adds part segmentation

* rm log

* add segmentation as result.raw

* add function to create bodyParts spec object

* added test

* added optional segmentationOptions param to segment() and segmentWithParts()

* added package.lock

* updated DEFAULTS to BODYPIX_DEFAULTS

* code cleanup

* added comments

* added jsdoc comments

* add check p5 color()

* updated bodyPartSpec image color handling for p5

* changed palette spec to object

* ml5.imageClassifier() loads pre-trained custom model (#408)

* imageClassifier load a model from url

* added options to local model from local files

* supports imageClassifier.classify(video)

* ml5.soundClassifier(url)

* docs: add shiffman as a contributor (#410)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#414)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* rm files to start fresh (#417)

* docs: add shiffman as a contributor (#418)

* docs: update README.md

* docs: create .all-contributorsrc

* docs: add cvalenzuela as a contributor (#419)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add yining1023 as a contributor (#421)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add handav as a contributor (#423)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add joeyklee as a contributor (#424)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AshleyJaneLewis as a contributor (#425)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ellennickles as a contributor (#426)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add itayniv as a contributor (#427)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nikitahuggins as a contributor (#428)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AbolTaabol as a contributor (#429)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AidanNelson as a contributor (#430)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add WenheLI as a contributor (#431)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dariusk as a contributor (#432)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Derek-Wds as a contributor (#433)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add garym140 as a contributor (#434)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add genekogan as a contributor (#435)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hhayley as a contributor (#436)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lisajamhoury as a contributor (#437)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matamalaortiz as a contributor (#438)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add mayaman as a contributor (#439)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add MimiOnuoha as a contributor (#440)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add NHibiki as a contributor (#441)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add oveddan as a contributor (#442)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add stephkoltun as a contributor (#443)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add viztopia as a contributor (#444)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add wenqili as a contributor (#446)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brondle as a contributor (#447)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Jonarod as a contributor (#448)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add JazzTap as a contributor (#449)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add zaidalyafeai as a contributor (#450)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add AlcaDesign as a contributor (#451)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add memo as a contributor (#452)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add TheHidden1 as a contributor (#453)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add meiamsome as a contributor (#454)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add marshalhayes as a contributor (#455)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add reiinakano as a contributor (#456)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nsthorat as a contributor (#457)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add irealva as a contributor (#458)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add vndrewlee as a contributor (#459)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add fjcamillo as a contributor (#460)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add achimkoh as a contributor (#461)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add hx2A as a contributor (#462)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add champierre as a contributor (#465)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add micuat as a contributor (#466)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add montoyamoraga as a contributor (#467)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add b2renger as a contributor (#468)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add adityaas26 as a contributor (#469)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add okuna291 as a contributor (#470)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xujenna as a contributor (#471)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add nicoleflloyd as a contributor (#472)

* docs: update README.md

* docs: update .all-contributorsrc

* updated package-lock

* pass vector to dcgan compute

* Adds face-api.js to ml5.js (#482)

* initial commit - add classifyExpressions

* added classifyExpressionsMultiple() and classifyExpressionsSingle()

* remove modelPath requirement in favor of defaults

* updated index with links to tiny landmarks

* adds option to add relative path or absolute url

* updated url checking for models

* changed function names

* updated functions to .detect() and .detectSingle()

* check undefined, otherwise assign

* added resize function to results by default

* code cleanup

* added test to faceapi

* added tests

* added face parts to result.parts

* code cleanup

* changed options from withFaceX to withX

* code cleanup

* code cleanup

* fixed conditional to include face .withFaceDescriptor(s)

* docs: add jepster-dk as a contributor (#489)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add xanderjakeq as a contributor (#490)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add catarak as a contributor (#491)

* docs: update README.md

* docs: update .all-contributorsrc

* [WIP]Change p5Utils into a class

* dcgan: use random vector if no latent vector is given

* dcgan check if arg is array

* updated code of conduct with adapted p5 community statement (#492)

* updated code of conduct with adapted p5 community statement

* Update CODE_OF_CONDUCT.md

rm coding train from donation // todo - add other relevant orgs next

Co-Authored-By: Daniel Shiffman <daniel.shiffman@gmail.com>

* updated enforcement with ashley and dan

* rm redundant all contributors badge (#497)

* Readme updates (#505)

* added package.lock

* updates links to latest website

* rm 'with no external deps'

* set correct url to image (#507)

* docs: add dcbriccetti as a contributor (#506)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Sblob1 as a contributor (#513)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: update README.md

* docs: update .all-contributorsrc

* Fu

* add command line arguments for testing single model

* Handling p5 Image in PoseNet singlePose

I have changed singlePose function in order to handle p5 Image types. 

However I'm not sure if the check is thorough enough. Any pointers are welcome.

* Adds ImageData support for all image handling functions (#525)

* added ImageData support to YOLO

* adds ImageData support to UNET

* adds ImageData support to StyleTransfer

* adds ImageData support to PoseNet

* adds ImageData support for ImageClassifier/darknet

* adds ImageData support for ImageClassifier/doodlenet

* adds ImageData support for BodyPix and cleans up conditionals

* adds ImageData support to faceApi and cleans up conditionals

* adds ImageData support for imageclassifier and cleans up conditional

* fix image handling for bodypix faceapi and imageclassifier

* update mobilenet imageData support

* check imagedata in yolo

* adds ImageData test to BodyPix

* adds check for canvas (#526)

* Fixes Posenet input arguments and related issues (#529)

* adds this.multiPose() to else{}

* fixes conditional check on object or string

* added kmeans

* added randomSample function

* re-ordered name placement

* fixed weird indentation error

* indentation

* removed optional keyword in docstring

* updates issue and pull request templates (#530)

* Created config class attribute to store instance params

* Adds release script helper (#534)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* Adds release script helper (#535)

* adds release helper function

* update name and sep step for release:push

* add release:publish

* adds tagging to release:publish

* fixes typo

* added test to kmeans (#536)

* docs: add jwilber as a contributor (#537)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add tezzutezzu as a contributor (#538)

* docs: update README.md

* docs: update .all-contributorsrc

* Update Contributing and Github docs (#539)

* updated issue template:

* update PR template

* added new release how to

* docs: add EmmaGoodliffe as a contributor (#545)

* docs: update README.md

* docs: update .all-contributorsrc

* Update tfjs ~v1.2.2 (#544)

* updated tfjs to 1.2.2 and bumped face-api to 0.20.1

* bump tensorflow models

* bump body-pix version

* adds version 2 to feature extractor

* updated to mobilenetv2 api

* updates to posenet 2 api

* always process and resize images in mobilenet

* update test with version 2

* update posenet inputs and test

* fix issue with params in posenet

* updates conditional in p5Utils

* add loadImage test (#549)

* Update npm helper scripts for making releases (#552)

* updating release process scripts and docs

* updated release proces npm scripts and docs

* added release:sync and developement:sync"
"

* set fe to mobilenet v1 - use layers model (#554)

* Adds Docsify to consolidate documentation (#556)

* add docsify-cli as dev dep

* adds docs structure for docsify

* adds bodyPix documentation example

* update bodypix documentation

* adds imageClassifer docs

* added styleguide template and updated docs

* changed name of reference template

* added dev guidelines

* update dev guidelines

* adds posenet docs

* adds tutorials and faq

* add dev:docs npm script

* adds char rnn to docs

* Adds documentation for references to docsify docs (#557)

* add note on all contributors bot

* adds faceapi header img"

* adds design guidelines

* adds design guidelines to sidebar

* adds section for p5 web editor examples

* adds cvae refs

* update bodypix and charrnn docs

* added dcgan docs

* adds pitch detection docs

* adds featureExtractor docs

* adds knn classifier

* update tutorial refs

* adds pix2pix doc

* adds sentiment docs

* adds sketchrnn ref

* adds sound classifier

* adds styletransfer docs

* adds unet docs

* adds word2vec docs

* adds yolo docs

* adds acknowledgements section

* adds acknowledgements section

* Fixes Doodlenet - set new axes and .floor() (#559)

* change split axis to 3 axes

* use floor() instead of round()

* adds options for detection confidence (#561)

* Adds labels to custom image classification model from Teachable Machine output

* Addressing issue #590 part 1 (#592)
>The saved labels from Teachable Machine should be loaded by ml5. I believe this is working for sound classification, but not for images.

Fetching labels from metadata.json when loading models from the new Teachable Machine.

* docs: add EonYang as a contributor (#593)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add lydiajessup as a contributor (#594)

* docs: update README.md

* docs: update .all-contributorsrc

* set alias for sidebar (#598)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* [Docs] Uses gh-pages to serve docsify docs (#599)

* update docsify config

* testing pathways

* adds sublevel 2

* rm sidebar comment

* testing sidebar nested list issue

* relative path is false - using gh-pages

* testing - pls ignore

* testing plugin issue

* drop alias

* added no jekyll to root"

* testing pathway for images

* rm dot from path

* set rel path

* changed images to _media

* use _media path for images

* adds header nav to docs

* updates alt text and image url

* adds getting started url

* adds reference index

* updates href to reference in nav (#601)

* [face-api] Removes expressions support from face-api in ml5.js (#602)

* rm faceapi expressions support

* rm expression ref in comment

* updates tests for faceapi

* fixes single detection and tests

* Update docs (#603)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* Revert "Update docs (#603)" (#604)

This reverts commit c6b78d0a7aedc7050a095386ad88300d91a761b2.

* Updates docsify docs (#605)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds face-api and neural-network placeholder

* adds section for web editor

* set to /tree/development and adds posenet examples

* adds link to src code

* updates references to examples

* sets tree/development as path

* updates face-api and neural net docs

* rm neural net class from update-docs branch

* moves bodyPix to support preload() (#610)

* Adds preload support to faceApi  (#611)

* moves bodyPix to support preload()

* adds faceapi to preload

* Updates Docs with latest features (#612)

* adds face-api updates and neural network docs updates

* adds docs for nn functions

* adds save and load docs

* adds neural Network documentation

* fixes backticks

* adds sidebar dividers

* adds docs on model loading and contributors (#616)

* Updates gh templates (#617)

* updates PR template

* updates gh issues template

* updates template

* Generic Neural Network class (#485)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#581)

* changes for class

* values not value, but this does not match feature extractor regression

* [Diy nn] Fixes output reversal and gives unnormalized data as outputs of predict() (#582)

* unnormalize outputs for regression

* use .reverse() - note: we should use .unshift() where order matters

* code cleanup

* updates config inputs learning rate and code cleanup

* changed value to return result.outputs

* adds blob reader for json

* [diy nn] moves tf-vis visualizations to helper class (#583)

* adds tfvis to neuralNetworkVis.js

* adds tfvis to class

* handle text and convert to json (#584)

* allow user more control in the case of classification

* allow user more control in the case of classification (#585)

* Refactoring DIY Neural Network (#591)

* [wip] refactoring data handling and logic separation

* wip adding convertRawToTensor

* adds conversion to tensor

* adds normalization step

* adds train()

* adds predictInternal()

* fixes unique value mapping issue

* comment out .print()

* return all regression results

* adds experimental normalizationOptions object

* quick fix for checking if normalizationOptions exists

* commenting out auto tensor printing

* adds checks for normalizationOptions

* fix obj ref in conditional

* adds .normalizeData() - keeps .normalize() for now

* changes whileTraining function when debug is true

* adds layer options for adding more than 2 layers - experimentalgit add .

* remove .normalize() in favor of .normalizeData()

* adds save() and load()

* adds data.warmUp() to allow training without normalization - handled internally on train

* updates outputs of .predict() and .classify() to be array

* Divide by 0 issue when data is not normalized (#596)

* skipping calculating inputMin and inputMax when data not normalized

* adds check for this.data.meta.isNormalized in predictInternal

* Diy nn code cleanup (#606)

* adds input/output checks to specify number or array of input/output names

* moves model creation to training to compile after input and output units have been calcd

* cleanup code in .trainInternal()

* move vars up to top of function in .trainInternal()

* rm model creation from .createModelFromDataInternal()

* code cleanup and adds comments to .initializeIOUnits()

* code cleanup

* [DIY NN] Adds .saveData() and .loadData() (#607)

* adds saveData function

* updates saveData() with input checks

* adds loadData function

* [Diy NN] Adds .predictMultiple() for batch predictions/classifications (#609)

* adds predictMultiple()

* rm ys.print()

* moves bodypix and faceapi to preload support to match base branch

* [DIY nn] Neural Net Fixes loading pre-trained model (#613)

* adds model_meta.json to savedfiles

* adds loading of model_meta.json - temp fix

* use substring method for url checking

* adds check for if input is JSON

* loadData and text variables mixed up (#615)

* [Diy nn] fix model loading load (Work in progress) (#618)

* adds input object as param to .load()

* adds fetch to retrieve data from urls in .load() based on object

* updates object handler

* fixes check for model.json

* fixes parsing and ordering files

* adds fix for p5 web editor - must use explicit json object to load models

* allows user to add video to .segment() and .segmentWithParts() (#619)

* updates unet docs (#620)

* adds basic test for defaults (#621)

* docs: add EmmaGoodliffe as a contributor (#622)

* docs: update README.md

* docs: update .all-contributorsrc

* adds fix for unet image return for p5 (#625)

* updates webpack dev server to 3.1.11 (#629)

* Fixes vulnerabilities noted by npm (#630)

* run npm audit fix

* bumps commitizen dep

* updated readme and readme updater (#632)

* Update NeuralNetwork docs (#631)

* skeleton of generic Neural Network

* proof of concept for training and prediction

* use ml5 callcallbac to handle callback or promisek

* added activation to options

* load save model

* adds placeholder to test and adds defaults

* DIY Neural Net Updates  (#568)

* begins restructuring

* adds tfjs-vis and adds generic createModel() function

* adds tf viz and adds loadData function

* adds normalization function

* adds train function

* adds predict function

* work on DIY Neural Network (#569)

* fixing output and hidden activations

* moving data fields config to loadData()

Eventually this should be ml5.utils() or ml5.data()

* trimming whitespace

* rename labels to targets for training output

* using camelCase

* moves shuffle out of normalize

* [WIP] DIY Neural Net with focus on handling data internally (#571)

* adds data obj in class

* adds initialization step

* creates nn data class

* moves functions to data class

* working with titanic

* adds tf vis for training

* changes tf viz show on training is debug is true

* changes optimizer for regression

* adds unNormalize function

* fix normalization

* rm log

* refactors out to sep modules

* adds options to train

* adds options to train

* adds comments

* adds input/output array function

* removes i/o label check

* fixes optionOrCallback

* fix test

* adds comments

* updates data handling

* updates normalization data handling

* DIY NN data handling updates (#572)

* set up scaffold for creating inputs

* added output scaffolding - turn into functions todo

* adds function to encode data with ontHot or not

* ensure inputTypes/outputTypes exist

* [In progress] DIY NN - handles json and csv loading (#573)

* adds placeholders for json and csv loader'

* add json parsing

* adds true flag to normalization to fix broken function

* Fixes normalization function for NN (#575)

* adds possible fix - moves norm to external function

* adds correctly ordered data

* DIY Neural Network: Handles onehot() encoding for inputs and outputs in normalization (#576)

* adds correct input structure - accounts for onehot inputs

* code formatting and cleaning

* fixes need for onehot in classification for numeric output

* adds whileTraining cb support to train (#577)

* regression needs to pickup learning rate

* Adds temporary fixes for i/o values given to/output by .predict() (#578)

* adds min and max to meta and checks predict sample and forces array

* adds onehot encoding legend

* updating input handling for predict()

* adds label,confidence output for classification

* fix merge conflicts

* rm log

* need to use inputUnits and not input length

* [WIP] Fixes for before class (#58…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants