Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Langsung ke konten utama

r/tensorflow


[P] The Time Warp Scan filter, running 100% in the browser with TensorFlow.js (open source)
[P] The Time Warp Scan filter, running 100% in the browser with TensorFlow.js (open source)

I built a browser version of the Time Warp Scan filter that went viral on TikTok: https://timewarpscan.me

How it works: each webcam frame goes through tf.browser.fromPixels, gets resized and optionally mirrored, then a thin slice at the scan line is cut out with tf.slice and tf.concat-ed onto the slices from earlier frames. Every row (or column) of the final image was captured at a different moment, which is what makes the warp. It all runs on the WebGL backend inside tf.tidy, so nothing leaves your device and memory stays flat.

I just modernized it: it now uses only @tensorflow/tfjs-core + the WebGL backend instead of the full bundle, and the scanner is lazy-loaded, so the landing page went from ~377 KB to ~47 KB of gzipped JS.

The code is MIT licensed: https://github.com/GantMan/timewarp. The previous/ folder has six small HTML prototypes that build the effect up one step at a time, if you want to learn the technique.

Known issue: it misbehaves in Firefox. If anyone knows why, PRs welcome!


Iklan: Try Acrobat FREE for 7 days. Create, customise, & deliver a complete presentation in just minutes. Then polish it to your specific audience. Leaving you extra time to rehearse.
Try Acrobat FREE for 7 days. Create, customise, & deliver a complete presentation in just minutes. Then polish it to your specific audience. Leaving you extra time to rehearse.
Try Acrobat FREE for 7 days. Create, customise, & deliver a complete presentation in just minutes. Then polish it to your specific audience. Leaving you extra time to rehearse.


Tensorflow Flash Attention 2 wrapper
Tensorflow Flash Attention 2 wrapper
General

Here is a tensorflow wrapper for flash attention 2 - needed to create it since one is not implemented and attention was too slow. Feel free to use.
https://github.com/Krasner/tf-flash-attention-2

All it does is wraps the original flash attention code: https://github.com/dao-ailab/flash-attention and allows for XLA - so that `jit_compile=True` doesn't fail.


I compiled quantized TFLite models into standalone C++ (NN2Prog)
I compiled quantized TFLite models into standalone C++ (NN2Prog)
General

I've been working on NN2Prog, a small open-source compiler that turns quantized .tflite models into standalone C++17. The generator uses Python's standard library; the generated model doesn't need a TFLite runtime.

Started with Hey Jarvis wake-word models, then added MLPerf Tiny KWS and Visual Wake Words. On ESP32-S3 at 240 MHz, KWS now takes 15.68 ms vs 17.90 ms with TFLite Micro + ESP-NN, with 16.7 KB vs 35.5 KB working memory. VWW is basically tied: 72.44 vs 72.85 ms.

These are model-only timings, not an official MLPerf submission. For KWS, generated code returns top-1 directly; the reference computes softmax then argmax. Decisions match in the tests. Operator coverage is still limited, so this isn't a drop-in replacement for arbitrary TFLite models.

Code, examples and benchmark details: https://github.com/phplego/nn2prog

Would be interested in small quantized models that expose gaps in this approach, or other code-generation tools worth comparing against.