An advanced AI-powered application for simulating rhinoplasty results using computer vision and augmented reality technology.
- Banuba AR Integration: Real-time rhinoplasty simulation using your camera
- Local Processing: Upload photos for rhinoplasty simulation using computer vision
- Multiple Rhinoplasty Options: Choose from various rhinoplasty types
- Adjustable Intensity: Control the strength of the rhinoplasty effect
- Download Results: Save your simulated results for reference
- Natural Refinement: Subtle changes to create a more balanced nose
- Nose Bridge Reduction: Reduce the height of the nose bridge
- Tip Refinement: Refine the nose tip to be more defined
- Wide Nose Narrowing: Narrow a wide nose for better facial harmony
- Crooked Nose Correction: Straighten a crooked nose
- Combined Enhancement: Comprehensive nose reshaping
- Python 3.10 or higher
- Node.js and npm (for Banuba SDK)
- Web browser with WebGL 2.0 support
-
Clone the repository:
git clone https://github.com/yourusername/rhinoplasty-ai.git cd rhinoplasty-ai -
Install Python dependencies:
pip install -r requirements.txt
-
Obtain a Banuba client token:
- Visit Banuba's website
- Sign up for a developer account
- Create a new project and get your client token
-
Add your client token to Streamlit secrets:
- For local development, create a
.streamlit/secrets.tomlfile with:BANUBA_CLIENT_TOKEN = "your_banuba_client_token_here"
- For Streamlit Cloud deployment, add the secret in the Streamlit Cloud dashboard
- For local development, create a
-
Create effect files for each rhinoplasty type:
- Place the effect files in the
src/effectsdirectory - Name them according to the pattern in
banuba_integration.js
- Place the effect files in the
-
Start the Streamlit app:
streamlit run src/app.py -
Open your browser and navigate to the URL shown in the terminal (typically http://localhost:8501)
-
Choose between:
- Banuba AR Simulation: Use your camera for real-time simulation
- Local Processing: Upload a photo for simulation
The Banuba SDK provides advanced facial tracking and augmented reality capabilities. The application uses this technology to:
- Track facial landmarks in real-time
- Apply 3D transformations to simulate rhinoplasty
- Render the modified face with realistic lighting and shadows
For uploaded photos, the application uses:
- MediaPipe Face Mesh for facial landmark detection
- Computer vision techniques for nose reshaping
- Image processing algorithms for realistic results
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This application is for educational and entertainment purposes only. It should not be used as a substitute for professional medical advice. Always consult with a qualified healthcare provider for medical procedures.