smooth-app
전 세계 식품의 성분·영양·정보를 자유롭게 협업하고 공개하는 데이터베이스
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Edge-OCR & audio-tactile bus route identifier for a Raspberry Pi Zero 2 W.
Press a button, get the route number of the oncoming bus spoken aloud
and confirmed with a haptic buzz — fully offline, budgeted to run
end-to-end in under 1.5 seconds.
requirements-ocr.txt holds the text-detection engine and is a separate file
only because it pulls in opencv-python, which needs libGL.so.1 and so
cannot be installed on serverless hosts. Skip it and OCR falls back to
Tesseract, which reads 1 of the 8 benREADME 전문 보기 ↗Edge-OCR & audio-tactile bus route identifier for a Raspberry Pi Zero 2 W. Press a button, get the route number of the oncoming bus spoken aloud and confirmed with a haptic buzz — fully offline, budgeted to run end-to-end in under 1.5 seconds.
bus-route-identifier/
├── main.py # event loop & button handler
├── camera.py # Picamera2 in-memory frame capture
├── preprocessing.py # OpenCV: grayscale, CLAHE, adaptive threshold
├── ocr_engine.py # Tesseract wrapper + route-number regex parsing
├── feedback.py # TTS (espeak-ng/Piper) + GPIO haptic driver
├── power.py # battery monitoring & low-battery alerts
├── config.py # all pins, paths, and tunable thresholds
├── requirements.txt
├── scripts/
│ └── power_saving.sh # OS-level idle power reduction (boot-time)
├── tools/
│ ├── pregenerate_cache.py # pre-render audio for common routes
│ ├── benchmark.py # offline accuracy/latency testing
│ └── analyze_logs.py # research-paper-ready stats from field logs
├── sounds/cache/ # pre-rendered route audio clips (generated)
├── systemd/
│ ├── bus-route-identifier.service
│ └── power-saving.service
├── logs/ # per-run timing CSV (generated)
├── docs/
│ └── BUILD_SUMMARY_AND_ANTIGRAVITY_GUIDE.md # what's built + how to run it in Antigravity
└── SOFTWARE_AND_HARDWARE_GUIDE.md
sudo apt update
sudo apt install -y python3-picamera2 tesseract-ocr espeak-ng --no-install-recommends
python3 -m venv --system-site-packages .venv
source .venv/bin/activate
# libgl1 is needed by opencv-python (pulled in by rapidocr)
sudo apt install -y libgl1
pip install -r requirements.txt -r requirements-ocr.txt
python3 tools/pregenerate_cache.py # warm the audio cache for common routes
python3 main.py # run in foreground first, confirm it works
Once it runs cleanly, install it as a boot service — see
SOFTWARE_AND_HARDWARE_GUIDE.md.
camera.MockCamera and dev-mode fallbacks in feedback.py/main.py
let you run the OCR + preprocessing pipeline on a laptop against static
test photos, so you're not tethered to the hardware for every change:
from camera import MockCamera
cam = MockCamera("test_images/board_01.jpg")
Use tools/benchmark.py to measure accuracy and timing against a set
of labeled test photos before deploying to hardware.
config.py (I2S_ALSA_DEVICE, or env ALSA_DEVICE) from aplay -l.tools/benchmark_ocr.py.The system features a hybrid OCR pipeline: an offline engine (RapidOCR PP-OCRv4 / Tesseract) as the primary, edge-local recognizer, paired with Google Cloud Vision as an online fallback for challenging images.
OCR_MODE)The operating mode is configured via config.OCR_MODE or the OCR_MODE environment variable:
auto (Default on Pi / Desktop):
Runs the offline engine first. If offline OCR finds no route number or returns confidence below OFFLINE_MIN_CONFIDENCE (default 45%), the pipeline automatically calls Google Cloud Vision. If the online call also yields no route, the system gracefully falls back to the standard "No route detected" audio/haptic advisory.offline:
Strictly runs the local offline engine only (RapidOCR / Tesseract). Zero network requests are made.online (Default on Vercel Serverless):
Directly routes image frames to Google Cloud Vision API. Optimized for cloud serverless runtimes where headless OpenCV and native binaries are unavailable.Every result reports which engine produced the answer:
{"route": "12", "engine": "offline", "latency_ms": 140.2} or {"route": "12A", "engine": "online", "latency_ms": 320.5}.
.env CredentialsCopy .env.example to .env:
cp .env.example .env
Configure your Google Cloud Vision API key in .env:
OCR_MODE=auto
ONLINE_TIMEOUT_S=3.0
GOOGLE_VISION_API_KEY=your_google_cloud_vision_api_key_here
(Note: .env and *credentials*.json are strictly added to .gitignore to prevent secret leakage).
Run the application:
python web_app.py
The UI will show the route number large, with a subtle line underneath: Engine: offline (140ms) or Engine: online (320ms).