L
Liu Liu
liuliu.me · Personal blog · on HN since 2010
Liu Liu writes technical posts on machine learning on devices, JavaScript face detection, Bazel builds, and fast data loading.
What HN saysHN commenters link his posts on running Stable Diffusion on an iPhone and on JavaScript face detection, plus one on cryptocurrency risk.
20HN people shared it
14linked it in comments
29stories submitted
1.2Kstory points
1 year agolast shared
2010people per year2026
Most-shared posts
- 1A not-so-slow Face Detector in Javascript8 people · 2 points · first shared 2010 · discussion on HN
- 2Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device5 people · 751 points · first shared 2022 · 175 comments on HN
- 3Face Detector in JS4 people · 23 points · first shared 2012 · 4 comments on HN
- 4Loading CSV File at the Speed Limit of the NVMe Storage2 people · 198 points · first shared 2020 · 66 comments on HN
- 5JavaScript Face Detection Explained2 people · 6 points · first shared 2012 · discussion on HN
- 6The Universal Training Loop of Machine Learning2 people · 3 points · first shared 2021 · discussion on HN
- 7Migrating iOS Project to Bazel, a Real-World Experience2 people · 3 points · first shared 2020 · discussion on HN
- 8Bazel For Open-Source C/C++ Libraries Distribution1 people · 64 points · first shared 2020 · 76 comments on HN
- 9A More Natural Stackless Coroutine in C That Maintains Local Variables1 people · 61 points · first shared 2019 · 13 comments on HN
- 10Reducing Memory Usage for DNN Training with Tensor Compression1 people · 25 points · first shared 2019 · 3 comments on HN
- 11Research Notes on Humanoid Robots1 people · 25 points · first shared 2021 · 13 comments on HN
- 12The Endgame for Cryptocurrency1 people · 21 points · first shared 2021 · 21 comments on HN
- 13The Lesson from Private Ski Lesson, or How Money Cannot Buy Performance1 people · 11 points · first shared 2021 · 6 comments on HN
- 14Write Cross-Platform GUI in Swift Like It Is 19981 people · 10 points · first shared 2020 · 3 comments on HN
- 15A Core Data Alternative Crossed Platform to Linux1 people · 3 points · first shared 2020 · discussion on HN
What HN people wrote when they linked it
liuliu · 2021-10-08
That's always the game plan though. I wrote about it a few days ago: https://liuliu.me/eyes/the-endgame-for-cryptocurrency/
Once you have big enough following, having enough systematic risk, you, average scammers can enter "too big to fail" category, especially in democratic countries.
If USDT successfully turned half of the U.S. families holding 25% of cryptocurrency-related assets, they can work out any scamming issues they have in hand.
nl · 2012-03-20
Back in 2009 I did some work on augmented reality in the browser[1]. Back then there was no WebRTC, so I had to shim Flash to Canvas to get webcam images, and I implemented image tracking using a simple color tracking algorithm.
If this really is doing image tracking in JS (as tomp noted the explanation isn't clear) then I'm very impressed.
The previous state of the art was some great face-detection code I'd seen, but it is much slower than this.
[1] http://nicklothian.com/blog/2009/11/18/augmented-reality-virtual-keybo…
[2] http://liuliu.me/eyes/javascript-face-detection-explained/, http://apprtc.appspot.com/html/face.html
desro · 2023-04-22
After reading through all the comments, I'm surprised that no one has looked at this from a Siri-centric perspective [except for the comment about Clippy ;)].
To me this looks like laying the groundwork for centralizing the most relevant and important information about yourself, which so crucially includes the contexts you are in! and are so often painstaking to actually record in detail when journalling manually. For what purpose? I genuinely think this leads to a Siri that's finally useful in a way that leapfrogs everything and everyone else out there. Think GPT-4(+) with an insane amount of detail and context tailored to you, and (hopefully!) executed in a way that re-affirms Apple's stated commitment to privacy and security.
I have only the most cursory understanding of ML technology but have obviously been trying to follow along with everything pretty much since DALLE-2 made such a splash. With some of the impressive performance shown in smaller models, sometimes with different quantization, I think that Apple Neural Engine silicon might be getting more attention soon... okay, "soon" is probably over-optimistic. But – in September '22 I asked online about running Stable Diffusion[0] on M1 chips on iPad, since I was able to run it on an M1 Mac Mini. The 8-ball said "outlook not so good," and yet by November 8th liuliu had it running on _iPhone_[1]. These are truly interesting times.
[0] I know this is not a 1:1 comparison. But Llama ran on my MacBook without any…
syspec · 2022-12-02
There's also https://draw.nnc.ai/ - which is an iOS / iPad app running Stable Diffusion.
The author has a detailed blogpost outlining how he modified the model to use Metal on iOS devices. https://liuliu.me/eyes/stretch-iphone-to-its-limit-a-2gib-model-that-c…
zk00006 · 2014-03-10
I agree, putting one more layer on top of JS does not allow to do substantially different things. But I would argue that this is the only option. Google is pushing its PNaCl [1] clients where you can run C++ code in your browser independent of the platform. Isn't this partially solution to the chicken-and-egg problem? It may get adapted because there is a strong player behind it. It also allows substantially different things to be on the web. For instance you can run some heavy computer vision app analyzing webcam stream directly on client side. Apart from notable JS exceptions [2].
[1] http://www.chromium.org/nativeclient/pnacl
[2] http://liuliu.me/ccv/js/nss/
BitMastro · 2014-01-09
Check also those open source libraries:
http://inspirit.github.io/jsfeat/sample_haar_face.html
and
http://inspirit.github.io/jsfeat/sample_bbf_face.html
also http://liuliu.me/ccv/js/nss/
joshsegall · 2012-03-25
http://liuliu.me/ccv/js/nss/#http%3A%2F%2Fwww.perekop.net%2Fwp-content…
Apparently Churchill's crotch looks more like a face than his actual face. And Stalin gets the cold shoulder.
maushu · 2011-08-12
Wouldn't it be better to use a JavaScript face detector? Like http://liuliu.me/detect/detect.html
I don't know the details about this algorithm though, no idea if you can get the proper position for the mustache.
xd · 2010-12-14
This uses the face detection library here: http://badassjs.com/post/1461943420/face-detection-in-javascript-via-h…
Which has a link to upload and test your own pictures here: http://liuliu.me/detect/detect.html
templaedhel · 2010-11-03
It seems to on average get about half the faces.
http://liuliu.me/detect/detect.html#http%3A%2F%2Fwww.alexreisner.com%2…
http://liuliu.me/detect/detect.html#http%3A%2F%2Fkk.org%2Fct2%2FFaceSw…
It recognizes upside down faces though, which is impressive.
http://liuliu.me/detect/detect.html#http%3A%2F%2Fwww.scifun.ed.ac.uk%2…
Overall, a great demo.
mayanklahiri · 2010-11-02
The blog post is a little light on details. Just go to the source and demo on the original creator's site: http://liuliu.me/detect/detect.html
Canvas allows access to individual pixels in an image, and JS is arguably faster than BASIC interpreters of the 80s. Fun things lie ahead in client-side image processing.
EDIT: Incidentally, the code is pretty hairy and has about 3 comments. It's hard to figure out what ML approach he's using from a cursory look.
EDIT: Aah, definitely an image pyramid in there, so some multi-resolution stuff happening.
callmeed · 2010-11-02
I did this one:
http://liuliu.me/detect/detect.html#http://antikewl.com/daily/wp-conte…
And it only detected Jobs, but not Woz ...
abeppu · 2010-11-02
Trouble with false positives : http://liuliu.me/detect/detect.html#http%3A%2F%2Ffarm1.static.flickr.c…
jbail · 2010-11-02
Here is the face detection demo I ran: http://liuliu.me/detect/detect.html#http%3A%2F%2Fimg.dailymail.co.uk%2…
(press the Detect button when the page loads)
That is impressive.