Live data from Hacker News

SIMD-accelerated computer vision on a $2 microcontroller

shraiwi.github.io

51–60 of 60 posts

Re: SIMD-accelerated computer vision on a $2 microcontroller

#52

tinyml fascinates me because its principles can be directly applied to web-based applications imho. micropython seems pretty accessible from first glance. would it be easy to create a webassembly port of its code?

MicroPython port for WASM/JS already exists. For device usecases, one can play with it at https://micropython.org/unicorn/

It can be used in PyScript for client side development. And has JavaScript/DOM bridge as well. https://pyscript.net/tech-preview/micropython/about.html

Re: SIMD-accelerated computer vision on a $2 microcontroller

#53
post #34

If you're interested in this stuff and wanna try it yourself, check out our product, Edge Impulse: https://edgeimpulse.com/ai-practitioners We work directly with vendors to perform low level optimization of deep learning, computer vision, and DSP workloads for dozens of architectures of microcontrollers and CPUs, plus exotic accelerators (neuromorphic compute!) and edge GPUs. This includes ESP32: https://docs.edgeimp…

Why C++? Does the C++ code use any difficult C++ features or is it more C with classes?

We use C++11 because we depend on some source that relies on it, but you can of course compile the library and then link to a C program:

https://docs.edgeimpulse.com/docs/run-inference/cpp-library/...

Re: SIMD-accelerated computer vision on a $2 microcontroller

#54
post #47

Earlier quoted context omitted.

More expensive sure. But better is pretty rich considering it is Intel. My money is on this platform just evaporating in the next 5 years. Esp32 has proven you can rely on supply and longevity.

Arguably the UP^2 is another class of device. Up to 8 GB of RAM and up to 128 GB of storage + a whole x86 CPU with dual gigabit LAN. And the price, size and power consumption are also quite a bit higher but it will certainly grant a better general compute environment, if you want to run Linux or smth.

It's very easy to use any pytorch or tensorflow packages, or open3d, pcl, librealsense or similar vision packages. Powerful enough to do realtime vision tasks, which you certainly cannot do with 2€ boards.

Re: SIMD-accelerated computer vision on a $2 microcontroller

#55
post #34

If you're interested in this stuff and wanna try it yourself, check out our product, Edge Impulse: https://edgeimpulse.com/ai-practitioners We work directly with vendors to perform low level optimization of deep learning, computer vision, and DSP workloads for dozens of architectures of microcontrollers and CPUs, plus exotic accelerators (neuromorphic compute!) and edge GPUs. This includes ESP32: https://docs.edgeimp…

I don't think the output from this can be used in any open source project due to the community plan restrictions, FYI.

That's definitely not our intention: the output of all Community projects is by default Apache 2.0 licensed, unless the developer specifies a different one.

The community plan does have commercial use restrictions; it's designed for education, demos, and research. We have a pretty good presence in the academic community with tons of papers, code, and projects developed using our community version.

Here's a Google Scholar search showing a bunch of papers:

https://scholar.google.com/scholar?start=0&q=%22edge+impulse...

We also have our own public sharing platform:

https://edgeimpulse.com/projects/overview

Re: SIMD-accelerated computer vision on a $2 microcontroller

#56
post #27

Yep, SIMD seems to win the race vs SMT for that type of processing.

I don't think SIMD and SMT is an either/or proposition. SMT-4 or SMT-8 with a bunch of SIMD has the potential to get better perf/area due to the threads hiding the latency.

Re: SIMD-accelerated computer vision on a $2 microcontroller

#57

A comparable board is the ESP32-CAM, which is supported by this really practical computer vision project: https://github.com/jomjol/AI-on-the-edge-device?tab=readme-o...

In the CV department, I recently ordered a cheap FPGA + ARM Cortex-M3 + 64 Mbit SRAM + 32 Mbit flash that does camera input and HDMI output. Like a budget Zynq for CV. https://wiki.sipeed.com/hardware/en/tang/Tang-Nano-4K/Nano-4... https://www.aliexpress.us/item/3256806880637138.html

What an awesome amount of tech for so little money.

Re: SIMD-accelerated computer vision on a $2 microcontroller

#58
post #30

Earlier quoted context omitted.

Compared to ESP8266, there's generally pretty good ESP32 support for Rust, but you'll likely need to use in your C++ toolchain if you want to use the standard library. no-std in Rust for ESP32 isn't terrible in my experience, though, just not as fleshed out - particularly for hooking into components like wifi/networking and probably a camera as well. Like the other commenter said, there's plenty of support for SIMD a…

You can actually use the IDF system in Rust to use the std lib, at least on ESP32-C3. Probably others too. If you are on Windows, you will need to place the project folder at the top level drive directory, and there are other quirks as well, but it works.

Haha yes, I misphrased a bit but that's what I meant when I said you'll need to use C++ to use the stdlib. It's not quite pure embedded Rust but yes it does work.

Re: SIMD-accelerated computer vision on a $2 microcontroller

#59

Earlier quoted context omitted.

I dunno about OLED, but now that you say it the costs do make some sort of "smart" coffee disturbingly plausible.

Based on the recent post about the disposable Montreal subway tickets with a super cheap nfc chip (and amusingly on a paper ticket with a a printed on fake smart chip connection) it should be super cheap to have an automated kiosk that pairs your drink order to a paper cup that when a barista swipes shows your cup your order shows up or fills it automatically. https://www.righto.com/2024/06/montreal-mifare-ultralight…

Seems like it would be cheaper to have a simple QR code be thermally printed on the cup. A fraction of a penny's worth of chemical spritz on the bottom of the cup would do the trick.

Re: SIMD-accelerated computer vision on a $2 microcontroller

#60
post #4

Earlier quoted context omitted.

Thanks for reading! > What are some use cases for FAST? The FAST feature detector is an algorithm for finding regions of an image that are visually distinctive, which can be used as a first step in motion tracking and SLAM (simultaneous localization and mapping) algorithms typically seen in XR, robotics, etc. > Is there TPU-like functionality in anything in this price range of chips yet? I think that in the case of t…

SimSIMD https://github.com/ashvardanian/SimSIMD : > Up to 200x Faster Inner Products and Vector Similarity — for Python, JavaScript, Rust, C, and Swift, supporting f64, f32, f16 real & complex, i8, and binary vectors using SIMD for both x86 AVX2 & AVX-512 and Arm NEON & SVE github.com/topics/simd: https://github.com/topics/simd https://news.ycombinator.com/item?id=37805810#37808036

From gh-topics/SIMD:

SIMDe: SIMD everywhere: https://github.com/simd-everywhere/simde :

> The SIMDe header-only library provides fast, portable implementations of SIMD intrinsics on hardware which doesn't natively support them, such as calling SSE functions on ARM. There is no performance penalty if the hardware supports the native implementation (e.g., SSE/AVX runs at full speed on x86, NEON on ARM, etc.).

> This makes porting code to other architectures much easier in a few key ways:

Post reply on HN