Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
ml5 v0.4.0 examples (#216)
Browse files Browse the repository at this point in the history
* Adds face-api demos (#161)

* added face-expressions demo

* added classifyExpressionsMultiple

* rm model files and model path requirement

* added face landmarks example

* clean up example

* rm options in example

* added local models example

* changed function names

* updated examples to use .detect()

* rm translation

* added image example of Frida

* added detectSingle

* updated image landmarks with landmarks.parts

* refactored code friendly and changed colors

* made ex friendly

* changed options from withFaceX to withX

* Structure examples directories for consistency (#170)

* moved CVAE example to dir

* moved dcgan to random for random space

* moved sentiment to dir

* moved word2vec to dir

* moved files

* rm p5 lib

* match javascript example folder structure

* Examples index page (#171)

* added placeholder index.html and node script

* adds ml5 index page

* added latent vector example (#175)

* Trying out some new example ideas for DCGAN latent vector

* added simpler demo (#181)

* moved index.html to /public (#182)

* [In progress] Support for p5 Instance mode in ml5.js example (#160)

* added bodypix_p5Instance

* adds p5Instance mode example

* [in progress] Adds plain javascript examples based on the p5 examples (#165)

* added plain js bodypix examples

* added cvae example

* added dcgan example

* added faceapi with landmarks // todo expressions

* stashing changes for now

* moved files

* added yolo webcam plain js

* added yolo image example

* remove text on p5

* rm p5 scripts

* adds bodyPix examples

* wip expressions demo

* adds faceapi expressions demo

* adds charRNN_interactive example

* added charRNN_test

* added charRnn_text_stateful'

* adds ImageClassification_Video_Load

* added ImageClassification_DoodleNet_Canvas

* added sentiment ex

* adds unet example

* add doodlenet_video - NOT WORKING

* added posenet examples - NOT WORKING

* added posenet_image_single

* adds part selection example - NEEDS REVIEW

* adds examples for posnet

* added styletransfer video plainjs

* added word2vec example

* rm p5 ref

* added sketchRnn basic example

* added sketchRnn interactive

* adds pix2pix example

* add pix2pix promise

* adds speech command

* adds speech commands example

* adds plain js pitchDetection

* adds pitch game

* format text

* adds knn video example

* adds knn classifier video example

* adds knn classifier posenet

* adds regressor fe

* adds videosquare

* adds sound example

* adds piano ex

* adds scavenger hunt - works only in chrome for now

* adds video and sound example

* adds doodlenet examples

* adds multiple example

* update bodypix examples

* update cvae

* adds updates to faceapi and dcgan

* updates yolo

* updats examples

* adds teachable machine image classification example (#196)

* rm expressions references in faceapi examples (#202)

* adds live-server to npm scripts (#204)

* update gh templates (#211)

* Generic Neural Net Example (#164)

* added example

* added co2 net - WORK IN PROGRESS

* updated model and loaded data from model

* fix unNormalize

* refactored code

* added axes

* added axes

* added message about log transform

* added legend in html

* adds placeholder for titanic example

* adds data, constructor, and laodData

* adds normalize data function

* adds training function

* updates example

* adds neural network training

* Speculative Ideas about Titanic Example (#187)

* speculative ideas with example

* since it's classification is there a way to mirror other ml5 classification examples?

* refactor of titanic example

* Adds titanic example to match diy-nn-with-data (#188)

* adds experimental csv and specified string as output

* working with titanic

* update examples - TODO: feed in normalized vals for titanic inputs

* adds simple regression example placeholder

* adds simple regression example

* comments train with options

* moves batchSize and epoch options

* change to .classify()

* updates co2 training sketch with predict vals from 0 - 1

* update to classify

* updates basic -- broken

* changes inputs and fixes undef.

* changes data in basic

* whitespace adjustments

* some cleanup and ideas for titanic example

* speculative port of color classifier example

* rm shuffle()

* updates color classifier example

* change vals to arrays in .addData()

* work on neural network color classifier (#190)

* small adjustments for testing code with ml5js/ml5-library#574

* example cleanup todos

* updates color classifier example to reflect current generic nn

* Updating Titanic Example (#191)

* redoing titanic example with final cleaned data from @lydiajessup

* training is working but issue with predict and passing in strings

* working with manually encoding of inputs to predict()

* updates titanic sketch

* porting tf.js XOR example from coding train challenge (#192)

* porting tf.js XOR example from coding train challenge

* adding learning rate

* noting hiddenUnits variable

* updating color classifier see: ml5js/ml5-library#581

* refactor titanic example

* using label directly

* logs not loss

* trying values

* moving sketch.js

* update simple regression

* updates regression sketch

* update co2 example

* update to use results.outputs

* Refactors examples to match diy-nn-refactor branch (#195)

* neural noteplayer example

* example inspired by Eyeo 2019 Rebecca Fiebrink talk

* rename musical mouse example

* example tweaks and oscillator

* adds refactoring examples

* updates examples based in refactor

* updates xor"

* rm unused co2net

* updates examples for regression

* updates musical note example

* adds experimental normalizationOptions

* adds example of multi layered network

* changes activations

* adds simple classification example

* changes .normalize() to .normalizeData()

* updates all examples to handle array of .predict() or .classify() output

* Pass over DIY interactive data examples (#198)

* neural noteplayer example

* example inspired by Eyeo 2019 Rebecca Fiebrink talk

* rename musical mouse example

* example tweaks and oscillator

* musical face example

* different interface for face example

* mouse and pixels cleanup

* musical face adjust to new API

* code comments

* low res pixel comments and naming

* Clean-up of interactive neural network examples (#201)

* neural noteplayer example

* example inspired by Eyeo 2019 Rebecca Fiebrink talk

* rename musical mouse example

* example tweaks and oscillator

* musical face example

* different interface for face example

* mouse and pixels cleanup

* musical face adjust to new API

* code comments

* low res pixel comments and naming

* comments and cleanup for face example

* normalize automatically face

* DIY Neural Network mouseXY classification example (#199)

* neural noteplayer example

* example inspired by Eyeo 2019 Rebecca Fiebrink talk

* rename musical mouse example

* example tweaks and oscillator

* musical face example

* different interface for face example

* mouse and pixels cleanup

* musical face adjust to new API

* code comments

* attempting DIY classification example

* ?

* fixes outputs and changes function to .classify()

* posenet classification example

* rm console.log

* rm withExpressions in musical face

* [diy nn] Updates examples to use labels for inputs/outputs (#205)

* updates musical mouse and xy classifier with specific input/output labels

* update titles

* update text in co2net

* adds load data function (#206)

* adds xOR example with multiPredict (#207)

* [WIP] DIY NN - examples for loading model (#210)

* adds loadModel example

* updates example showcasing issues

* updated example to reflect current ml5-lib temp fix

* Updates model_load example (#212)

* adds loadModel example

* updates example showcasing issues

* updated example to reflect current ml5-lib temp fix

* updates loading model example

* rm faceapi examples with expressions (#213)

* Updates bodypix examples to use preload() for p5js examples (#214)

* adds preload example

* updates bodypix to use preload()

* Kmeans Image Segmentation Example (#215)

* adds simple kmeans clustering example

* code cleanup

* change image size to 30 x 30 to run faster

* changes ml5 version to 0.4.0

* updates public index

* updates ml5 version and updater script

* update npm script name"

* adds 2019

* updates p5 to version 0.9.0
  • Loading branch information
joeyklee authored Oct 17, 2019
1 parent 6d66e72 commit 09f674c
Show file tree
Hide file tree
Showing 639 changed files with 75,369 additions and 239 deletions.
63 changes: 48 additions & 15 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,57 @@
## → Description 📝
<!--------------------------------------------
🌈DEAR BELOVED ML5 COMMUNITY MEMBER. WELCOME. 🌈
---------------------------------------------->

A clear and concise description of what the issue is about. Let us know if you:
Dear ml5 community,

- found a bug 🐛
- want to suggest an update 💡
- have an idea for a new feature 🆕
I'm submitting a new issue. Please see the details below.



## Screenshots 🖼
(Any relevant screenshots, sketches, or helpful concept diagrams)
### Step 1: Describe the issue 📝
> Did you find a bug? Want to suggest an idea for a new example?

## → Helpful Information 🦄

A list of relevant information for this issue. This will help people navigate the project and offer some clues of where to start. Depending on the nature of this issue, important and helpful information might include:

- **Web browser and version** (e.g. Firefox version 65, Chrome version 71.0)
- the **ml5-examples branch** you're using - this is important since the examples may differ between `release` and `development`
- **Operating System** (e.g. MacOS, Windows, Ubuntu)
- Steps to reproduce the issue
- ml5 version you're using
- Links to example code in the [p5 web editor](https://editor.p5js.org) or other online shareable code editor
### → Step 2: Screenshots or Relevant Documentation 🖼
> Here's some helpful screenshots and/or documentation of the new feature


### → Step 3: Share an example of the issue 🦄
> Here's some example code or a demonstration of the issue in https://github.com/ml5js/ml5-examples OR in the https://editor.p5js.org or codepen/jsfiddle/etc...





**Other relevant information, if applicable**

### → Describe your setup 🦄
> Here's some helpful information about my setup...
- **Web browser & version**:
- **Operating System**:
- **ml5 version you're using**:
- **Any additional notes**



<!--------------------------------------------
🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈
DEAR BELOVED ML5 COMMUNITY MEMBER. WELCOME.
BEFORE SUBMITTING AN ISSUE PLEASE MAKE
SURE TO SUBMIT THE RELEVANT INFORMATION
TO THE SECTIONS LISTED BELOW.
HELP US HELP YOU BY PROVIDING ALL THE HELPFUL
INFORMATION THAT WILL ALLOW THE ML5 COMMUNITY
TO UNDERSTAND WHAT YOUR ISSUE SUBMISSION IS ABOUT.
WE WILL PRIORITIZE WELL DOCUMENTED ISSUES.
THANK YOU! MERCI! ABRIGADO! GRACIAS! DANKE!
🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈
---------------------------------------------->

56 changes: 42 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,55 @@
<!-- MANY MANY THANKS FOR YOUR CONTRIBUTION. ML5 ❤️S YOU! -->
## → Submit changes to the relevant branch 🌲
<!--------------------------------------------
🌈DEAR BELOVED ML5 COMMUNITY MEMBER. WELCOME. 🌈
---------------------------------------------->

We have 2 branches you can submit to, **development** or **release**. You'd make us so happy 😊 if you submitted your pull request to the branch that is most relevant for your submission.
Dear ml5 community,

- for pull requests related to **new features** 🆕 make sure to use the **development** branch
- for pull requests related to bug 🐛fixes of the existing stable release, make sure your pull request goes to the **release** branch.
I'm making a Pull Request(PR). Please see the details below.


## → Description 📝
**A good PR 🌟**

A clear and concise description of what the pull request is about. Let us know if you are:
### → Step 1: Which branch are you submitting to? 🌲
> Development (for new features or updates), Release (for bug fixes), or ___________?
- fixing a bug 🐛
- adding an update 🛠
- submitting a new feature 🆕

## → Screenshots 🖼
(Any relevant screenshots, sketches, or helpful concept diagrams - these are helpful for our release notes and for getting people excited about your super cool feature and/or fix!)

### → Step 2: Describe your Pull Request 📝
> Fixing a Bug? Adding an Update? Submitting a New Example? Does it introduce a breaking change?
## → Relevant documentation 🌴

Write a few notes about your pull request. Document any functionality that might be helpful for others who want to run and test your changes. If we don't know how to make use of your contribution, we won't be able t integrate it! 🙏



**A great PR 🌟🌟**

### → Step 3: Share a Relevant Example 🦄
> Here's some example code or a link to another PR in https://github.com/ml5js/ml5-examples OR in the https://editor.p5js.org or codepen/jsfiddle/etc...



**The best PR 🌟🌟🌟**

### → Step 4: Screenshots or Relevant Documentation 🖼
> Here's some helpful screenshots and/or documentation of the new feature



<!--
BEFORE SUBMITTING YOUR PULL REQUEST PLEASE MAKE
SURE TO SUBMIT THE RELEVANT INFORMATION
TO THE SECTIONS LISTED BELOW.
HELP US HELP YOU BY PROVIDING ALL THE HELPFUL
INFORMATION THAT WILL ALLOW THE ML5 COMMUNITY
TO UNDERSTAND WHAT YOUR PR IS ABOUT.
WE WILL PRIORITIZE WELL A DOCUMENTED PR.
THANK YOU! MERCI! ABRIGADO! GRACIAS! DANKE!
-->




201 changes: 201 additions & 0 deletions d3/KMeans/KMeans_GaussianClusterDemo/data/gaussian2d_2clusters.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
x1,x2
2.498895550686414,1.1683342316471301
5.073222450036444,0.8623713271387572
4.672790880324094,2.6418773621498803
-4.408037749943782,9.86082022147346
5.017192218165258,1.137014304612439
7.518747899407973,2.824390511479593
4.792308918246223,2.8622728672522513
4.002126494732158,1.0958849986300305
-3.3073314310084383,10.545076592611387
5.791536553548423,1.7584056477819938
-2.4015376967912294,13.417267031869386
5.847853551389746,2.3858087486376407
-0.0017394517573983137,6.508513988309954
5.374516335890133,1.7016671877737757
0.28753386730842045,0.5976310661080595
0.8258255569618576,9.861250091558112
4.940788228589272,1.9900786477623023
3.2890076399871053,0.3427680089978571
3.988136979153767,2.0831095504360073
3.659149016220983,2.2638283536839325
5.555599223424615,1.5565462415023867
5.331463614299523,2.663076891195877
0.11061124930354183,8.610716891335636
3.5267117054448356,1.2209635632529157
-1.9299059971104287,8.325961615386033
-3.4822675166794257,9.212557358542593
5.317971265034728,3.13569806198625
-1.0389200883981988,6.832060008425208
3.4334956025750185,2.6337143742086604
-1.0568289494221548,11.438529736378069
-2.573235731712778,11.811045773821789
6.201764781931517,1.9869105473044737
-4.279755418340924,8.002043735704644
-1.862782678986323,7.861151425884607
-1.0550568568118213,6.814148328994786
4.90717442577531,1.16720379730483
-0.4664317077232183,10.35834677371033
6.769568117034272,0.31104203647088946
-2.3536032633953785,8.479818303259185
3.5756890342821226,1.819102610362172
0.1324993598234938,8.087891657092943
5.19435952201038,1.2162053660265575
4.623433978524807,0.7683444906278196
5.119276056863804,1.0427368394890264
-2.4859570811020197,11.612440305621691
3.5314085391619474,1.5416156329346786
-1.869662066558492,10.0166738139879
-3.9543588097000844,8.117408525307647
-2.0446639199024794,10.41177407996755
5.949260945309115,1.7757023394205802
1.7879305393582672,1.267190514864307
-4.089069692239981,9.289065737747164
-2.715915905562149,8.476071141135273
-3.5828235846721856,8.492891173333659
-0.5732718294706398,10.897929756991946
3.395204839536041,1.893239565009781
-2.3356740405400465,10.745713734983534
-1.9853382359526324,7.737401636763973
4.007372787040974,2.284764276867804
3.3219177453516364,2.59367812101621
4.360414128684593,1.311172411728886
3.620522247090522,2.1751171233989512
4.771037433005142,0.9351790183459179
-2.3884927219010996,6.467585978569685
4.48607575029831,3.635298423296617
-5.28096798228739,9.136840653894229
-2.5333235595461465,7.1236554840598725
5.477941378052291,2.816906447700362
-4.88329547570833,9.366170442700522
-1.894988910294277,5.862897924366712
5.337252718487184,4.031317870054879
-4.319606782133281,9.575995022924285
-1.390833589612127,7.482139396373238
-1.095248689908615,7.3887798179560775
6.575207795662701,0.045106752354580504
-2.9822647961358992,13.87651742675504
0.3136040147838939,10.386055651034626
2.7899566566108462,0.7138665577399477
-1.9170728963920638,10.758047548814568
-3.5847324678941423,12.325184977053594
2.9467750717836854,3.2056665465233616
5.643338045641777,2.792769450086803
5.748240571581146,3.06554319094667
6.392864172583703,2.001373455758078
4.300732567903952,0.2976575201672953
7.747981781915266,-0.5341774164198156
-7.191923534292956,10.483415375827304
6.341075864336601,1.0229174167894692
3.5358085987171015,2.300390705118297
3.5123078117936952,1.16831056832389
-2.5000574529353314,8.594967757802493
-2.331073412167549,8.114336553895091
-2.8530378205916285,9.55329412222294
-2.01462005006607,10.492854568905733
4.9688177701254315,1.2924508948489057
-0.6663129199069588,10.678925003789821
-1.5762407145153619,9.545138470443067
7.489491311307935,3.359554857046623
-3.7640991814652858,8.428598604014903
3.6021360086725087,1.6551717641611556
2.867081422900716,4.432436232802504
-5.039135836302563,8.262393606563183
7.504097088748158,-0.6480764589214596
-3.210080699736075,6.398291404739583
-4.4233899774901975,9.876692961897861
4.6143440413131485,0.6269821657329229
5.92090392303617,2.8478520652338064
1.9205353746682805,2.2235388802078906
5.916099516741989,1.1985085838723482
-5.382531896151638,9.344314325251442
5.731382862945856,2.8186296953863046
-3.332577388178688,10.903864481579097
3.0281314916384234,1.5240043982168021
-0.8729402600460268,9.601920145396827
7.531153098078045,0.94278219832302
3.54117937687979,4.782808716112358
-2.076696385876665,5.594347691005941
-5.152017042325083,7.727583417524748
-1.1892079098050659,9.320602452423994
6.355515899671174,1.178812882165293
-1.4602059043380013,12.929668315720823
5.566598052820089,1.4344144011991713
7.580326747295009,0.88779393225191
-4.022819264671252,6.306536301876362
-4.0092770143746534,8.461577087072836
5.235835618725371,3.0133414042793527
-2.199641243865366,9.703030874887844
-3.9092424141895945,8.43860958447838
-3.71917800846229,10.107641509443175
5.406465538689504,3.4979971302360946
-4.132266928473025,6.489830170075205
4.493836675773335,2.5125846131011667
6.588461571903373,3.2612700211546333
-0.43823830338587655,7.547337931199005
4.006172922387083,3.4354028646236925
4.701072297710841,1.0982065299948878
-3.456130142957489,9.931738251568461
2.599682353358936,1.3229444758053233
4.6469200295924455,2.0362548075839046
-5.592443171048769,8.009211864051997
5.811223232162794,2.2193596993098295
-2.102618934203611,11.350769641656404
-4.099181420150744,7.556046563555148
-2.135859405255648,5.511426994212602
-2.0614481992390097,9.633553248874154
2.695404056140095,0.08323984025990727
4.733608455402291,1.455774011567132
6.8318662227801354,0.0527885557743113
-3.3657090508454783,8.682425559274737
5.057362751300872,3.95426489593516
-0.7871879681286511,9.752121247811193
5.098785722242711,4.492475207415714
4.216538097313219,2.9923068058753794
4.770124155712477,2.7723412466672896
5.075166532464861,1.7984147475259649
0.8623103832895089,9.326339406358505
-2.908631512025264,10.290543352270916
-4.251415637034008,10.421179288349352
-4.486742477016456,6.876098048359911
-1.039786570124375,12.404754015423718
-2.40515106001055,6.9712565902963615
4.615019561801917,1.5855614298148957
-2.345177632998176,5.461558634883256
5.331480290553087,7.1465832782640435
-3.7247240416529084,9.429433542341522
-4.152644414249167,11.784753372422884
4.436063160005282,2.763156798585049
6.223620544943163,1.3431647893324377
4.61181236167117,2.130715851190733
-1.9798903663699576,9.480915605010487
4.726193474411028,0.5259835774407624
2.3394970205731256,3.791137471853162
-2.571244004271286,6.9253046772491675
4.048991011549115,2.1487269688182726
-5.938951026769725,8.966893268725231
-4.5665685635508755,9.685836517800121
-3.12179086511768,7.580236475536232
7.010515094939672,2.5169755250744155
-3.34837081904391,9.984098027278629
3.751237854712379,3.1178095876521947
6.194979821394534,3.0362073114008474
4.347578451751273,3.4485974725075152
-2.9018553818331365,9.65261551728166
-4.720214693268204,6.654004440065657
-2.126510650374437,6.787560616390087
-1.66329773634057,8.884106350076632
-1.8632124226297475,11.763486296940535
-2.6379138335227577,10.80807495765536
3.6793753745849576,2.8857274994901103
-3.337544638368226,8.181806364699831
3.675158323001068,1.6865547461974304
-2.797491617744138,9.73651647561285
-2.927740661193968,8.595772436399358
5.561382918912847,-0.19237085062054904
-4.638621491731087,10.187858545785165
-2.6470149137161436,9.624086367790616
3.848485080139458,3.114007826737761
-2.947822467631406,7.667002431946508
4.741668523057394,1.0638829577856557
-2.04883303025143,8.88121599927623
Loading

0 comments on commit 09f674c

Please sign in to comment.