Intro-ML-Arts-IMA-F24

Transformers.js with p5.js

Objectives

Transformers.js Guides and Documentation

JavaScript for Transformers.js

p5.js DOM Basics and Resources

Example Projects and Demos

Code Examples

Assignment

For this weekโ€™s assignment:

  1. Choose any model available in Transformers.js and create a p5.js sketch using it. Try any transformer.sj compatible model! Some things you might look for are:

    • Object Detection: ๐Ÿ•ต๏ธ Detect objects in an image.
    • Image Segmentation: โœ‚๏ธ Segment an image into parts.
    • Text Generation: โœ๏ธ Generate text based on a user prompt.
    • Whisper (Speech-to-Text): ๐ŸŽ™๏ธ Transcribe audio from a file or real-time microphone.
    • Depth Estimation: ๐Ÿ“ Create a depth map from an image or video feed.
  2. Compare and Contrast:

    • Compare your experience of using Transformers.js with ml5.js. Reflect on differences in ease of use, performance, model variety, and integration with p5.js.
  3. Document your sketch in a blog post and add a link to the Assignment Wiki page. Remember to include visual documentation (screenshots, GIFs, etc) Also, please document what did and did not work! What errors did you encounter with Transformers.js?