<?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: sasiperi</title>
    <description>The latest articles on DEV Community by sasiperi (@sasiperi).</description>
    <link>https://dev.to/sasiperi</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%2F243536%2F33141168-6e70-4949-a383-e6520fd70996.png</url>
      <title>DEV Community: sasiperi</title>
      <link>https://dev.to/sasiperi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sasiperi"/>
    <language>en</language>
    <item>
      <title>GizmoGuard - Spy Bot (Powered by Gemma4)</title>
      <dc:creator>sasiperi</dc:creator>
      <pubDate>Thu, 21 May 2026 21:21:45 +0000</pubDate>
      <link>https://dev.to/sasiperi/gizmo-guard-safeguard-bot-powered-by-gemma4-200</link>
      <guid>https://dev.to/sasiperi/gizmo-guard-safeguard-bot-powered-by-gemma4-200</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Inspiration&lt;/li&gt;
&lt;li&gt;What I Built&lt;/li&gt;
&lt;li&gt;Live Demo&lt;/li&gt;
&lt;li&gt;Code&lt;/li&gt;
&lt;li&gt;How I Used Gemma4&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;The idea for GizmoGuard actually started from my daughter.&lt;/p&gt;

&lt;p&gt;One day, after having a nightmare about someone secretly entering the house while we were away, she became worried that somebody might sneak into her room and take away her favorite fluffy toy.&lt;/p&gt;

&lt;p&gt;She asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Can we build a small robot that watches my important things when nobody is around?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That simple question became the inspiration for GizmoGuard.&lt;/p&gt;

&lt;p&gt;The original goal was to create a small, affordable AI-powered guard bot that could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;watch over important belongings,&lt;/li&gt;
&lt;li&gt;detect suspicious activity,&lt;/li&gt;
&lt;li&gt;recognize familiar people vs strangers,&lt;/li&gt;
&lt;li&gt;and explain what happened if something changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The early design, testing, and prototyping started with a fun and simple use case:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Who moved my mug?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using a mug as the protected object made it easy to experiment with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;scene monitoring,&lt;/li&gt;
&lt;li&gt;object movement detection,&lt;/li&gt;
&lt;li&gt;multimodal reasoning,&lt;/li&gt;
&lt;li&gt;and conversational AI responses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;before expanding the idea into a broader personal safety and monitoring assistant.&lt;/p&gt;

&lt;p&gt;Today, GizmoGuard has evolved into a privacy-first multimodal AI-at-the-edge system capable of monitoring valuable objects and understanding real-world activity locally using Gemma.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GizmoGuard&lt;/strong&gt; is a low-budget, privacy-first AI-at-the-edge personal safety and monitoring bot powered by locally running Gemma models.&lt;/p&gt;

&lt;p&gt;The idea started from a simple but relatable problem:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Who moved my mug?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;GizmoGuard continuously monitors a workspace — or any valuable object of interest, &lt;strong&gt;indoors or outdoors&lt;/strong&gt; — using an ArduCam attached to a Raspberry Pi. The system detects scene changes such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Objects being moved&lt;/li&gt;
&lt;li&gt;Objects being removed&lt;/li&gt;
&lt;li&gt;Objects being replaced&lt;/li&gt;
&lt;li&gt;Unexpected objects appearing&lt;/li&gt;
&lt;li&gt;People approaching or touching monitored items&lt;/li&gt;
&lt;li&gt;Ambient light changes&lt;/li&gt;
&lt;li&gt;Unwanted background noise&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system is designed to intelligently distinguish between normal environmental activity and a &lt;strong&gt;real scene change&lt;/strong&gt; near the protected object.&lt;/p&gt;

&lt;p&gt;When motion or scene changes are detected, GizmoGuard captures “evidence images” and sends them to a Spring Boot backend API. The backend then uses &lt;strong&gt;Gemma 4&lt;/strong&gt; for multimodal image reasoning and natural-language explanations.&lt;/p&gt;

&lt;p&gt;Using additional preconfigured contextual information, the system can also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recognize known people vs strangers&lt;/li&gt;
&lt;li&gt;Analyze gestures and emotions&lt;/li&gt;
&lt;li&gt;Understand nearby activity and surroundings&lt;/li&gt;
&lt;li&gt;Generate spoken voice-enabled responses using the host system’s speech functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire system is built around a &lt;strong&gt;local-first AI architecture&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Images never leave the local environment&lt;/li&gt;
&lt;li&gt;No cloud AI APIs are required&lt;/li&gt;
&lt;li&gt;No recurring inference costs&lt;/li&gt;
&lt;li&gt;Runs affordably on consumer-grade hardware&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GizmoGuard demonstrates how compact multimodal AI models like Gemma can power practical, privacy-focused real-world edge AI applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Current Architecture
&lt;/h3&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%2Feoycefrbluvu1ezmeayj.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%2Feoycefrbluvu1ezmeayj.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The current GizmoGuard architecture consists of the following components:&lt;/p&gt;

&lt;h4&gt;
  
  
  Raspberry Pi + ArduCam
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Python running on the Raspberry Pi continuously captures images&lt;/li&gt;
&lt;li&gt;Performs lightweight motion and scene-change detection&lt;/li&gt;
&lt;li&gt;Sends “evidence images” to backend APIs for AI analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Spring Boot REST API
&lt;/h4&gt;

&lt;p&gt;The Spring Boot backend acts as the orchestration layer and:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manages image analysis workflows&lt;/li&gt;
&lt;li&gt;Stores chat and contextual memory&lt;/li&gt;
&lt;li&gt;Handles evidence image pipelines&lt;/li&gt;
&lt;li&gt;Integrates with Gemma 4 using OpenAI-compatible APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Docker Model Runner (DMR)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Runs Gemma locally on my laptop&lt;/li&gt;
&lt;li&gt;Exposes model APIs for multimodal inference&lt;/li&gt;
&lt;li&gt;Enables fully local AI processing without cloud dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Local Storage + MySQL
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Stores evidence images locally&lt;/li&gt;
&lt;li&gt;Maintains conversation history and contextual memory&lt;/li&gt;
&lt;li&gt;Persists AI-generated responses and metadata&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Multimodal AI Layer
&lt;/h4&gt;

&lt;p&gt;Powered by Gemma 4, the AI layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyzes captured images&lt;/li&gt;
&lt;li&gt;Explains scene changes in natural language&lt;/li&gt;
&lt;li&gt;Supports conversational interaction&lt;/li&gt;
&lt;li&gt;Generates contextual reasoning about nearby activity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project demonstrates how practical multimodal AI systems can run locally using affordable hardware — without requiring expensive cloud infrastructure or hosted AI services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Demo Link:  &lt;a href="https://www.youtube.com/watch?v=ZfrUOa-RVZE" rel="noopener noreferrer"&gt;Gizmo-Guard Bot Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demo Includes&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Mug placed on desk&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scene continuously monitored by Raspberry Pi + ArduCam&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mug moved, removed, or scene unexpectedly changes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Evidence image captured automatically&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemma analyzes the image and explains what changed using multimodal reasoning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When real people (or images of them) appear in the scene: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detects known people pre-configured through system prompts and contextual memory&lt;/li&gt;
&lt;li&gt;Identifies all unknown individuals as strangers&lt;/li&gt;
&lt;li&gt;Analyzes appearance, ambience, emotions, and gestures&lt;/li&gt;
&lt;li&gt;Detects potentially malicious or friendly behavior and reports observations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The system generates voice-enabled spoken responses using the host system’s native speech functionality, allowing GizmoGuard to verbally describe scene changes, alerts, and AI observations in real time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Future prospects (model voice capabilities for analysis, &lt;br&gt;
Servo-based/GIO-Header wheels)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;GitHub (sasiperi) Repo name and Link: &lt;a href="https://github.com/sasiperi/gizmo-guard-gemma4-challange" rel="noopener noreferrer"&gt;gizmo-guard-gemma4-challenge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech stack includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Java + Spring Boot&lt;/li&gt;
&lt;li&gt;Raspberry Pi + ArduCam&lt;/li&gt;
&lt;li&gt;Docker Model Runner (DMR)&lt;/li&gt;
&lt;li&gt;Ollama/OpenAI-compatible APIs (gguf models)&lt;/li&gt;
&lt;li&gt;Gemma4 multimodal model&lt;/li&gt;
&lt;li&gt;MySQL for Chat Memory and Responses etc..&lt;/li&gt;
&lt;li&gt;Local filesystem storage for images.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Used Gemma4
&lt;/h2&gt;

&lt;p&gt;GizmoGuard is powered by &lt;strong&gt;Gemma 4B Quantized (&lt;code&gt;gemma4:4B-Q4_K_XL&lt;/code&gt;)&lt;/strong&gt; running locally through Docker Model Runner (DMR).&lt;/p&gt;

&lt;p&gt;I specifically selected this model because it delivered the best overall balance between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multimodal capability&lt;/li&gt;
&lt;li&gt;Local deployment feasibility&lt;/li&gt;
&lt;li&gt;Memory footprint&lt;/li&gt;
&lt;li&gt;Reasoning quality&lt;/li&gt;
&lt;li&gt;Privacy&lt;/li&gt;
&lt;li&gt;Cost efficiency&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Why Gemma Was the Right Fit
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Privacy-First Local AI
&lt;/h4&gt;

&lt;p&gt;One of the primary goals of GizmoGuard was ensuring that camera images and personal workspace data never leave the local environment.&lt;/p&gt;

&lt;p&gt;By running Gemma locally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No images are uploaded to external AI services&lt;/li&gt;
&lt;li&gt;No cloud inference is required&lt;/li&gt;
&lt;li&gt;The system can operate completely offline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For an always-on visual monitoring system, this was extremely important.&lt;/p&gt;




&lt;h4&gt;
  
  
  2. Edge-Friendly Performance
&lt;/h4&gt;

&lt;p&gt;I evaluated several local multimodal models.&lt;/p&gt;

&lt;p&gt;Some lightweight models were fast but struggled with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reliable image understanding&lt;/li&gt;
&lt;li&gt;Object consistency&lt;/li&gt;
&lt;li&gt;Intelligent system/user prompt processing (chat capabilities)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Larger models produced strong results but required significantly more resources and slower inference times.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gemma4:4B-Q4_K_XL&lt;/code&gt; turned out to be the ideal middle ground:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compact enough for practical local deployment&lt;/li&gt;
&lt;li&gt;Efficient enough for near real-time analysis&lt;/li&gt;
&lt;li&gt;Still capable of strong multimodal reasoning quality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made it an excellent fit for AI-at-the-edge workloads.&lt;/p&gt;




&lt;h4&gt;
  
  
  3. Multimodal Simplicity
&lt;/h4&gt;

&lt;p&gt;A major advantage of &lt;code&gt;Gemma4:4B&lt;/code&gt; was its ability to handle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image understanding&lt;/li&gt;
&lt;li&gt;Reasoning&lt;/li&gt;
&lt;li&gt;Conversational responses&lt;/li&gt;
&lt;li&gt;System and user prompt processing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;within a single model.&lt;/p&gt;

&lt;p&gt;This avoided the need to chain together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Separate vision models&lt;/li&gt;
&lt;li&gt;OCR pipelines&lt;/li&gt;
&lt;li&gt;Reasoning models&lt;/li&gt;
&lt;li&gt;Chat models&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using a unified multimodal model simplified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture&lt;/li&gt;
&lt;li&gt;Orchestration&lt;/li&gt;
&lt;li&gt;Deployment&lt;/li&gt;
&lt;li&gt;Latency&lt;/li&gt;
&lt;li&gt;Operational complexity&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  4. Cost-Effective AI
&lt;/h4&gt;

&lt;p&gt;Another goal of the project was proving that useful AI systems do not require expensive cloud GPUs or recurring API fees.&lt;/p&gt;

&lt;p&gt;Running Gemma locally means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero inference cost&lt;/li&gt;
&lt;li&gt;No token billing&lt;/li&gt;
&lt;li&gt;Predictable performance&lt;/li&gt;
&lt;li&gt;Full ownership of the AI stack&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes GizmoGuard practical for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hobbyists&lt;/li&gt;
&lt;li&gt;Makers&lt;/li&gt;
&lt;li&gt;Students&lt;/li&gt;
&lt;li&gt;Small-scale edge deployments&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  5. Real-World AI at the Edge
&lt;/h4&gt;

&lt;p&gt;GizmoGuard demonstrates how compact multimodal models like Gemma can power practical real-world edge AI applications using affordable hardware and open-source tooling.&lt;/p&gt;

&lt;p&gt;The project combines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edge AI&lt;/li&gt;
&lt;li&gt;IoT&lt;/li&gt;
&lt;li&gt;Computer Vision&lt;/li&gt;
&lt;li&gt;Multimodal Reasoning&lt;/li&gt;
&lt;li&gt;Local LLM Deployment&lt;/li&gt;
&lt;li&gt;Spring Boot APIs&lt;/li&gt;
&lt;li&gt;Privacy-First Architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;into a fully working end-to-end system.&lt;/p&gt;

&lt;p&gt;It showcases how modern multimodal AI can move beyond cloud-only deployments and become useful directly at the edge.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>Distributed Caching with Redis and SpringBoot</title>
      <dc:creator>sasiperi</dc:creator>
      <pubDate>Tue, 30 Aug 2022 04:55:00 +0000</pubDate>
      <link>https://dev.to/sasiperi/distributed-caching-with-redis-and-springbo-kc</link>
      <guid>https://dev.to/sasiperi/distributed-caching-with-redis-and-springbo-kc</guid>
      <description>&lt;p&gt;Are you facing latency issues in fetching data from a network service? Or from 3rd party APIs?&lt;/p&gt;

&lt;p&gt;Are you building auto-scalable, auto-healable microservices, and managing the state of these services a big problem? (building stateless applications, the 6th principle of the 12-factor applications)?&lt;/p&gt;

&lt;p&gt;Managing user session data of your highly available web applications, a challenge for you?&lt;/p&gt;

&lt;p&gt;Then distributed caching is what you are looking for.&lt;/p&gt;

&lt;p&gt;I have made &lt;strong&gt;Crash Course on Distributed Caching with Redis and SpringBoot applications.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is the course overview.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tKjtCYth--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czr6p7hs09gad0q5ds78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tKjtCYth--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czr6p7hs09gad0q5ds78.png" alt="Image description" width="880" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Here are links&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Slides: &lt;a href="https://sasiperi.github.io/tutorials.html"&gt;Presentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Crash Course Play List:  &lt;a href="https://www.youtube.com/channel/UCdNdfwbir0o3L9c5ybPmNlA"&gt;Teach2Learn&lt;/a&gt;1.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=I7IM7gG2-rU&amp;amp;t=66s"&gt;Crash Course Part1: Distributed Caching with Redis and Spring Boot (Cache API-Data on Read &amp;amp; Write)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=sb2AtjSxAjc&amp;amp;t=4s"&gt;Crash Course Part2: : How to Set Up Security and Access Control with Redis and Spring Boot?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=dTQ1OKiQAGg&amp;amp;t=1955s"&gt;Crash Course Part3: Redis as Session State Cache for SpringBoot based Web Applications&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>redis</category>
      <category>java</category>
      <category>springboot</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
