Skip to content

Instantly share code, notes, and snippets.

View kotobuki's full-sized avatar

Shigeru Kobayashi kotobuki

  • Institute of Advanced Media Arts and Sciences [IAMAS]
  • X @kotobuki
View GitHub Profile
@kotobuki
kotobuki / index.html
Last active October 15, 2018 03:43
Load Custom Model File
<body>
<fieldset>
<legend>1. Load</legend>
<p>Load files of your custom model from your local.</p>
<div>
<label for="modelFiles">Model files:</label>
<input type="file" id="modelFiles" name="modelFiles" multiple />
</div>
</fieldset>
<fieldset>
@kotobuki
kotobuki / index.html
Last active October 16, 2018 02:08
Transfer Learning with Data Augmentation by p5.js
<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>
@kotobuki
kotobuki / first-p5-js-sketch.markdown
Last active October 7, 2018 03:38
First p5.js Sketch
@kotobuki
kotobuki / script.js
Last active August 7, 2024 14:34
Web Bluetooth with micro:bit (UART)
// 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";
@kotobuki
kotobuki / script.js
Last active July 28, 2024 15:23
Web Bluetooth with micro:bit (Acceleration)
// 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;
@kotobuki
kotobuki / script.js
Created September 3, 2018 07:59
Transfer Learning w/ Data Augmentation
console.clear();
const FOR_TRAINING = 0;
const FOR_TESTING = 1;
let featureExtractor;
let classifier;
let status;
let fileInput;
let testFileInput;
@kotobuki
kotobuki / index.html
Created August 30, 2018 04:42
Video Classification
<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>
@kotobuki
kotobuki / index.html
Last active August 31, 2018 12:10
Video Classification + IFTTT Trigger
<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>
@kotobuki
kotobuki / getting-started-with-javascript.markdown
Last active October 7, 2018 01:20
Getting Started with JavaScript
@kotobuki
kotobuki / linear-regression.markdown
Last active August 31, 2018 13:38
Linear Regression