Instructions to use Anirudh1950/Virtual-Try-On with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MediaPipe
How to use Anirudh1950/Virtual-Try-On with MediaPipe:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
|
Download android/README.md from Anirudh1950/Virtual-Try-On: direct link, hf CLI and curl.
- Browser
- Download file 3.32 kB
-
https://huggingface.co/Anirudh1950/Virtual-Try-On/resolve/main/android/README.md
- Command line
-
hf download hf://Anirudh1950/Virtual-Try-On/android/README.md
-
curl -L -o README.md https://huggingface.co/Anirudh1950/Virtual-Try-On/resolve/main/android/README.md
3.32 kB
| # Fitroom (Android) | |
| Find your style, try clothes on live with the camera, and get an honest outfit score. | |
| | Feature | How it works | Runs | | |
| |---|---|---| | |
| | **Style quiz** | 7 questions build a blended profile across 10 style archetypes (Classic, Minimalist, Streetwear, Bohemian, …) plus occasions, fit and colour palette | On device | | |
| | **Occasions** | Dress-code formality scale: casual → smart casual → business casual → cocktail → formal, mapped to Everyday, Work, Date, Party, Formal event, Active, Travel | On device | | |
| | **Closet** | Photograph your clothes; the background is removed (ML Kit subject segmentation, plain-background fallback), fit points are detected and can be dragged to adjust | On device | | |
| | **Live try-on** | MediaPipe Pose (33 landmarks + person mask) → garment split into torso/sleeves/legs → thin-plate-spline torso warp, sleeves and legs bent along the arm/leg bones → OpenGL ES 3 render with shading from the camera image, hands and forearms kept on top | On device, ~30 fps | | |
| | **Outfit rating** | Explainable 0–100 score: occasion match, colour harmony, match with your style, how the pieces go together, and proportions measured live (e.g. a top running long on your torso). Suggests swaps from your closet that score higher | On device | | |
| | **Outfit ideas** | Pairs your tops and bottoms and ranks them for the chosen occasion | On device | | |
| | **Saved looks** | Snapshot + rating, favourites | On device | | |
| | **HD photo** | Optional photoreal still via Vertex AI Virtual Try-On, through your own backend (`../backend`) | Cloud (opt-in) | | |
| ## Build | |
| Requirements: Android Studio (Koala or newer), JDK 17, Android SDK 36. | |
| ```bash | |
| ./gradlew :app:testDebugUnitTest # geometry, rating, quiz, anchor detection | |
| ./gradlew :app:assembleDebug | |
| ``` | |
| The pose model `app/src/main/assets/pose_landmarker_lite.task` comes from | |
| [MediaPipe](https://ai.google.dev/edge/mediapipe/solutions/vision/pose_landmarker). | |
| The optional sample wardrobe in `assets/starter/` is generated by | |
| `../tools/make_starter_wardrobe.py`. | |
| ## Code map | |
| ``` | |
| domain/style style archetypes, occasions/formality, quiz + scoring | |
| domain/rating OutfitRater (facets + tips), ColorHarmony, OutfitIdeas | |
| tryon/geometry pure-Kotlin fitting: TPS, strip skinning, body model, meshes, smoothing (unit-tested) | |
| tryon PoseTracker (MediaPipe), GarmentAsset, TryOnEngine | |
| tryon/render TryOnRenderer (OpenGL ES 3) | |
| garments import pipeline, AnchorEstimator, starter wardrobe | |
| data Room (garments, looks), DataStore (profile, settings) | |
| hd client for the HD backend | |
| ui Compose screens: onboarding, home, closet/import, try-on, looks, profile | |
| ``` | |
| ## Limits worth knowing | |
| - The live view is 2D AR: the garment photo is warped onto your body. It looks best facing | |
| the camera; strong turns or crossed arms reduce realism. HD photo uses a generative model | |
| for a photoreal result. | |
| - The score judges styling and proportions, not garment size. | |
| - Front-view garment photos on a plain background give the best cut-outs. | |
| - The APK ships ARM libraries only (MediaPipe has no x86_64 build). x86_64 emulators run it | |
| through ARM translation; pose tracking falls back to CPU automatically when a GPU fails. | |