Skip to content

Commit

Permalink
Merge branch 'main' into posenet-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bomanimc authored Feb 16, 2021
2 parents d1fcb19 + ed32afb commit 45fda91
Show file tree
Hide file tree
Showing 40 changed files with 76 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"login": "ellennickles",
"name": "Ellen Nickles",
"avatar_url": "https://avatars2.githubusercontent.com/u/31713501?v=4",
"profile": "https://ellennickles.site/",
"profile": "https://github.com/ellennickles/",
"contributions": [
"blog",
"content",
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
name: reviewdog
on: [pull_request]
jobs:
eslint:
name: runner / eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: eslint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter.
102 changes: 0 additions & 102 deletions CODE_OF_CONDUCT.md

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ You can find a collection of standalone examples in this repository within the `
These examples are meant to serve as an introduction to the library and machine learning concepts.

## Code of Conduct
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.
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.

## Contributing
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.
Expand Down Expand Up @@ -106,7 +106,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<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>
<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>
<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>
<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>
<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>
</tr>
<tr>
<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>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
<script>
const config = {
editOnGithub: {
docBase: 'https://github.com/ml5js/ml5-library/tree/gh-pages/docs/',
docEditBase: 'https://ml5js.github.io/ml5-library',
docBase: 'https://github.com/ml5js/ml5-library/tree/main/docs/',
docEditBase: 'https://learn.ml5js.org/',
title: 'Edit document',
},
};
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cvae.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ No demos yet - contribute one today!
No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/dcgan.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ No demos yet - contribute one today!
No demos yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/face-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/image-classifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ No demos yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
3 changes: 3 additions & 0 deletions docs/reference/neural-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const data = [
{r:255, g:0, b:0, color:'red-ish'},
{r:254, g:0, b:0, color:'red-ish'},
{r:253, g:0, b:0, color:'red-ish'},
{r:0, g:255, b:0, color:'green-ish'},
{r:0, g:254, b:0, color:'green-ish'},
{r:0, g:253, b:0, color:'green-ish'},
{r:0, g:0, b:255, color:'blue-ish'},
{r:0, g:0, b:254, color:'blue-ish'},
{r:0, g:0, b:253, color:'blue-ish'}
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/object-detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Real-time object detection system using either [YOLO](https://pjreddie.com/darkn
const video = document.getElementById('video');

// Create a ObjectDetector method
const objectDetector = ml5.ObjectDetector('cocossd', {}, modelLoaded);
const objectDetector = ml5.objectDetector('cocossd', {}, modelLoaded);

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

```js
const objectDetector = ml5.ObjectDetector(modelNameOrUrl);
const objectDetector = ml5.objectDetector(modelNameOrUrl);
// OR
const objectDetector = ml5.ObjectDetector(modelNameOrUrl, ?options, ?callback);
const objectDetector = ml5.objectDetector(modelNameOrUrl, ?options, ?callback);
```
#### Parameters
Expand Down Expand Up @@ -100,7 +100,7 @@ No demos yet - contribute one today!
<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>
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/pitch-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ No demos yet - contribute one today!
No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/pix2pix.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/posenet.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ No demos yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/sentiment.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ console.log(prediction);
### Initialize

```js
const magic = ml5.Sentiment(model, ?callback);
const sentiment = ml5.sentiment(model, ?callback);
```
#### Parameters
Expand Down Expand Up @@ -98,7 +98,7 @@ No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/sketchrnn.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/sound-classifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ No demos yet - contribute one today!
<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>
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/style-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/unet.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ No demos yet - contribute one today!
No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/word2vec.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ No demos yet - contribute one today!
No tutorials yet - contribute one today!
## Model and Data Provenance
> A project started by [Ellen Nickles](https://ellennickles.site/)
> A project started by [Ellen Nickles](https://github.com/ellennickles/)
### Models Overview
Expand Down
2 changes: 1 addition & 1 deletion examples/javascript/BodyPix/BodyPix_Image/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<style></style>
Expand Down
7 changes: 5 additions & 2 deletions examples/javascript/BodyPix/BodyPix_Webcam/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ async function setup() {
video = await getVideo();
// load bodyPix with video
bodypix = await ml5.bodyPix(options)
// run the segmentation on the video, handle the results in a callback
bodypix.segment(video, gotImage, options);
}

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

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

function gotImage(err, result){
if(err) {
Expand All @@ -48,6 +50,7 @@ async function getVideo(){
videoElement.setAttribute("style", "display: none;");
videoElement.width = width;
videoElement.height = height;
videoElement.onloadeddata = videoReady;
document.body.appendChild(videoElement);

// Create a webcam capture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>

<body>
<h2>KNN Classification on Webcam Images with mobileNet. Built with p5.js</h2>
<h2>KNN Classification on Webcam Images with mobileNet.</h2>
<div id="videoContainer">
<video id="video" width="640" height="480" autoplay></video>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

</head>
Expand Down
Loading

0 comments on commit 45fda91

Please sign in to comment.