Skip to content

Commit 45fda91

Browse files
authored
Merge branch 'main' into posenet-examples
2 parents d1fcb19 + ed32afb commit 45fda91

File tree

40 files changed

+76
-195
lines changed

40 files changed

+76
-195
lines changed

.all-contributorsrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"login": "ellennickles",
8686
"name": "Ellen Nickles",
8787
"avatar_url": "https://avatars2.githubusercontent.com/u/31713501?v=4",
88-
"profile": "https://ellennickles.site/",
88+
"profile": "https://github.com/ellennickles/",
8989
"contributions": [
9090
"blog",
9191
"content",

.github/workflows/main.yml

-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
name: reviewdog
2-
on: [pull_request]
3-
jobs:
4-
eslint:
5-
name: runner / eslint
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v1
9-
- name: eslint
10-
uses: reviewdog/action-eslint@v1
11-
with:
12-
github_token: ${{ secrets.github_token }}
13-
reporter: github-pr-review # Change reporter.

CODE_OF_CONDUCT.md

-102
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You can find a collection of standalone examples in this repository within the `
7878
These examples are meant to serve as an introduction to the library and machine learning concepts.
7979

8080
## Code of Conduct
81-
We believe in a friendly internet and community as much as we do in building friendly machine learning for the web. Please refer to our [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for our rules for interacting with ml5 as a developer, contributor, or user.
81+
We believe in a friendly internet and community as much as we do in building friendly machine learning for the web. Please refer to our [Code of Conduct](https://github.com/ml5js/Code-of-Conduct/) for our rules for interacting with ml5 as a developer, contributor, or as a person using the library.
8282

8383
## Contributing
8484
Want to be a **contributor 🏗 to the ml5.js library**? If yes and you're interested to submit new features, fix bugs, or help develop the ml5.js ecosystem, please go to our [CONTRIBUTING](CONTRIBUTING.md) documentation to get started.
@@ -106,7 +106,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
106106
<td align="center"><a href="http://www.hannahishere.com"><img src="https://avatars0.githubusercontent.com/u/1385308?v=4" width="100px;" alt=""/><br /><sub><b>Hannah Davis</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=handav" title="Code">💻</a> <a href="#example-handav" title="Examples">💡</a></td>
107107
<td align="center"><a href="https://jk-lee.com/"><img src="https://avatars1.githubusercontent.com/u/3622055?v=4" width="100px;" alt=""/><br /><sub><b>Joey Lee</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=joeyklee" title="Code">💻</a> <a href="#example-joeyklee" title="Examples">💡</a> <a href="https://github.com/ml5js/ml5-library/pulls?q=is%3Apr+reviewed-by%3Ajoeyklee" title="Reviewed Pull Requests">👀</a> <a href="#content-joeyklee" title="Content">🖋</a> <a href="https://github.com/ml5js/ml5-library/commits?author=joeyklee" title="Tests">⚠️</a></td>
108108
<td align="center"><a href="https://github.com/AshleyJaneLewis"><img src="https://avatars3.githubusercontent.com/u/43127855?v=4" width="100px;" alt=""/><br /><sub><b>AshleyJaneLewis</b></sub></a><br /><a href="#blog-AshleyJaneLewis" title="Blogposts">📝</a> <a href="#design-AshleyJaneLewis" title="Design">🎨</a> <a href="#eventOrganizing-AshleyJaneLewis" title="Event Organizing">📋</a> <a href="#content-AshleyJaneLewis" title="Content">🖋</a></td>
109-
<td align="center"><a href="https://ellennickles.site/"><img src="https://avatars2.githubusercontent.com/u/31713501?v=4" width="100px;" alt=""/><br /><sub><b>Ellen Nickles</b></sub></a><br /><a href="#blog-ellennickles" title="Blogposts">📝</a> <a href="#content-ellennickles" title="Content">🖋</a> <a href="#ideas-ellennickles" title="Ideas, Planning, & Feedback">🤔</a> <a href="#tutorial-ellennickles" title="Tutorials">✅</a></td>
109+
<td align="center"><a href="https://github.com/ellennickles/"><img src="https://avatars2.githubusercontent.com/u/31713501?v=4" width="100px;" alt=""/><br /><sub><b>Ellen Nickles</b></sub></a><br /><a href="#blog-ellennickles" title="Blogposts">📝</a> <a href="#content-ellennickles" title="Content">🖋</a> <a href="#ideas-ellennickles" title="Ideas, Planning, & Feedback">🤔</a> <a href="#tutorial-ellennickles" title="Tutorials">✅</a></td>
110110
</tr>
111111
<tr>
112112
<td align="center"><a href="http://www.itayniv.com"><img src="https://avatars1.githubusercontent.com/u/5209486?v=4" width="100px;" alt=""/><br /><sub><b>Itay Niv</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=itayniv" title="Code">💻</a> <a href="#example-itayniv" title="Examples">💡</a></td>

docs/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@
106106
<script>
107107
const config = {
108108
editOnGithub: {
109-
docBase: 'https://github.com/ml5js/ml5-library/tree/gh-pages/docs/',
110-
docEditBase: 'https://ml5js.github.io/ml5-library',
109+
docBase: 'https://github.com/ml5js/ml5-library/tree/main/docs/',
110+
docEditBase: 'https://learn.ml5js.org/',
111111
title: 'Edit document',
112112
},
113113
};

docs/reference/cvae.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ No demos yet - contribute one today!
103103
No tutorials yet - contribute one today!
104104
105105
## Model and Data Provenance
106-
> A project started by [Ellen Nickles](https://ellennickles.site/)
106+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
107107
108108
### Models Overview
109109

docs/reference/dcgan.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ No demos yet - contribute one today!
134134
No demos yet - contribute one today!
135135
136136
## Model and Data Provenance
137-
> A project started by [Ellen Nickles](https://ellennickles.site/)
137+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
138138
139139
### Models Overview
140140

docs/reference/face-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ No tutorials yet - contribute one today!
162162
163163
164164
## Model and Data Provenance
165-
> A project started by [Ellen Nickles](https://ellennickles.site/)
165+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
166166
167167
### Models Overview
168168

docs/reference/image-classifier.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ No demos yet - contribute one today!
172172
173173
174174
## Model and Data Provenance
175-
> A project started by [Ellen Nickles](https://ellennickles.site/)
175+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
176176
177177
### Models Overview
178178

docs/reference/neural-network.md

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const data = [
3131
{r:255, g:0, b:0, color:'red-ish'},
3232
{r:254, g:0, b:0, color:'red-ish'},
3333
{r:253, g:0, b:0, color:'red-ish'},
34+
{r:0, g:255, b:0, color:'green-ish'},
35+
{r:0, g:254, b:0, color:'green-ish'},
36+
{r:0, g:253, b:0, color:'green-ish'},
3437
{r:0, g:0, b:255, color:'blue-ish'},
3538
{r:0, g:0, b:254, color:'blue-ish'},
3639
{r:0, g:0, b:253, color:'blue-ish'}

docs/reference/object-detector.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Real-time object detection system using either [YOLO](https://pjreddie.com/darkn
1616
const video = document.getElementById('video');
1717

1818
// Create a ObjectDetector method
19-
const objectDetector = ml5.ObjectDetector('cocossd', {}, modelLoaded);
19+
const objectDetector = ml5.objectDetector('cocossd', {}, modelLoaded);
2020

2121
// When the model is loaded
2222
function modelLoaded() {
@@ -35,9 +35,9 @@ objectDetector.detect(video, (err, results) => {
3535
### Initialize
3636

3737
```js
38-
const objectDetector = ml5.ObjectDetector(modelNameOrUrl);
38+
const objectDetector = ml5.objectDetector(modelNameOrUrl);
3939
// OR
40-
const objectDetector = ml5.ObjectDetector(modelNameOrUrl, ?options, ?callback);
40+
const objectDetector = ml5.objectDetector(modelNameOrUrl, ?options, ?callback);
4141
```
4242
4343
#### Parameters
@@ -100,7 +100,7 @@ No demos yet - contribute one today!
100100
<iframe width="560" height="315" src="https://www.youtube.com/embed/QEzRxnuaZCk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
101101
102102
## Model and Data Provenance
103-
> A project started by [Ellen Nickles](https://ellennickles.site/)
103+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
104104
105105
### Models Overview
106106

docs/reference/pitch-detection.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ No demos yet - contribute one today!
127127
No tutorials yet - contribute one today!
128128
129129
## Model and Data Provenance
130-
> A project started by [Ellen Nickles](https://ellennickles.site/)
130+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
131131
132132
### Models Overview
133133

docs/reference/pix2pix.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ No tutorials yet - contribute one today!
105105
106106
107107
## Model and Data Provenance
108-
> A project started by [Ellen Nickles](https://ellennickles.site/)
108+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
109109
110110
### Models Overview
111111

docs/reference/posenet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ No demos yet - contribute one today!
267267
268268
269269
## Model and Data Provenance
270-
> A project started by [Ellen Nickles](https://ellennickles.site/)
270+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
271271
272272
### Models Overview
273273

docs/reference/sentiment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ console.log(prediction);
3333
### Initialize
3434

3535
```js
36-
const magic = ml5.Sentiment(model, ?callback);
36+
const sentiment = ml5.sentiment(model, ?callback);
3737
```
3838
3939
#### Parameters
@@ -98,7 +98,7 @@ No tutorials yet - contribute one today!
9898
9999
100100
## Model and Data Provenance
101-
> A project started by [Ellen Nickles](https://ellennickles.site/)
101+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
102102
103103
### Models Overview
104104

docs/reference/sketchrnn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ No tutorials yet - contribute one today!
129129
130130
131131
## Model and Data Provenance
132-
> A project started by [Ellen Nickles](https://ellennickles.site/)
132+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
133133
134134
### Models Overview
135135

docs/reference/sound-classifier.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ No demos yet - contribute one today!
119119
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/cO4UP2dX944" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
120120
121121
## Model and Data Provenance
122-
> A project started by [Ellen Nickles](https://ellennickles.site/)
122+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
123123
124124
### Models Overview
125125

docs/reference/style-transfer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ No tutorials yet - contribute one today!
107107
108108
109109
## Model and Data Provenance
110-
> A project started by [Ellen Nickles](https://ellennickles.site/)
110+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
111111
112112
### Models Overview
113113

docs/reference/unet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ No demos yet - contribute one today!
126126
No tutorials yet - contribute one today!
127127
128128
## Model and Data Provenance
129-
> A project started by [Ellen Nickles](https://ellennickles.site/)
129+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
130130
131131
### Models Overview
132132

docs/reference/word2vec.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ No demos yet - contribute one today!
203203
No tutorials yet - contribute one today!
204204
205205
## Model and Data Provenance
206-
> A project started by [Ellen Nickles](https://ellennickles.site/)
206+
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
207207
208208
### Models Overview
209209

examples/javascript/BodyPix/BodyPix_Image/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<head>
44
<meta charset="UTF-8">
5-
<title>BodyPix with Webcam</title>
5+
<title>BodyPix with Image</title>
66
<script src="http://localhost:8080/ml5.js" type="text/javascript"></script>
77

88
<style></style>

examples/javascript/BodyPix/BodyPix_Webcam/sketch.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ async function setup() {
1818
video = await getVideo();
1919
// load bodyPix with video
2020
bodypix = await ml5.bodyPix(options)
21-
// run the segmentation on the video, handle the results in a callback
22-
bodypix.segment(video, gotImage, options);
2321
}
2422

2523
// when the dom is loaded, call make();
2624
window.addEventListener('DOMContentLoaded', function() {
2725
setup();
2826
});
2927

28+
function videoReady() {
29+
// run the segmentation on the video, handle the results in a callback
30+
bodypix.segment(video, gotImage, options);
31+
}
3032

3133
function gotImage(err, result){
3234
if(err) {
@@ -48,6 +50,7 @@ async function getVideo(){
4850
videoElement.setAttribute("style", "display: none;");
4951
videoElement.width = width;
5052
videoElement.height = height;
53+
videoElement.onloadeddata = videoReady;
5154
document.body.appendChild(videoElement);
5255

5356
// Create a webcam capture

examples/javascript/ImageClassification/ImageClassification_VideoScavengerHunt/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<head>
44
<meta charset="UTF-8">
5-
<title>Webcam Image Classification with Speech Output using MobileNet</title>
5+
<title>Webcam Scavenger Hunt Game using MobileNet</title>
66
<script src="http://localhost:8080/ml5.js" type="text/javascript"></script>
77

88
</head>

examples/javascript/KNNClassification/KNNClassification_Video/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010

1111
<body>
12-
<h2>KNN Classification on Webcam Images with mobileNet. Built with p5.js</h2>
12+
<h2>KNN Classification on Webcam Images with mobileNet.</h2>
1313
<div id="videoContainer">
1414
<video id="video" width="640" height="480" autoplay></video>
1515
</div>

examples/javascript/PitchDetection/PitchDetection_Game/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<head>
44
<meta charset="UTF-8">
5-
<title>Pitch Tone Game</title>
5+
<title>Pitch Detect Game</title>
66
<script src="http://localhost:8080/ml5.js" type="text/javascript"></script>
77

88
</head>

0 commit comments

Comments
 (0)