This application transforms 2D face images into realistic 3D face models using advanced AI techniques. It provides a user-friendly web interface for creating, viewing, and downloading 3D face models.
- Generate realistic face images using AI
- High-resolution image upscaling
- Automatic 3D face model generation
- Interactive 3D model viewer in browser
- Download 3D models in OBJ format with textures
- Global access option via ngrok
- Python 3.8 or higher
- Node.js 14+ and npm
- Windows OS (tested on Windows 10/11)
- CUDA-capable GPU recommended (but CPU mode is supported)
- At least 8GB RAM
- 2GB free disk space
# Clone the repository
git clone <repository-url>
cd <repository-name>
# Create and activate a virtual environment (recommended)
python -m venv venv
.\venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Install frontend dependencies
cd frontend
npm install
cd ..Create a .env file in the root directory with the following variables:
FLASK_ENV=development
FLASK_APP=app.py
PORT=5000- Start the Backend Server:
# From the root directory
python app.py- Start the Frontend Development Server:
# In a new terminal
cd frontend
npm run dev- Access the Application:
- Backend API: http://localhost:5000
- Frontend development server: http://localhost:5173
For a production deployment with backend and frontend served together:
# From the root directory
powershell -File deploy.ps1The application will be available at http://localhost:5000
To make your local application accessible globally:
-
Install and Configure ngrok:
- Sign up at ngrok.com
- Get your authtoken
- Configure ngrok:
./frontend/ngrok.exe config add-authtoken YOUR_AUTHTOKEN
-
Deploy Globally:
# Option 1: Deploy everything at once powershell -File deploy-global.ps1 # Option 2: If server is already running powershell -File start-ngrok.ps1
├── app.py # Main Flask application
├── api.py # API endpoints
├── frontend/ # React frontend application
├── requirements.txt # Python dependencies
├── .env # Environment variables
└── deploy scripts # Various deployment scripts
-
Port Already in Use
# Check what's using port 5000 netstat -ano | findstr :5000 # Kill the process if needed (replace PID with actual process ID) taskkill /PID <PID> /F
-
CUDA/GPU Issues
- Ensure you have compatible NVIDIA drivers installed
- The application will fallback to CPU mode if CUDA is unavailable
-
Memory Issues
- Close other memory-intensive applications
- Ensure you have at least 8GB of RAM available
-
Permission Issues
- Run as administrator using
run_as_admin.bat - Check file permissions in the project directory
- Run as administrator using
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Flask and React
- Uses advanced AI techniques for face generation and 3D modeling
- Powered by PyTorch for deep learning operations