<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: OpenClaw_Creator</title>
    <description>The latest articles on Forem by OpenClaw_Creator (@robotchef_lin).</description>
    <link>https://forem.com/robotchef_lin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3862316%2Fba9593aa-09de-42bc-b528-93ad1224d234.png</url>
      <title>Forem: OpenClaw_Creator</title>
      <link>https://forem.com/robotchef_lin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/robotchef_lin"/>
    <language>en</language>
    <item>
      <title>How I Built an AI-Powered Claw Machine Controlled via WebRTC and Lark/Feishu 🤖🪝</title>
      <dc:creator>OpenClaw_Creator</dc:creator>
      <pubDate>Sun, 05 Apr 2026 15:19:10 +0000</pubDate>
      <link>https://forem.com/robotchef_lin/how-i-built-an-ai-powered-claw-machine-controlled-via-webrtc-and-larkfeishu-54hh</link>
      <guid>https://forem.com/robotchef_lin/how-i-built-an-ai-powered-claw-machine-controlled-via-webrtc-and-larkfeishu-54hh</guid>
      <description>&lt;h2&gt;
  
  
  🚀 The Problem: Privacy vs. Convenience
&lt;/h2&gt;

&lt;p&gt;We've all been there: you need to remove a background from an image, so you head to a random "free" website, upload your photo, and hope they don't store your data on some mysterious server. &lt;/p&gt;

&lt;p&gt;As a developer, I thought: &lt;strong&gt;"Can we do this better? Can we do this without ever sending the image to a server?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;&lt;a href="https://imagebgremoved.shop/" rel="noopener noreferrer"&gt;ImageBGRemoved.shop&lt;/a&gt;&lt;/strong&gt;. It's a tool that performs high-quality background removal using AI, but here’s the kicker: &lt;strong&gt;it runs entirely in your browser.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ The Tech Stack
&lt;/h2&gt;

&lt;p&gt;To make "Serverless AI" a reality, I used a combination of modern web technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://huggingface.co/docs/transformers.js/index" rel="noopener noreferrer"&gt;Transformers.js&lt;/a&gt;:&lt;/strong&gt; This is the magic ingredient. It allows us to run state-of-the-art machine learning models directly in the browser using ONNX Runtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js / React:&lt;/strong&gt; For the slick, responsive UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Workers:&lt;/strong&gt; To ensure the AI processing doesn't freeze the main UI thread.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS:&lt;/strong&gt; For that clean, modern "Dark Mode" aesthetic.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 The AI Model: MODNet
&lt;/h2&gt;

&lt;p&gt;After testing several models, I settled on a quantized version of &lt;strong&gt;MODNet&lt;/strong&gt;. It’s a light-weight yet powerful model specifically designed for real-time portrait matting and background removal.&lt;/p&gt;

&lt;p&gt;By using a &lt;strong&gt;quantized version&lt;/strong&gt;, the model file size is small enough (a few MBs) to be downloaded quickly by the browser and stored in the local cache for subsequent uses.&lt;/p&gt;




&lt;h2&gt;
  
  
  💻 How It Works (The Code)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaoqlz5cfz8ju0b5f7sf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaoqlz5cfz8ju0b5f7sf.png" alt="Background removal comparison of a man in an office" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The core logic revolves around initializing the pipeline and processing the image blob. Here is a simplified version of how the inference happens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;pipeline&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@xenova/transformers&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;removeBackground&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;imageElement&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// 1. Initialize the segmenter pipeline&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;segmenter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image-segmentation&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Xenova/modnet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// 2. Process the image&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;segmenter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;imageElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// 3. The output is a mask. We then apply this mask to the original canvas&lt;/span&gt;
    &lt;span class="nf"&gt;applyMaskToCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  👋 Try it yourself!
&lt;/h2&gt;

&lt;p&gt;I built this tool to be a fast, free, and private alternative for daily tasks. You can try the live version here: &lt;strong&gt;&lt;a href="https://imagebgremoved.shop/" rel="noopener noreferrer"&gt;imagebgremoved.shop&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I'm curious: what other local-first AI tools would you like to see? Let’s discuss in the comments!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>showdev</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
