YUK_KND
Published

Lumi: AI Vision Companion for Indoor Accessibility

An Arduino UNO Q companion that detects people and chairs with a USB camera and gives real-time Japanese voice guidance on a smartphone.

BeginnerFull instructions provided19
Lumi: AI Vision Companion for Indoor Accessibility

Things used in this project

Hardware components

Arduino UNO Q
Arduino UNO Q
×1
Webcam, Logitech® HD Pro
Webcam, Logitech® HD Pro
×1

Software apps and online services

Arduino App Lab
Edge Impulse Studio
Edge Impulse Studio

Story

Read more

Code

main.py

Python
Main Arduino UNO Q application: USB camera object detection and Japanese voice guidance.
from datetime import datetime, timezone
from arduino.app_utils import App
from arduino.app_bricks.web_ui import WebUI
from arduino.app_bricks.video_objectdetection import VideoObjectDetection

THRESHOLD = 0.55
ui = WebUI()
detector = VideoObjectDetection(confidence=THRESHOLD, debounce_sec=0.0)

def on_connect(_sid):
    ui.send_message('welcome', {'client_name': 'USBカメラ', 'status': 'streaming', 'protocol': 'usb'})

def on_detect(detections):
    if not isinstance(detections, dict): return
    for label, values in detections.items():
        if label not in ('person', 'chair'): continue
        if not isinstance(values, list): values = [values]
        for value in values:
            confidence = float(value.get('confidence', value.get('score', 0)) or 0)
            if confidence >= THRESHOLD:
                message = '前方に人がいます。' if label == 'person' else '前方に椅子があります。'
                ui.send_message('detection', {'content': label, 'message': message, 'confidence': confidence, 'timestamp': datetime.now(timezone.utc).isoformat()})
                break

ui.on_connect(on_connect)
ui.on_message('override_th', lambda _sid, value: detector.override_threshold(float(value)))
detector.on_detect_all(on_detect)
App.run()

Credits

YUK_KND
3 projects • 2 followers
NothingJPFontProject・Manus・LLM・Figma・AI・Xiaomi・SIGMA・OpenAI・Gemini・Python・TypeScript・Photography・3DPrinter・🎾・🐶🐶・🏕️・📸メガネ=⚪︎◻︎

Comments