Skip to content

Commit e12df6c

Browse files
authored
ml5 v0.4.0 (#638)
* updates ml5 version references to 0.4.0 * updates faq and readme * updates iframe in hello ml5 * adds general descriptions about categories * updates readme in docs * bump version number * changes update docs to development branch * changes docbase to gh-pages since this is what is rendered * adds sentiment to support preload (#639)
1 parent 23699d3 commit e12df6c

File tree

8 files changed

+49
-27
lines changed

8 files changed

+49
-27
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@ There are several ways you can use the ml5.js library:
2525

2626

2727

28+
2829
<p id="latest-version">
2930

30-
* You can use the latest version (0.3.1) by adding it to the head section of your HTML document:
31+
* You can use the latest version (0.4.0) by adding it to the head section of your HTML document:
3132

32-
**v0.3.1**
33+
**v0.4.0**
3334

34-
<script src="https://unpkg.com/ml5@0.3.1/dist/ml5.min.js" type="text/javascript"></script>
35+
<script src="https://unpkg.com/ml5@0.4.0/dist/ml5.min.js" type="text/javascript"></script>
3536

3637
</p data-id="latest-version">
3738

3839

3940

41+
4042

4143

4244
* If you need to use an earlier version for any reason, you can change the version number. The [previous versions of ml5 can be found here](https://www.npmjs.com/package/ml5). You can use those previous versions by replacing `<version>` with the ml5 version of interest:

docs/README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ Welcome to the ml5.js documentation. Here you'll find everything you need to get
77

88
Take a ride on the Coding Train to watch Dan Shiffman's ["A Beginner's Guide to Machine Learning with ml5.js"](https://www.youtube.com/watch?v=jmznx0Q1fP0). Here Dan explains what ml5.js is and where it all comes from.
99

10-
ml5.js is machine learning _for the web_ in your web browser. Through some clever and exciting advancements, the folks building [TensorFlow.js](https://www.tensorflow.org/js) figured out that it is possible to use the web browser's built in graphics processing unit (GPU) to do calculations that would otherwise run very slowly using central processing unit (CPU) based calculations. A really nice explantion of what is happening with GPUs can be found [here - Why are shaders fast?](https://thebookofshaders.com/01/). ml5 helps to make all these new developments in machine learning on the web more approachable for everyone.
10+
ml5.js is machine learning _for the web_ in your web browser. Through some clever and exciting advancements, the folks building [TensorFlow.js](https://www.tensorflow.org/js) figured out that it is possible to use the web browser's built in graphics processing unit (GPU) to do calculations that would otherwise run very slowly using central processing unit (CPU). A really nice explantion of what is happening with GPUs can be found [here - Why are shaders fast?](https://thebookofshaders.com/01/). ml5 strives to make all these new developments in machine learning on the web more approachable for everyone.
1111

1212

1313
### Quickstart
1414

1515
The fastest way to get started exploring the creative possibilities of ml5.js are to either:
1616

1717
1. Download a ml5.js project boilerplate. You can download a zip file here: [ml5 project boilerplate](https://github.com/ml5js/ml5-boilerplate/releases). <br/> Or...
18-
2. Open this [p5 web editor sketch with ml5.js added](https://editor.p5js.org/joeyklee/sketches/5VbXAWaV6).
18+
2. Open this [p5 web editor sketch with ml5.js added](https://editor.p5js.org/ml5/sketches/oYweRi2H7).
1919
3. You can also copy and paste the cdn link to the ml5 library here:
2020

2121
```
22-
<script src="https://unpkg.com/ml5@0.3.1/dist/ml5.min.js"></script>
22+
<script src="https://unpkg.com/ml5@0.4.0/dist/ml5.min.js"></script>
2323
```
2424

2525
***
2626
#### Quickstart: Plain JavaScript
2727

28-
Reference the [latest version](https://unpkg.com/ml5@0.3.1/dist/ml5.min.js) of ml5.js using a script tag in an HTML file as below:
28+
Reference the [latest version](https://unpkg.com/ml5@0.4.0/dist/ml5.min.js) of ml5.js using a script tag in an HTML file as below:
2929

3030

3131
In an **index.html** file, copy and paste the following and open up that file in your web browser.
@@ -36,13 +36,13 @@ In an **index.html** file, copy and paste the following and open up that file in
3636
<head>
3737
<title>Getting Started with ml5.js and p5.js</title>
3838
<meta name="viewport" content="width=device-width, initial-scale=1.0">
39-
<script src="https://unpkg.com/ml5@0.3.1/dist/ml5.min.js"></script>
39+
<script src="https://unpkg.com/ml5@0.4.0/dist/ml5.min.js"></script>
4040
</head>
4141

4242
<body>
4343
<script>
4444
// Your code will go here
45-
// open up your console - if everything loaded properly you should see 0.3.1
45+
// open up your console - if everything loaded properly you should see 0.4.0
4646
console.log('ml5 version:', ml5.version);
4747
4848
</script>
@@ -71,7 +71,7 @@ In an **index.html** file, copy and paste the following and open up that file in
7171
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
7272
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
7373
<!-- ml5 -->
74-
<script src="https://unpkg.com/ml5@0.3.1/dist/ml5.min.js"></script>
74+
<script src="https://unpkg.com/ml5@0.4.0/dist/ml5.min.js"></script>
7575
</head>
7676

7777
<body>
@@ -108,8 +108,20 @@ Coming soon
108108

109109
## Contribute to ml5.js {docsify-ignore}
110110

111-
Coming soon
111+
ml5 is an open source project that values all contributions. ml5 contributions often take the shape of workshops, design contributions, helping to answer people's questions on Github, flagging bugs in code, fixing bugs, adding new features, and more.
112+
113+
If you'd like to contribute, you're welcome to browse through the issues in our [Github](https://github.com/ml5js/ml5-library/issues) or create a new issue. If you're still unsure of where to start, feel free to ping us at [@ml5js on twitter](https://twitter.com/ml5js), <a href="mailto:[email protected]">[email protected]</a>
112114

113115
## Support {docsify-ignore}
114116

115-
Coming soon
117+
ml5 is always on the look out for grants and funding to support the maintenance and development of the ml5 project (including our educational and community based initiatives). If you are an educational institution, grant funding organization, or otherwise interested in funding the ml5 community of students, researchers, artists, educators, designers, and developers, we'd love to hear from you.
118+
119+
Feel free to reach out at <a href="mailto:[email protected]">[email protected]</a>.
120+
121+
## Acknowledgements {docsify-ignore}
122+
123+
ml5.js is supported by the time and dedication of open source developers from all over the world. Funding and support is generously provided by a [Google Education grant](https://edu.google.com/why-google/our-commitment/?modal_active=none%2F) at [NYU's ITP/IMA program](https://itp.nyu.edu/).
124+
125+
Many thanks [BrowserStack](https://www.browserstack.com/) for providing testing support.
126+
127+

docs/faq.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,29 @@
22

33
### Can I use ml5.js in the [p5 web editor](editor.p5js.org)?
44

5-
Sort of.
5+
Mostly.
66

77
A number of the ml5 sketches don't currently work in the p5 web editor due to some of the ways that the editor handles data files and some of the network communication regarding making requests to external data (e.g. the big model files that allow ml5.js to run things like image detection, etc).
88

9-
There are lots of developments in the p5 web editor as well as in ml5 to make sure these environments all play nicely together, but the best thing to do is to try and run things locally if possible. Thanks!
9+
There are lots of developments in the p5 web editor as well as in ml5 to make sure these environments all play nicely together. If something doesn't work in the web editor, the best thing to do is to try and run things locally if possible. See [running a local web server tutorial](/docs/tutorials/local-web-server.md).
10+
11+
Thanks!
1012

1113
### Can I use ml5.js with node.js?
1214

1315
No. Not at the moment.
1416

15-
ml5.js uses TensorFlow.js which uses the browser's GPU to run all the calculations. As a result, all of the ml5.js functionality is based around using the browser GPU. We hope to have ml5.js run in node-js sometime in the near future (especially now that [node support for TensorFlow is a thing](https://www.tensorflow.org/js/guide/nodejs) but the current ml5 setup does not support node.js.
17+
ml5.js uses TensorFlow.js which uses the browser's GPU to run all the calculations. As a result, all of the ml5.js functionality is based around using the browser GPU. We hope to have ml5.js run in node-js sometime in the near future (especially now that [node support for TensorFlow is a thing](https://www.tensorflow.org/js/guide/nodejs) but the current ml5 setup does not support node.js. We hope to support this in the future.
1618

1719

1820
[For more discussion about node and ml5.js, visit this issue thread.](https://github.com/ml5js/ml5-library/issues/377)
1921

2022

2123
### Can I contribute?
2224

23-
Yes! Absolutely. We welcome all forms of socially and technically driven contributions. No contribution is too small. Please contact us at [@ml5js on twitter](https://twitter.com/ml5js) or <a href="mailto:[email protected]">[email protected]</a>.
25+
Yes! Absolutely. We welcome all forms of socially and technically driven contributions. No contribution is too small.
26+
27+
Please contact us at [@ml5js on twitter](https://twitter.com/ml5js), <a href="mailto:[email protected]">[email protected]</a>, or [Github](https://github.com/ml5js/ml5-library/issues).
2428

2529
### How can I contribute?
2630

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<script>
107107
const config = {
108108
editOnGithub: {
109-
docBase: 'https://github.com/ml5js/ml5-library/tree/release/docs/',
109+
docBase: 'https://github.com/ml5js/ml5-library/tree/gh-pages/docs/',
110110
docEditBase: 'https://ml5js.github.io/ml5-library',
111111
title: 'Edit document',
112112
},

docs/reference/index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ Welcome to the ml5.js reference page! Here you can browse the various categories
44

55
We currently have 4 categories:
66

7-
* Image
8-
* Sound
9-
* Text
10-
* Helpers
7+
* **Helpers**:
8+
* The ml5 *helpers* category groups ml5 features that are broadly related to machine learning data, working with data, manipulating data, and training a model with data. Part of our helpers includes the [ml5.neuralNetwork](neural-network.md) which allows you to build and train your own neural network right in the browser. You can also explore the [ml5.featureExtractor](feature-extractor.md) to do [transfer learning](https://en.wikipedia.org/wiki/Transfer_learning).
9+
* **Image**:
10+
* The ml5 *image* category groups ml5 features that are related to applying machine learning to images or video.
11+
* **Sound**
12+
* The ml5 *sound* category groups ml5 features that are related to applying machine learning to audio.
13+
* **Text**
14+
* The ml5 *text* category groups ml5 features that are related to applying machine learning to text.
1115

1216
See the sidebar for more information.

docs/tutorials/hello-ml5.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This example is built with p5.js. You can also find the same example without p5.
5555
</div> -->
5656

5757
<!-- added inline height -->
58-
<div style="height:600px" class="iframe__container iframe__container--video"><iframe src="https://ml5js.github.io/ml5-examples/p5js/ImageClassification/ImageClassification" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
58+
<div style="height:800px" class="iframe__container iframe__container--video"><iframe src="https://ml5js.github.io/ml5-examples/p5js/ImageClassification/ImageClassification" frameborder="0" height="800px" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
5959

6060
## Code
6161

@@ -70,9 +70,9 @@ Here you can see that we read in the javascript libraries. This includes our ml5
7070
<meta charset="UTF-8">
7171
<title>Image classification using MobileNet and p5.js</title>
7272

73-
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script>
74-
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js"></script>
75-
<script src="https://unpkg.com/ml5@0.3.1/dist/ml5.min.js"></script>
73+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
74+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
75+
<script src="https://unpkg.com/ml5@0.4.0/dist/ml5.min.js"></script>
7676
</head>
7777

7878
<body>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ml5",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"description": "A friendly machine learning library for the web.",
55
"main": "dist/ml5.min.js",
66
"directories": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const withPreload = {
4545
word2vec,
4646
YOLO,
4747
uNet,
48+
sentiment,
4849
bodyPix,
4950
faceApi,
5051
};
@@ -54,6 +55,5 @@ module.exports = Object.assign({p5Utils}, preloadRegister(withPreload), {
5455
...imageUtils,
5556
tf,
5657
version,
57-
sentiment,
5858
neuralNetwork,
5959
});

0 commit comments

Comments
 (0)