A Pen by Shigeru Kobayashi on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.clear(); | |
// Derived from https://github.com/therewasaguy/p5-music-viz/blob/gh-pages/demos/04b_fft_spectrograph/sketch.js | |
let mic; | |
let fft; | |
let index = 0; | |
let isRecording = false; | |
const speed = 1; |
A Pen by Shigeru Kobayashi on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Webcam Image Classification using MobileNet and p5.js</title> | |
</head> | |
<body> | |
<h1>Webcam Image Classification using MobileNet and p5.js</h1> | |
<p id='status'>Loading Model...</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Webcam Image Classification using MobileNet and p5.js</title> | |
</head> | |
<body> | |
<h1>Webcam Image Classification using MobileNet and p5.js</h1> | |
<p id='status'>Loading Model...</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.clear(); | |
const FOR_TRAINING = 0; | |
const FOR_TESTING = 1; | |
let featureExtractor; | |
let classifier; | |
let status; | |
let fileInput; | |
let testFileInput; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html | |
const ACCELEROMETER_SERVICE_UUID = "e95d0753-251d-470a-a062-fa1922dfa9a8"; | |
const ACCELEROMETER_DATA_UUID = "e95dca4b-251d-470a-a062-fa1922dfa9a8"; | |
let uBitDevice; | |
let sinThetaX = 0; | |
let sinThetaY = 0; | |
let lastAccelerationX = 0; | |
let lastAccelerationY = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html | |
// An implementation of Nordic Semicondutor's UART/Serial Port Emulation over Bluetooth low energy | |
const UART_SERVICE_UUID = "6e400001-b5a3-f393-e0a9-e50e24dcca9e"; | |
// Allows the micro:bit to transmit a byte array | |
const UART_TX_CHARACTERISTIC_UUID = "6e400002-b5a3-f393-e0a9-e50e24dcca9e"; | |
// Allows a connected client to send a byte array | |
const UART_RX_CHARACTERISTIC_UUID = "6e400003-b5a3-f393-e0a9-e50e24dcca9e"; |
A Pen by Shigeru Kobayashi on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<fieldset> | |
<legend>1. Train</legend> | |
<p>Specify a label for images, press the button to upload images for training. Once finished adding images for all labels, press the Train button to start training.</p> | |
<div> | |
<label for="labelForImages">Label for the images:</label> | |
<input type="text" id="labelFormages" name="labelForImages" /> | |
</div> | |
<div> | |
<label for="imagesToTrain">Images to train:</label> |