MCPcopy Index your code
hub / github.com/ml5js/ml5-library

github.com/ml5js/ml5-library @0.12.2 sqlite

repository ↗ · DeepWiki ↗ · release 0.12.2 ↗
1,263 symbols 2,544 edges 236 files 209 documented · 17%
README

Read our ml5.js Code of Conduct and software licence here!

ml5

All Contributors BrowserStack Status Version Twitter Follow

This project is currently in development.

Friendly machine learning for the web!

ml5.js aims to make machine learning approachable for a broad audience of artists, creative coders, and students. The library provides access to machine learning algorithms and models in the browser, building on top of TensorFlow.js.

The library is supported by code examples, tutorials, and sample data sets with an emphasis on ethical computing. Bias in data, stereotypical harms, and responsible crowdsourcing are part of the documentation around data collection and usage.

ml5.js is heavily inspired by Processing and p5.js.

Please read our Code of Conduct, which establishes our commitment to make ml5.js a friendly and welcoming environment.

Usage

Before getting started with ml5.js, review our Code of Conduct. There are several ways you can use the ml5.js library:

  • You can use the latest version (0.12.1) by adding it to the head section of your HTML document:

v0.12.1

<script src="https://unpkg.com/ml5@0.12.1/dist/ml5.min.js" type="text/javascript"></script>
  • 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. You can use those previous versions by replacing <version> with the ml5 version of interest:
<script src="https://unpkg.com/ml5@<version>/dist/ml5.min.js" type="text/javascript"></script>

For example:

<script src="https://unpkg.com/ml5@0.6.1/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.
<script src="https://unpkg.com/ml5@latest/dist/ml5.min.js" type="text/javascript"></script>

Resources

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.

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 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 documentation to get started.

See CONTRIBUTING 🛠

Acknowledgements

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 at NYU's ITP/IMA program.

Many thanks BrowserStack for providing testing support.

Contributors

Thanks goes to these wonderful people (emoji key):

Daniel Shiffman 💻 💡 📆 👀 ⚠️ 📹 Cristóbal Valenzuela 💻 💡 👀 🔧 ⚠️ Yining Shi 💻 💡 👀 🔧 ⚠️ 🐛 Hannah Davis 💻 💡 Joey Lee 💻 💡 👀 🖋 ⚠️ AshleyJaneLewis 📝 🎨 📋 🖋 Ellen Nickles 📝 🖋 🤔
Itay Niv 💻 💡 Nikita Huggins 📝 🖋 🤔 Arnab Chakravarty 🖋 📓 Aidan Nelson 💻 💡 WenheLI 💻 💡 🚧 🤔 Darius Kazemi 🤔 💬 Dingsu Wang 💻 💡
garym140 🖋 📝 🤔 📓 Gene Kogan 💻 💡 🤔 Hayley Hwang 💻 💡 🤔 Lisa Jamhoury 💡 🤔 Alejandro Matamala Ortiz 🎨 🖋 📝 Maya Man 💻 💡 <

Core symbols most depended-on inside this repo

createCanvas
called by 65
examples/javascript/YOLO/YOLO_webcam/sketch.js
callCallback
called by 58
src/utils/callcallback.js
classify
called by 48
src/KMeans/index.js
dispose
called by 46
src/KNNClassifier/index.js
train
called by 23
src/FeatureExtractor/Mobilenet.js
addData
called by 23
src/NeuralNetwork/index.js
predict
called by 21
src/CharRNN/index.js
detect
called by 21
src/FaceApi/index.js

Shape

Function 839
Method 336
Class 88

Languages

TypeScript100%

Modules by API surface

src/NeuralNetwork/index.js43 symbols
src/NeuralNetwork/NeuralNetworkData.js31 symbols
src/NeuralNetwork/NeuralNetwork.js19 symbols
src/FeatureExtractor/Mobilenet.js18 symbols
src/KNNClassifier/index.js17 symbols
src/CharRNN/index.js17 symbols
scripts/batch-update-p5webeditor.js16 symbols
src/StyleTransfer/index.js14 symbols
examples/javascript/KNNClassification/KNNClassification_VideoSound/sketch.js14 symbols
src/NeuralNetwork/NeuralNetworkUtils.js13 symbols
src/KMeans/index.js13 symbols
src/FaceApi/index.js13 symbols

Dependencies from manifests, versioned

@babel/cli7.17.6 · 1×
@babel/core7.17.9 · 1×
@babel/plugin-proposal-object-rest-spread7.17.3 · 1×
@babel/plugin-transform-runtime7.17.0 · 1×
@babel/polyfill7.12.1 · 1×
@babel/preset-env7.16.11 · 1×
@babel/register7.17.7 · 1×
@babel/runtime7.17.9 · 1×
@babel/runtime-corejs37.17.9 · 1×
@magenta/sketch0.2.0 · 1×
@tensorflow-models/body-pix1.1.2 · 1×
@tensorflow-models/coco-ssd2.0.0 · 1×

For agents

$ claude mcp add ml5-library \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact