Show HN: Browser based deep fakes in pure JavaScript
filter.mot.omg.lol
filter.mot.omg.lol
async function setup() {
await faceapi.tf.setWasmPaths('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.12.0/dist/');
await faceapi.tf.setBackend('wasm');
await faceapi.tf.enableProdMode();
await faceapi.tf.ENV.set('DEBUG', false);
await faceapi.tf.ready();
const model = await set_and_get_filter('gigachad');
await faceapi.nets.tinyFaceDetector.load('./faceapi-models');
};Conversely, wasm can be transpiled to JS, and asm.js is also a thing.
Neat project!
https://github.com/dunnousername/yanderifier
It’s quick and dirty but they come out pretty decent and don’t take too terribly long if you have a dedicated GPU/card.
Example: https://youtu.be/32X3LOUorLI
Ironically, I remember the first Javascript demos (from 1996) I ever saw was a neural net demo: https://web.archive.org/web/19961226105339/http://www.ozemai...
Probably could be ported easily to ES 2.0 which still runs in most recent browsers. Just like in the late 80s, there was a hype cycle around neural nets in the late 90s.
It's been my experience that disabling automatic differentiation for a neural net still uses 50-100% as much memory in the forward pass/inference.