In my previous post (https://lnkd.in/eNwYiCYP), I showcased how to run a 𝐘𝐎𝐋𝐎 model on a server and send real-time object detection results to the client via 𝐖𝐞𝐛𝐒𝐨𝐜𝐤𝐞𝐭𝐬. While this works well, setting up and maintaining servers can be expensive and cumbersome.
What if you could 𝐫𝐮𝐧 𝐭𝐡𝐞 𝐬𝐚𝐦𝐞 𝐦𝐨𝐝𝐞𝐥 𝐝𝐢𝐫𝐞𝐜𝐭𝐥𝐲 𝐢𝐧 𝐭𝐡𝐞 𝐛𝐫𝐨𝐰𝐬𝐞𝐫, eliminating the need for a server completely?
Well, you can – thanks to 𝐖𝐞𝐛𝐀𝐬𝐬𝐞𝐦𝐛𝐥𝐲 (𝐖𝐀𝐒𝐌). In the new iteration of the object detection project, I’ve used Rust and the Candle ML framework to compile YOLOv8 model into a WASM module.
This means that all processing happens directly in the browser, saving server costs, maintenance efforts, and increasing user privacy.
And best of all, you can now try it out yourself by visiting the live version: https://lnkd.in/eJ6uhGc4 🙂
If you are curious about the implementation, it’s available on GitHub: https://lnkd.in/eXQFgbzH
Interestingly, I initially wanted to implement this project using C++, but I found Rust’s toolchain for WASM development to be much more developer-friendly! 🦀
More details: https://blog.arcjet.com/rethinking-our-rest-api-building-the-golden-api/