How nikopolistico/nailvision works
NailVision lets a user select a hand photo, detects and selects nails in the browser, then requests per-nail designs from a Python Stable Diffusion service and displays the results. The frontend handles image selection, detection, controls, and job polling; the server validates uploaded photos and masks, runs generation, and exposes job status. The README documents browser-side ONNX detection and the separate design-generation service. The sampled files show frontend calls and server routes; the HTTP connection between them is represented as unverified because no excerpt explicitly links the two implementations.
Main entry points: App.vue Photo and design UI · utils.ts Class utilities · server.py Job API and runner · sd.ts Generation API client
Components 14
Frontend workflow
- Photo and design UI
src/App.vue - Generation API client
src/lib/sd.ts - Vue app entry
src/main.ts
Nail detection
- Browser nail detector
src/lib/detector.ts - Nail segmentation model
src/model/nail_seg.onnx
Design generation
- Job API and runner
sd-server/server.py - Image and style helpers
sd-server/nv_utils.py - Stable Diffusion model
gpu
UI components
- Button
src/components/ui/button/Button.vue - Badge
src/components/ui/badge/Badge.vue - Card
src/components/ui/card/Card.vue - Slider
src/components/ui/slider/Slider.vue - Class utilities
src/lib/utils.ts
Other components
- Photo user
Connections 16
- Photo user → Photo and design UI: selects photo
src/App.vue - Photo and design UI → Browser nail detector: detects nails
src/App.vue - Browser nail detector → Nail segmentation model: runs inference
- Photo and design UI → Generation API client: starts and polls
src/App.vue - Generation API client → Job API and runner: requests jobs
- Job API and runner → Image and style helpers: uses helpers
sd-server/server.py - Job API and runner → Stable Diffusion model: loads model
sd-server/server.py - Vue app entry → Photo and design UI: mounts
src/main.ts - Photo and design UI → Button: renders
src/App.vue - Photo and design UI → Badge: renders
src/App.vue - Photo and design UI → Card: renders
src/App.vue - Class utilities → Button: styles
src/components/ui/button/Button.vue - Class utilities → Badge: styles
src/components/ui/badge/Badge.vue - Class utilities → Card: styles
src/components/ui/card/Card.vue - Class utilities → Slider: styles
src/components/ui/slider/Slider.vue - Photo and design UI → Slider: configures