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
shiffman committed Nov 5, 2020
2 parents d171ff4 + 72a95a4 commit d1fcb19
Show file tree
Hide file tree
Showing 103 changed files with 910 additions and 1,208 deletions.
11 changes: 3 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ I'm making a Pull Request(PR). Please see the details below.

**A good PR 🌟**

### → Step 1: Which branch are you submitting to? 🌲
> Development (for new features or updates), Release (for bug fixes), or ___________?


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

Expand All @@ -23,15 +18,15 @@ I'm making a Pull Request(PR). Please see the details below.

**A great PR 🌟🌟**

### → Step 3: Share a Relevant Example 🦄
### → Step 2: Share a Relevant Example 🦄
> Here's some example code or a demonstration of my feature as a part of this pull request, a separate pull request, in the https://editor.p5js.org, or codepen/jsfiddle/etc...



**The best PR 🌟🌟🌟**

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

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ We like these hashtags: #noCodeSnobs (because we value community over efficiency

Our community is always looking for enthusiasts to help in all different ways.

- **Develop**. [GitHub](https://github.com/ml5js/ml5-library) is the main place where code is collected, issues are documented, and discussions about code are had. Check out the [contributing documentation to get started](https://github.com/ml5js/ml5-library/blob/development/CONTRIBUTING.md) with developing the library.
- **Develop**. [GitHub](https://github.com/ml5js/ml5-library) is the main place where code is collected, issues are documented, and discussions about code are had. Check out the [contributing documentation to get started](https://github.com/ml5js/ml5-library/blob/main/CONTRIBUTING.md) with developing the library.
- **Document**. Everyone loves documentation. Help is needed porting examples, and adding documentation, and creating tutorials.
- **Teach**. Teach a workshop, a class, a friend, a collaborator! Tag [@ml5js on Twitter](https://twitter.com/ml5js?lang=en) and we will do our best to share what you're doing.
- **Create**. ml5.js is looking for designers, artists, coders, programmers to bring your creative and amazing work to show and inspire other people. Submit your work to [email protected].
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Preamble: If you're interested in to contribute to the ml5 project, just know yo
3. you make a comment on an existing issue or post your issue and indicate that you're curious to do your best to solve it 🔬
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `fix-detection-results`
5. you jam on fixing the bug, commit your changes with meaningful commit messages, and push your changes to your bug fix branch (e.g. `fix-detection-results`)
6. when ready, make a pull request to the `release` branch or `development` branch of ml5-library. Submit to the `release` branch if the bug you found was in the current ml5 release - the version of ml5 which is on npm. Submit to the `development` branch if the bug you found was in `development` branch of ml5-library.
7. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, your changes will be merged in. 🎉
6. when ready, make a pull request to the `main` branch of ml5-library. Prepend "[NEEDS RELEASE]" to the title if the bug you found was in the current ml5 release - the version of ml5 which is on npm.
7. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, a `ready for release` label will be added to your PR and your changes will be merged in and release with the next public update to the library. 🎉
8. hi-fives 👏 and hugs 🤗

### For new features or feature additions/updates
Expand All @@ -48,7 +48,7 @@ Preamble: If you're interested in to contribute to the ml5 project, just know yo
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `new-generative-model-x`
5. you jam on your new feature, commit your changes with meaningful commit messages, and push your changes to your new feature branch (e.g. `new-generative-model-x`)
6. you should also add an example of your new feature to the `examples/` directory so that other people can learn how to use your new feature.
7. when ready, make a pull request to the `development` branch of ml5-library. Submit to the `development` since your feature is part of the new frontier of the ml5-library.
7. when ready, make a pull request to the `main` branch of ml5-library.
8. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, your changes will be merged in. 🎉
9. hi-fives 👏 and hugs 🤗

Expand Down Expand Up @@ -168,21 +168,19 @@ NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
npm run manual-test
```

This creates a new folder called `/manual-test` in the project's root folder. Create an `index.html` file inside `/manual-test` and add the following:
This creates a new folder called `/manual-test` in the project's root folder. The `/manual-test` folder contains an `index.html` file with the following content:

```html
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<title>ml5.js manual test</title>
<script src="http:https://localhost:8080/ml5.js"></script>
</head>
<body>

<script>
// Your scripts would be written here
</script>

</body>
</html>
```
Expand Down Expand Up @@ -254,6 +252,8 @@ This last one is case sensitive!
## Making Releases (For the ml5 core team)
**NOTE: This section needs to be updated to align with the new `main` branch structure.**
Work in progress - we are working on making a few scripts to make it easier to make releases and deployments. For now, to address the long-winded process noted in https://github.com/ml5js/ml5-library/issues/387, we are experimenting with some devOps scripts.
In the instance you're ready to make a new release from `development` to `release`:
Expand Down
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# ![ml5](https://user-images.githubusercontent.com/10605821/41332516-2ee26714-6eac-11e8-83e4-a40b8761e764.png)
[![All Contributors](https://img.shields.io/badge/all_contributors-86-orange.svg?style=flat-square)](#contributors)


[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=QVNDdlkvMzNYSmhRRWlweXlIOTBENkd0MDBCOUJlbmFVZFRneFIzNlh4az0tLXA4S0loSGNlVUc2V2I3cVdLdXBKdGc9PQ==--8a5e5bfd3eafbba0702c02ec57ffec9d627a78ef)](https://www.browserstack.com/automate/public-build/QVNDdlkvMzNYSmhRRWlweXlIOTBENkd0MDBCOUJlbmFVZFRneFIzNlh4az0tLXA4S0loSGNlVUc2V2I3cVdLdXBKdGc9PQ==--8a5e5bfd3eafbba0702c02ec57ffec9d627a78ef)[![Version](https://img.shields.io/npm/v/ml5.svg?style=flat-square)](https://www.npmjs.com/package/ml5)
[![All Contributors](https://img.shields.io/badge/all_contributors-86-orange.svg?style=flat-square)](#contributors) [![BrowserStack Status](https://automate.browserstack.com/badge.svg?badge_key=eEtiK0lGeGpGZ2svSGd0WWJnclo3SGtxdEZ5anFmOE4zaFRyOUJkTFhHbz0tLWo1eUNzd0hpQUZjR2Rya0hIQjhIUHc9PQ==--45955c1082b17348f534b62689f945967b4e459e)](https://automate.browserstack.com/public-build/eEtiK0lGeGpGZ2svSGd0WWJnclo3SGtxdEZ5anFmOE4zaFRyOUJkTFhHbz0tLWo1eUNzd0hpQUZjR2Rya0hIQjhIUHc9PQ==--45955c1082b17348f534b62689f945967b4e459e) [![Version](https://img.shields.io/npm/v/ml5.svg?style=flat-square)](https://www.npmjs.com/package/ml5)
[![Twitter Follow](https://img.shields.io/twitter/follow/espadrine.svg?style=social&label=Follow)](https://twitter.com/ml5js)


Expand Down Expand Up @@ -32,11 +29,11 @@ There are several ways you can use the ml5.js library:

<p id="latest-version">

* You can use the latest version (0.5.0) by adding it to the head section of your HTML document:
* You can use the latest version (0.6.0) by adding it to the head section of your HTML document:

**v0.5.0**
**v0.6.0**

<script src="https://unpkg.com/ml5@0.5.0/dist/ml5.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/ml5@0.6.0/dist/ml5.min.js" type="text/javascript"></script>

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

Expand All @@ -57,7 +54,7 @@ There are several ways you can use the ml5.js library:

For example:
```html
<script src="https://unpkg.com/ml5@0.5.0/dist/ml5.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/ml5@0.6.0/dist/ml5.min.js" type="text/javascript"></script>
```

* You can also reference "latest", but we do not recommend this as your code may break as we update ml5.
Expand All @@ -70,13 +67,13 @@ For example:

- [Getting Started](https://ml5js.org/getting-started/)
- [API Reference](https://ml5js.org/reference/)
- [Examples](https://github.com/ml5js/ml5-library/tree/development/examples)
- [Examples](https://github.com/ml5js/ml5-library/tree/main/examples)
- [Community](https://ml5js.org/community)
- [FAQ](https://ml5js.org/getting-started/faq/)

## Standalone Examples

You can find a collection of standalone examples in this repository within the `examples/` directory. You can also test working hosted of the examples online on the ml5.js examples index website (TODO: Add a link).
You can find a collection of standalone examples in this repository within the `examples/` directory. You can also test working hosted of the examples online on the [ml5.js examples index website](https://examples.ml5js.org/).

These examples are meant to serve as an introduction to the library and machine learning concepts.

Expand Down
Binary file added docs/_media/reference__header-handpose.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* [PoseNet](/reference/posenet.md)
* [BodyPix](/reference/bodypix.md)
* [UNET](/reference/unet.md)
* [Handpose](/reference/handpose.md)
* [Facemesh](/reference/facemesh.md)
* [FaceApi](/reference/face-api.md)
* [StyleTransfer](/reference/style-transfer.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Mostly.

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).

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).
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](/tutorials/local-web-server.md).

Thanks!

Expand All @@ -28,4 +28,4 @@ Please contact us at [@ml5js on twitter](https://twitter.com/ml5js), <a href="ma

### How can I contribute?

Please refer to the contributor documentation [on Github](https://github.com/ml5js/ml5-library/blob/development/CONTRIBUTING.md).
Please refer to the contributor documentation [on Github](https://github.com/ml5js/ml5-library/blob/main/CONTRIBUTING.md).
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
</a>

<div class="Menu__Top__Menu">
<a class="Menu__Top__Menu__Item" href="https://ml5js.github.io/ml5-library/docs/#/"
<a class="Menu__Top__Menu__Item" href="https://learn.ml5js.org/#/"
>Getting Started</a
>
<a class="Menu__Top__Menu__Item" href="https://ml5js.github.io/ml5-library/docs/#/reference/index"
<a class="Menu__Top__Menu__Item" href="https://learn.ml5js.org/#/reference/index"
>Reference</a
>
<a class="Menu__Top__Menu__Item" href="https://ml5js.org/community/">Community</a>
Expand Down
16 changes: 8 additions & 8 deletions docs/reference/bodypix.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ bodyPix.segmentWithParts(?input, ?options, callback);
## Examples
**p5.js**
* [BodyPix_Image](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/BodyPix/BodyPix_Image)
* [BodyPix_Webcam](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/BodyPix/BodyPix_Webcam)
* [BodyPix_Webcam_Parts](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/BodyPix/BodyPix_Webcam_Parts)
* [BodyPix_p5Instance](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/BodyPix/BodyPix_p5Instance)
* [BodyPix_Image](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/BodyPix/BodyPix_Image)
* [BodyPix_Webcam](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/BodyPix/BodyPix_Webcam)
* [BodyPix_Webcam_Parts](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/BodyPix/BodyPix_Webcam_Parts)
* [BodyPix_p5Instance](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/BodyPix/BodyPix_p5Instance)
**p5 web editor**
* [BodyPix_Image](https://editor.p5js.org/ml5/sketches/BodyPix_Image)
Expand All @@ -274,9 +274,9 @@ bodyPix.segmentWithParts(?input, ?options, callback);
* [BodyPix_p5Instance](https://editor.p5js.org/ml5/sketches/BodyPix_p5Instance)
**plain javascript**
* [BodyPix_Image](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/BodyPix/BodyPix_Image)
* [BodyPix_Webcam](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/BodyPix/BodyPix_Webcam)
* [BodyPix_Webcam_Parts](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/BodyPix/BodyPix_Webcam_Parts)
* [BodyPix_Image](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/BodyPix/BodyPix_Image)
* [BodyPix_Webcam](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/BodyPix/BodyPix_Webcam)
* [BodyPix_Webcam_Parts](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/BodyPix/BodyPix_Webcam_Parts)
## Demo
Expand Down Expand Up @@ -347,4 +347,4 @@ TBD
## Source Code
* [/src/BodyPix](https://github.com/ml5js/ml5-library/tree/development/src/BodyPix)
* [/src/BodyPix](https://github.com/ml5js/ml5-library/tree/main/src/BodyPix)
14 changes: 7 additions & 7 deletions docs/reference/charrnn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

RNN and LSTMs (Long Short Term Memory networks) are a type of Neural Network architecture useful for working with sequential data (like characters in text or the musical notes of a song) where the order of the that sequence matters. This class allows you run a model pre-trained on a body of text to generate new text.

You can train your own models using this tutorial or use this set of pre trained models.
You can train your own models [following the instructions in the training-charRNN repo](https://github.com/ml5js/training-charRNN). There is also a selection of [pre-trained model examples available](https://github.com/ml5js/ml5-data-and-models/tree/main/models/charRNN).

## Quickstart

Expand Down Expand Up @@ -153,9 +153,9 @@ charrnn.reset();
## Examples
**p5.js**
* [CharRNN_Interactive](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/CharRNN/CharRNN_Interactive)
* [CharRNN_Text](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/CharRNN/CharRNN_Text)
* [CharRNN_Text_Stateful](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/CharRNN/CharRNN_Text_Stateful)
* [CharRNN_Interactive](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/CharRNN/CharRNN_Interactive)
* [CharRNN_Text](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/CharRNN/CharRNN_Text)
* [CharRNN_Text_Stateful](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/CharRNN/CharRNN_Text_Stateful)
**p5 web editor**
Expand All @@ -164,9 +164,9 @@ charrnn.reset();
* [CharRNN_Text_Stateful](https://editor.p5js.org/ml5/sketches/CharRNN_Text_Stateful)
**plain javascript**
* [CharRNN_Interactive](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/CharRNN/CharRNN_Interactive)
* [CharRNN_Text](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/CharRNN/CharRNN_Text)
* [CharRNN_Text_Stateful](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/CharRNN/CharRNN_Text_Stateful)
* [CharRNN_Interactive](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/CharRNN/CharRNN_Interactive)
* [CharRNN_Text](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/CharRNN/CharRNN_Text)
* [CharRNN_Text_Stateful](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/CharRNN/CharRNN_Text_Stateful)
## Demo
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/cvae.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ cvae.generate(label, callback);
## Examples
**p5.js**
* [CVAE_QuickDraw](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/CVAE/CVAE_QuickDraw)
* [CVAE_QuickDraw](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/CVAE/CVAE_QuickDraw)
**p5 web editor**
* [CVAE_QuickDraw](https://editor.p5js.org/ml5/sketches/CVAE_QuickDraw)
**plain javascript**
* [CVAE_QuickDraw](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/CVAE/CVAE_QuickDraw)
* [CVAE_QuickDraw](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/CVAE/CVAE_QuickDraw)
## Demo
Expand Down Expand Up @@ -157,4 +157,4 @@ TBD
## Source Code
[/src/CVAE/](https://github.com/ml5js/ml5-library/tree/development/src/CVAE)
[/src/CVAE/](https://github.com/ml5js/ml5-library/tree/main/src/CVAE)
16 changes: 8 additions & 8 deletions docs/reference/dcgan.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ dcgan.generate(callback, ?latentVector);
## Examples
**p5.js**
* [DCGAN_LatentVector](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/DCGAN/DCGAN_LatentVector)
* [DCGAN_LatentVector_RandomWalk](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/DCGAN/DCGAN_LatentVector_RandomWalk)
* [DCGAN_LatentVector_Slider](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/DCGAN/DCGAN_LatentVector_Slider)
* [DCGAN_Random](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/DCGAN/DCGAN_Random)
* [DCGAN_LatentVector](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/DCGAN/DCGAN_LatentVector)
* [DCGAN_LatentVector_RandomWalk](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/DCGAN/DCGAN_LatentVector_RandomWalk)
* [DCGAN_LatentVector_Slider](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/DCGAN/DCGAN_LatentVector_Slider)
* [DCGAN_Random](https://github.com/ml5js/ml5-library/tree/main/examples/p5js/DCGAN/DCGAN_Random)
**p5 web editor**
* [DCGAN_LatentVector](https://editor.p5js.org/ml5/sketches/DCGAN_LatentVector)
Expand All @@ -118,10 +118,10 @@ dcgan.generate(callback, ?latentVector);
**plain javascript**
* [DCGAN_LatentVector](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/DCGAN/DCGAN_LatentVector)
* [DCGAN_LatentVector_RandomWalk](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/DCGAN/DCGAN_LatentVector_RandomWalk)
* [DCGAN_LatentVector_Slider](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/DCGAN/DCGAN_LatentVector_Slider)
* [DCGAN_Random](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/DCGAN/DCGAN_Random)
* [DCGAN_LatentVector](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/DCGAN/DCGAN_LatentVector)
* [DCGAN_LatentVector_RandomWalk](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/DCGAN/DCGAN_LatentVector_RandomWalk)
* [DCGAN_LatentVector_Slider](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/DCGAN/DCGAN_LatentVector_Slider)
* [DCGAN_Random](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/DCGAN/DCGAN_Random)
Expand Down
Loading

0 comments on commit d1fcb19

Please sign in to comment.