<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Li Yanpei — Case studies</title>
    <link>https://lucian-dev.com/work</link>
    <atom:link href="https://lucian-dev.com/work/feed.xml" rel="self" type="application/rss+xml" />
    <description>Project case studies by Li Yanpei (Lucian).</description>
    <lastBuildDate>Sat, 30 May 2026 13:45:28 GMT</lastBuildDate>
    <item xml:lang="en">
      <title>Smart Waste Classification System (SWCS)</title>
      <link>https://lucian-dev.com/work/swcs</link>
      <guid isPermaLink="true">https://lucian-dev.com/work/swcs</guid>
      <pubDate>Sat, 30 May 2026 13:45:28 GMT</pubDate>
      <dc:creator>Li Yanpei</dc:creator>
      <description>An offline, edge-AI closed-loop waste sorter for small venues: YOLOv8 finds the object, MobileNetV3 classifies the material, a confidence gate decides, and dual Arduinos drive the servo that physically routes it.</description>
      <content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p><strong>SWCS</strong> is a compact, <strong>offline-capable</strong> recycling station for small venues — cafés, office pantries, labs, school micro-recycling points — where there's no staff to watch the bin and no network to rely on. It closes the full loop from <em>sensing → recognition → decision → physical sorting</em>, not just classification on a screen.</p>
<p>It was my final-year project for <strong>ELEC S411F (Electronic &#x26; Computer Engineering Project, 2025/26)</strong>, supervised by Dr. Tong Kwong Bun Bruce.</p>
<p><a href="https://www.youtube.com/watch?v=jkAqK3vqILI">Demo</a></p>
<h2 id="the-problem">The problem</h2>
<p>Recycling quality collapses when materials are contaminated at the source. Most academic work stops at lab accuracy, and most commercial "smart bins" are large, expensive, network-dependent installations for big facilities. There's a real gap for something <strong>small, cheap, robust and offline</strong> that can actually <em>act</em> on its decision — and safely refuse to act when it isn't sure.</p>
<h2 id="approach">Approach</h2>
<p>A two-stage edge-vision pipeline plus a confidence-gated controller:</p>
<ul>
<li><strong>Localize</strong> — YOLOv8 detects the item and crops the region of interest (ROI).</li>
<li><strong>Classify</strong> — MobileNetV3-Large labels the ROI as paper / plastic / metal / glass / cardboard. Chosen for edge latency (not just accuracy) and deployable via ONNX / TorchScript / TensorRT / CUDA.</li>
<li><strong>Decide</strong> — a Decision Engine fuses the model probabilities and applies a <strong>confidence gate</strong>: divert only if the class <em>and</em> its confidence clear a threshold; otherwise the item stays on the default bypass route. Low-confidence cases never trigger a wrong physical action.</li>
</ul>
<h2 id="system-architecture">System architecture</h2>
<ul>
<li><strong>Upper machine:</strong> NVIDIA Jetson Orin Nano runs camera capture, YOLO localization, ROI cropping, classification and the Decision Engine.</li>
<li><strong>Lower machines:</strong> two Arduinos — <code>belt_arduino</code> (IR trigger + conveyor) and <code>servo_arduino</code> (sorting flap) — for clean separation of control.</li>
<li><strong>Protocol:</strong> USB-serial <strong>JSON</strong> with an identity handshake between the Jetson and each Arduino.</li>
<li><strong>Closed loop (FSM):</strong> IR sensor detects an item → stop belt → capture frames → YOLO + MobileNetV3 + confidence gate → JSON command → servo flap rotates → belt resumes → cycle logged with image, prediction, confidence, action and timing.</li>
</ul>
<p>Training used PyTorch + PyTorch Lightning (OmegaConf config, torchvision ImageFolder) on a self-collected dataset that ranged from clean backgrounds to cluttered, real-world, varied-lighting scenes to harden against contamination and occlusion.</p>
<h2 id="results">Results</h2>
<p>A labelled 120-cycle closed-loop experiment (60 metal + 60 non-metal), using metal routing as the physical test case:</p>
<ul>
<li><strong>Offline classifier accuracy:</strong> 93.59% — metal 93.69% precision / 95.59% recall / 94.63% F1</li>
<li><strong>System routing accuracy (2-class):</strong> 90.8% — metal precision 94.5%, recall 86.7%</li>
<li><strong>False diversion:</strong> 5.0% · <strong>Missed diversion:</strong> 13.3%</li>
<li><strong>Mean end-to-end cycle:</strong> 3.29 s — of which recognition was only <strong>~61 ms</strong></li>
</ul>
<h2 id="what-i-learned">What I learned</h2>
<ul>
<li><strong>The AI was never the bottleneck.</strong> Recognition took ~61 ms; the full cycle ~3.29 s, dominated by servo actuation (~2.7 s) and conveyor recovery. The hard engineering was mechanical timing, not inference.</li>
<li><strong>Closed-loop accuracy depends on the actuator, not just the model.</strong> A high-torque servo caused PWM jitter and unstable flap angles — a <em>correct</em> classification could still mis-sort. An independent 5 V supply with a common ground to the Arduino removed the jitter entirely.</li>
<li><strong>Confidence gating is a trade-off.</strong> It kept false diversion low (5%) but raised missed metal diversions (13.3%) — a knob to tune against labelled system-level data, not just offline validation.</li>
</ul>
<h2 id="further-work">Further work</h2>
<p>Multi-path routing for all five materials (not only the metal test path), latency reduction in the mechanical chain, and long-duration reliability testing — camera drift, serial stability, belt misalignment, servo wear.</p>]]></content:encoded>
      <category>Edge AI</category>
      <category>Computer Vision</category>
      <category>Jetson</category>
      <category>YOLO</category>
      <category>Robotics</category>
    </item>
    <item xml:lang="zh-Hans">
      <title>Carboy</title>
      <link>https://lucian-dev.com/work/project-carboy</link>
      <guid isPermaLink="true">https://lucian-dev.com/work/project-carboy</guid>
      <pubDate>Fri, 29 May 2026 11:54:31 GMT</pubDate>
      <dc:creator>Li Yanpei</dc:creator>
      <description>我最近在认真打磨一款新软件：Carboy。</description>
      <content:encoded><![CDATA[<p><strong><a href="https://carboy.hikosphere.com">carboy.hikosphere.com</a></strong></p>
<p>最近我一直在认真打磨一款自己的产品 —— <strong><span lang="en">Car Boy</span></strong>，一个写给爱车人的社区。</p>
<p><span lang="en">For a while now I've been quietly polishing a product of my own</span> — <strong><span lang="en">Car Boy</span></strong>, <span lang="en">a community built for people who love their cars.</span></p>
<h2 id="这是什么-what-it-is">这是什么 · <span lang="en">What it is</span></h2>
<p>它不是那种只能刷帖的传统车友论坛。我想做的，是一个更完整、更精致、也更贴近爱车人日常的平台 —— 把<strong>路线、圈子、动态、车库、活动、油价</strong>这些高频场景，尽量收进同一个产品里。</p>
<p><span lang="en">It isn't the usual car forum where all you can do is scroll a feed. What I'm after is something more complete, more polished, and closer to how car people actually live day to day</span> — bringing <strong><span lang="en">routes, clubs, posts, your garage, events, and fuel prices</span></strong> <span lang="en">together into a single product.</span></p>
<h2 id="现在能做什么-what-works-today">现在能做什么 · <span lang="en">What works today</span></h2>
<p>现在已经做出了相当完整的一版：</p>
<p><span lang="en">There's already a fairly complete first version up and running</span>:</p>
<ul>
<li><strong>发现并收藏喜欢的路线</strong> / <span lang="en">Discover and save the routes you love</span></li>
<li><strong>查看路线详情、地图轨迹与图片</strong> / <span lang="en">Open route details, map traces, and photos</span></li>
<li><strong>加入圈子、发布动态</strong> / <span lang="en">Join clubs and share posts</span></li>
<li><strong>管理自己的爱车与个人主页</strong> / <span lang="en">Manage your cars and your personal profile</span></li>
<li><strong>持续打磨更适合大中华区的体验</strong> / <span lang="en">An experience tuned for users across Greater China</span></li>
</ul>
<h2 id="截图都是真的-the-screenshots-are-real">截图都是真的 · <span lang="en">The screenshots are real</span></h2>
<p>这次放出来的几张宣传图，用的都是产品里的真实页面，不是凭空画的概念图。</p>
<p><span lang="en">The promo shots I'm sharing are all real pages from inside the app</span> — <span lang="en">not mockups or concept art.</span></p>
<blockquote>
<p>我始终相信，真正好的车主产品不该只是「能用」，而应该有一点质感，也有一点热爱。<span lang="en">Car Boy</span> 还在持续迭代，但它已经越来越接近我最初想做的样子了。</p>
<p><span lang="en">I've always believed a great product for car owners shouldn't merely "work</span>" — <span lang="en">it should carry a little craft, and a little love. Car Boy is still evolving, but it's getting closer and closer to what I set out to build.</span></p>
</blockquote>
<h2 id="想听听你的想法-id-love-your-input">想听听你的想法 · <span lang="en">I'd love your input</span></h2>
<p>如果你也是车迷，喜欢跑路线、拍车、记录用车生活，欢迎来看看；也很想听听你最希望这类产品补上什么功能。</p>
<p><span lang="en">If you're into cars too</span> — <span lang="en">chasing good roads, photographing them, keeping a record of life with your car</span> — <span lang="en">come take a look. I'd genuinely love to hear which features you'd most want to see next.</span></p>
<h2 id="几句坦白话-a-few-honest-notes">几句坦白话 · <span lang="en">A few honest notes</span></h2>
<p>产品还在很早期，有些地方要请你多包涵：</p>
<p><span lang="en">It's still very early days, so there are a few things I'd ask you to bear with</span>:</p>
<ul>
<li><strong>现阶段对发帖、发布路线、创建圈子的数量有所限制。</strong> / <span lang="en">For now there are limits on how many posts, routes, and clubs you can create.</span></li>
<li><strong>受资金所限，网站目前跑在我家里的服务器上，访问速度偶尔会不稳定。</strong> / <span lang="en">Funds are tight, so the site currently runs on a server at home</span> — <span lang="en">speeds can be uneven at times.</span></li>
<li><strong>早期阶段暂时只支持邮箱注册。</strong> / <span lang="en">In this early phase, sign-up is email-only.</span></li>
</ul>
<p>感谢你的理解与包涵 😭</p>
<p><span lang="en">Thanks for your patience and understanding</span> 😭</p>
<p>—— Hiko</p>]]></content:encoded>
      <enclosure url="https://lucian-dev.com/uploads/1780055555958-6d9f07e2-e103-4185-9060-76d91f630df3.webp" type="image/webp" length="772" />
    </item>
  </channel>
</rss>