Folume is a Next.js demo that estimates foot length from a single photo. The UI walks the user through uploading or capturing a photo, detecting a sheet of paper for scale, and returning a size recommendation with calibration quality signals.
- Capture — The user uploads a photo with both feet and a sheet of A4 or Letter paper for scale.
- Process — The app detects paper corners, derives a pixel-to-mm scale, and attempts to locate toe/heel points for each foot.
- Results — Measurements are reported in millimeters, and the longer foot length (with a small allowance) is mapped to an EU size range.
When the AI model is not available, the app falls back to a simple paper-corner heuristic so the flow remains usable.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
app/— Next.js app router entrypoints and API routes.components/scan/— The end-to-end scan experience UI.lib/measurement.js— Foot measurement and sizing logic.lib/use-sam3.ts— Hooks and utilities for the SAM3 detection model.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.