<?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>DEV Community: MD ABUBAKAR</title>
    <description>The latest articles on DEV Community by MD ABUBAKAR (@md_abubakar_bec10fd88e289).</description>
    <link>https://dev.to/md_abubakar_bec10fd88e289</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%2F3578154%2F17639ca4-44c2-4078-9717-ec8b2812969d.jpg</url>
      <title>DEV Community: MD ABUBAKAR</title>
      <link>https://dev.to/md_abubakar_bec10fd88e289</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/md_abubakar_bec10fd88e289"/>
    <language>en</language>
    <item>
      <title>How I Built a Computer Vision Chess Board Detector</title>
      <dc:creator>MD ABUBAKAR</dc:creator>
      <pubDate>Tue, 09 Dec 2025 11:26:24 +0000</pubDate>
      <link>https://dev.to/md_abubakar_bec10fd88e289/how-i-built-a-computer-vision-chess-board-detector-3ib2</link>
      <guid>https://dev.to/md_abubakar_bec10fd88e289/how-i-built-a-computer-vision-chess-board-detector-3ib2</guid>
      <description>&lt;p&gt;I Built a Chess Scanner That Converts Any Chess Image Into a FEN + Analyzes Games Like Chess.com&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Live website:&lt;/strong&gt; &lt;a href="https://chessscanner.seedrlite.in/" rel="noopener noreferrer"&gt;https://chessscanner.seedrlite.in/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🧠 Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Chess engines are extremely powerful — but only when they have a &lt;strong&gt;FEN position&lt;/strong&gt; or a &lt;strong&gt;PGN&lt;/strong&gt; to analyze.&lt;br&gt;
Most of the time, people see a board in a photo, a screenshot, or a video frame… and wish they could instantly analyze it.&lt;/p&gt;

&lt;p&gt;So I built a web application called &lt;strong&gt;Chess Scanner&lt;/strong&gt; that:&lt;/p&gt;

&lt;p&gt;✅ Detects the chessboard from any image&lt;br&gt;
✅ Identifies all 12 piece types (White/Black × King/Queen/Rook/Bishop/Knight/Pawn)&lt;br&gt;
✅ Generates a perfect &lt;strong&gt;FEN string&lt;/strong&gt;&lt;br&gt;
✅ Lets you edit the detected board&lt;br&gt;
✅ Analyzes PGNs and classifies moves (Good, Great, Brilliant, Miss, Blunder, etc.)&lt;br&gt;
✅ Plays best moves using Stockfish&lt;/p&gt;

&lt;p&gt;This post explains how I built it, the challenges I faced, and how it works under the hood.&lt;/p&gt;


&lt;h1&gt;
  
  
  ♟ &lt;strong&gt;1. The Idea&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;My goal was simple but ambitious:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Upload any chess image → get instant FEN → analyze it like on chess.com.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are apps that do individual tasks, but none that combine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computer vision&lt;/li&gt;
&lt;li&gt;FEN extraction&lt;/li&gt;
&lt;li&gt;Real-time board editing&lt;/li&gt;
&lt;li&gt;Game analysis&lt;/li&gt;
&lt;li&gt;Chess.com-like move classification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted this all in one clean web app.&lt;/p&gt;


&lt;h1&gt;
  
  
  🏗 &lt;strong&gt;2. Architecture Overview&lt;/strong&gt;
&lt;/h1&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frontend (React + Tailwind)
        ↓ Sends image
Backend (FastAPI + YOLOv8)
        ↓ Detects board + pieces
Board Processor → Generates FEN
Stockfish Engine → Analysis
Frontend Visualization → Move types + best moves
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Tech Stack&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React + Tailwind&lt;/strong&gt; for UI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FastAPI (Python)&lt;/strong&gt; for backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YOLOv8 (Ultralytics)&lt;/strong&gt; for board &amp;amp; piece detection&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom dataset (Roboflow)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stockfish 17.1&lt;/strong&gt; for move evaluation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite&lt;/strong&gt; authentication system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JWT auth&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud VPS (Ubuntu, Nginx)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  🔍 &lt;strong&gt;3. Training the Vision Model&lt;/strong&gt;
&lt;/h1&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Dataset&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I created my own labeled dataset using Roboflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Board Detection Model&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Segmentation + bounding box&lt;/li&gt;
&lt;li&gt;Trained on real + synthetic chessboard images&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Piece Detection Model&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;12 classes (white/black for each piece)&lt;/li&gt;
&lt;li&gt;Augmented with flip/rotate/lighting variations&lt;/li&gt;
&lt;li&gt;Special training on dark boards, unconventional themes, and low-light images&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Some chess sets have &lt;strong&gt;similar shapes&lt;/strong&gt; (e.g., black pawns vs black bishops in bad lighting).&lt;/li&gt;
&lt;li&gt;Perspective distortion makes squares uneven.&lt;/li&gt;
&lt;li&gt;Large boards in mobile screenshots require high-resolution inference.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Results&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;My best YOLOv8 model achieves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;mAP50:&lt;/strong&gt; ~0.98&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mAP50-95:&lt;/strong&gt; ~0.84&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High accuracy&lt;/strong&gt; even with dark backgrounds&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  🧩 &lt;strong&gt;4. Converting Detection Output to FEN&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This is the magical part.&lt;/p&gt;

&lt;p&gt;Once pieces are detected:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The board segmentation mask is used to warp the image into a perfect 8×8 grid.&lt;/li&gt;
&lt;li&gt;Each square is assigned a piece (if detection center falls inside).&lt;/li&gt;
&lt;li&gt;Empty-square compression creates the FEN row string.&lt;/li&gt;
&lt;li&gt;The final FEN is returned to frontend.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7N/5p2/1p3P2/p7/kp6/1p6/1P6/1K6 w - - 0 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then analyze or edit the board directly.&lt;/p&gt;




&lt;h1&gt;
  
  
  ♜ &lt;strong&gt;5. PGN Analyzer + Move Classification&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Another major feature I added:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;✔ Analyze any PGN&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I process each move with &lt;strong&gt;Stockfish&lt;/strong&gt; and compare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Eval before&lt;/li&gt;
&lt;li&gt;Eval after&lt;/li&gt;
&lt;li&gt;Best engine move&lt;/li&gt;
&lt;li&gt;Centipawn loss&lt;/li&gt;
&lt;li&gt;Sacrifices&lt;/li&gt;
&lt;li&gt;Move difficulty&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I classify moves in categories inspired by Chess.com:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Brilliant&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Great Move&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Good Move&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Book Move&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inaccuracy&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mistake&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Blunder&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Miss (Missed tactic)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gives players a clean, human-friendly understanding of their game quality.&lt;/p&gt;




&lt;h1&gt;
  
  
  🎨 &lt;strong&gt;6. UI/UX&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The UI focuses on clarity and speed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drop zone for uploading images&lt;/li&gt;
&lt;li&gt;Real-time board preview&lt;/li&gt;
&lt;li&gt;FEN editor&lt;/li&gt;
&lt;li&gt;Move list with evaluation graph&lt;/li&gt;
&lt;li&gt;Best move suggestions&lt;/li&gt;
&lt;li&gt;Dark/Light themes&lt;/li&gt;
&lt;li&gt;Full mobile support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also added a &lt;strong&gt;Chess Scanner logo&lt;/strong&gt; featuring a board + camera icon.&lt;/p&gt;




&lt;h1&gt;
  
  
  🚀 &lt;strong&gt;7. Deployment&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Technical deployment stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ubuntu 22.04 VPS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nginx → Gunicorn → FastAPI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Project served as &lt;code&gt;/api/infer&lt;/code&gt; endpoint&lt;/li&gt;
&lt;li&gt;React frontend deployed with Nginx static hosting&lt;/li&gt;
&lt;li&gt;SSL via Certbot&lt;/li&gt;
&lt;li&gt;YOLO model files optimized with half precision&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything runs smoothly even on a mid-tier VPS.&lt;/p&gt;




&lt;h1&gt;
  
  
  📈 &lt;strong&gt;8. What’s Next?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Future improvements:&lt;/p&gt;

&lt;p&gt;🔹 Real-time video scanning&lt;br&gt;
🔹 Automatic PGN generation from detected positions&lt;br&gt;
🔹 Opening explorer integration&lt;br&gt;
🔹 ELO estimation based on move accuracy&lt;br&gt;
🔹 Cloud account system + saved games&lt;br&gt;
🔹 Mobile app (React Native, already under development)&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live App:&lt;/strong&gt; &lt;a href="https://chessscanner.seedrlite.in/" rel="noopener noreferrer"&gt;Chess Scanner&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  🏁 &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Building a chess scanner that works reliably on ANY image was a challenging but rewarding project.&lt;/p&gt;

&lt;p&gt;The combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;YOLOv8&lt;/li&gt;
&lt;li&gt;Smart board geometry&lt;/li&gt;
&lt;li&gt;Stockfish evaluation&lt;/li&gt;
&lt;li&gt;React UX&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;makes the tool extremely powerful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chess learners&lt;/li&gt;
&lt;li&gt;Coaches&lt;/li&gt;
&lt;li&gt;Content creators&lt;/li&gt;
&lt;li&gt;Daily puzzle solvers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to try it or want the repo, feel free to reach out.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>machinelearning</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🚀 EngageSwap — A Free Platform to Promote Your Website and Earn Coins</title>
      <dc:creator>MD ABUBAKAR</dc:creator>
      <pubDate>Wed, 22 Oct 2025 04:26:59 +0000</pubDate>
      <link>https://dev.to/md_abubakar_bec10fd88e289/engageswap-a-free-platform-to-promote-your-website-and-earn-coins-51d8</link>
      <guid>https://dev.to/md_abubakar_bec10fd88e289/engageswap-a-free-platform-to-promote-your-website-and-earn-coins-51d8</guid>
      <description>&lt;p&gt;🚀 What is EngageSwap?&lt;/p&gt;

&lt;p&gt;EngageSwap is a  free website-promotion platform  I built to help creators, small businesses, and developers get  real visitors  without spending on ads.&lt;/p&gt;

&lt;p&gt;Promote your website for free and get real visitors today.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://engageswap.in" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Try EngageSwap Now&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💰  Earn coins  by visiting other websites&lt;/li&gt;
&lt;li&gt;🌐  Spend coins  to promote your own&lt;/li&gt;
&lt;li&gt;🔁 Enjoy a fair exchange system that rewards genuine engagement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything happens automatically through our smart system that ensures  authentic visits ,  quiz-based validation , and  anti-bot checks .&lt;/p&gt;

&lt;p&gt;💡 Why I Built This&lt;/p&gt;

&lt;p&gt;While testing my own marketing campaigns, I realized how difficult it is for new websites to get real visitors.&lt;br&gt;
Buying ads is expensive. SEO takes months. So I wanted to create a  mutual-growth ecosystem  where everyone benefits — whether they want  traffic  or  exposure .&lt;/p&gt;

&lt;p&gt;🛠️ Tech Stack&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Frontend:  React + Tailwind&lt;/li&gt;
&lt;li&gt; Backend:  Node.js + Express + MySQL&lt;/li&gt;
&lt;li&gt; Auth &amp;amp; Payments:  OTP-based login + Razorpay integration&lt;/li&gt;
&lt;li&gt; Hosting:  Nginx reverse proxy on Ubuntu VPS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🌟 Key Features&lt;/p&gt;

&lt;p&gt;✅ Real-time click tracking&lt;br&gt;
✅ Quiz-based verification to avoid fake visits&lt;br&gt;
✅ Referral &amp;amp; reward system&lt;br&gt;
✅ Wallet-based coin economy&lt;br&gt;
✅ Admin dashboard to manage users, campaigns &amp;amp; analytics&lt;/p&gt;

&lt;p&gt;🔗 Try It Out&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://engageswap.in" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Visit EngageSwap 🚀&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Sign up, add your website, and start promoting instantly.&lt;br&gt;
You can even earn coins by simply browsing — it’s completely free.&lt;/p&gt;

&lt;p&gt;💬 Feedback Welcome!&lt;/p&gt;

&lt;p&gt;This is still a growing project, and I’d love your feedback!&lt;br&gt;
Would you use a system like this for your own site?&lt;br&gt;
Drop your thoughts in the comments 👇&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>startup</category>
      <category>marketing</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
