20

GitHub - ml5js/ml5-examples: A collection of ml5.js examples

 4 years ago
source link: https://github.com/ml5js/ml5-examples
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

ml5 Examples

Description

This repository contains a collection of examples using ml5.js. The examples are meant to serve as an introduction to the library and machine learning concepts.

Examples are organized into folders according to their integration with other JavaScript libraries.

For example, the /p5js folder holds examples of using ml5.js with p5.js. All examples are self-contained and can be run independently. Libraries are loaded through a Content Delivery Network (CDN) and certain examples (indicated in code comments) download a machine learning model from a "cloud" url. This means that ml5 currently relies on an internet connection in order to retrieve pre-trained models (unless they are served locally).

Instead of using the CDN links to p5 and ml5, you can download the p5.js libraries here and ml5 library here.

Setup

Step 1: or clone this repository:

Open your terminal and type:

# clone the repo or download the zip file
git clone https://github.com/ml5js/ml5-examples.git

Step 2: start a local development server

Open your terminal

# change directories
cd ml5-examples

# install the dependencies
npm install

# run the local web server
npm run develop

# you should be able to run the examples at: 
# localhost:8082

If you don't know how to start a server, check this guide on how to start a local web server.

Usage

Open your terminal

# change directories
cd ml5-examples

# run the local web server
npm run develop

# you should be able to run the examples at: 
# localhost:8082

Examples Index

Contributing

See CONTRIBUTING.MD

Contributors


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK