Transform any image into authentic traditional art stylesβincluding Japanese Ukiyo-e and Indian folk/temple artβusing state-of-the-art AI technology.
Ancient Vision bridges the gap between modern photography and traditional art, allowing users to experience the timeless beauty of both Japanese and Indian heritage styles through cutting-edge artificial intelligence.
- Authentic Traditional Styles: Transform images into Japanese Ukiyo-e and a wide range of Indian folk and temple art styles
- ControlNet Integration: Structural guidance while maintaining artistic style
- π― Canny Edge Detection: Preserves edges and outlines (automatically applied)
- ποΈ Depth Estimation: Maintains spatial relationships and depth
- πΊ Pose Detection: Preserves human poses and body structure
- Smart Prompting: Default prompt with optional user additions
- Each style has a unique, culturally accurate prompt for best results
- User prompts are appended to the default for enhanced results
- Optimized Parameters: Pre-configured settings for best results
- Strength: 0.75
- Guidance Scale: 8.5
- Inference Steps: 25
- Resolution: 512x512
- Japanese Ukiyo-e (classic, landscape, portrait, nature, urban, seasonal)
- Indian Traditional Styles:
- Gond Art: Tribal art with dot patterns, nature, and storytelling
- Kalighat Painting: Bengali folk art, bold lines, mythological themes
- Kangra Miniature: Himalayan miniature, delicate brushwork, court scenes
- Kerala Mural: South Indian temple art, mythological scenes, vibrant colors
- Madhubani Art: Bihar folk art, geometric designs, ritualistic motifs
- Mandana Art: Rajasthani wall art, geometric and auspicious patterns
- Pichwai Painting: Nathdwara temple art, Krishna themes, devotional motifs
- File Upload: Standard drag-and-drop or click-to-browse functionality
- Real-time Camera Capture:
- πΈ Direct photo capture within the application
- π Front/back camera switching for mobile devices
- π― High-definition capture (1280x720 resolution)
- π± Mobile-first responsive design
- π‘οΈ Secure permission-based camera access
- Intuitive Interface: Clean, minimalist design focused on the art creation process
- Instant Results: Fast processing with optimized AI pipeline
- Cross-platform: Works seamlessly on desktop and mobile browsers
Component | Technology | Purpose |
---|---|---|
Backend | Flask + PyTorch | AI model serving and API endpoints |
Frontend | React + Material-UI | Modern, responsive user interface |
AI Models | Stable Diffusion + Custom LoRA | Traditional art style transformation engine |
ControlNet | Multiple ControlNet Models | Structural guidance and preservation |
Image Processing | Canvas API + WebRTC | Real-time camera capture and processing |
# Clone the repository
git clone https://github.com/VinaySurwase/Ancient-Vision.git
cd Ancient-Vision
# Make the run script executable and start everything
chmod +x run.sh
./run.sh
- Frontend Application: http://localhost:3000
- Backend API: http://localhost:5000
- API Documentation: http://localhost:5000/docs
- Click "Choose File" or drag and drop images into the upload area
- Supported formats: JPEG, PNG, WebP (max 10MB)
- Click "Take Photo" button
- Grant camera permissions when prompted by your browser
- Use the live preview to frame your subject
- Toggle between front/back cameras using the switch button
- Click "Capture Photo" to take the picture
- Your image is immediately ready for transformation
- Select Input: Upload a file or capture with camera
- Choose Model: Select your art model (automatic detection of available models)
- Add Context (Optional): Provide additional descriptive prompts that will be added to the default prompt
- Configure Settings (Optional): Adjust advanced parameters if needed (strength, guidance scale, steps)
- Transform: Click transform and let AI create your traditional artwork with automatic ControlNet guidance
- Download: Save your traditional artwork
Parameter | Value | Purpose |
---|---|---|
Base Prompt | Each style has a unique, culturally accurate prompt (see below) | Core traditional style definition |
Negative | Each style has a negative prompt to avoid modern/realistic elements | Prevents unwanted modern elements |
Strength | 0.75 | Balance between original and transformed |
Guidance | 8.5 | Optimal prompt adherence for style |
Steps | 25 | Fast processing with quality results |
Resolution | 512x512 | Optimized for model performance |
ControlNet | Canny (0.8 strength) | Automatic edge preservation |
Requirement | Details |
---|---|
Protocol | HTTPS required in production environments |
Permissions | User must explicitly grant camera access |
Connectivity | Active internet connection for AI processing |
Performance | Modern device with adequate processing power |
- Python 3.8 or higher
- Node.js 16.0 or higher
- npm or yarn package manager
# Install Python dependencies
pip install -r requirements.txt
# Start the Flask server
python app.py
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server
npm start
# Add your custom models to the models directory
cp your_custom_model.safetensors models/
# Models are automatically detected and loaded
Method | Endpoint | Description | Parameters |
---|---|---|---|
POST |
/api/transform |
Transform image to traditional style | image , prompt , style , control_type , etc |
GET |
/api/models |
List available AI models | None |
GET |
/api/styles |
List available art styles | None |
GET |
/api/controlnet |
List available ControlNet options | None |
GET |
/api/health |
Service health check | None |
curl -X POST http://localhost:5001/api/transform \
-H "Content-Type: application/json" \
-d '{
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...",
"prompt": "lotus flowers, peacocks, or mythological scene",
"style": "gond", # or kalighat, kangra, kerala_mural, madhubani, mandana, pichwai, classic_ukiyo, etc.
"control_type": "canny",
"controlnet_conditioning_scale": 1.0,
"strength": 0.75,
"guidance_scale": 8.5,
"num_inference_steps": 25
}'
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -r requirements-dev.txt
# Frontend tests
cd frontend
npm test
# Backend tests
python -m pytest tests/
# Run specific test file
npm test -- ImageUpload.test.js
# Frontend linting
cd frontend
npm run lint
# Python code formatting
black .
flake8 .
- No Server Storage: Images are processed in memory and immediately discarded
- Local Processing: Camera captures remain on the client until transformation
- Secure Transmission: All API communications use HTTPS in production
- Privacy First: No user data collection or tracking
- Explicit Permissions: Camera access requires user consent
- Stream Management: Automatic cleanup of camera streams after use
- Browser Security: Leverages native browser security for camera access
- HTTPS Requirement: Camera functionality requires secure connections in production
Browser | Version | Camera Support | WebRTC | Canvas API |
---|---|---|---|---|
Chrome | 53+ | β Full | β | β |
Firefox | 36+ | β Full | β | β |
Safari | 11+ | β Full | β | β |
Edge | 12+ | β Full | β | β |
Mobile Chrome | 53+ | β Full | β | β |
Mobile Safari | 11+ | β Full | β | β |
- Camera switching may be limited on some older mobile devices
- HTTPS required for camera access in all modern browsers
- WebGL support recommended for optimal performance
We welcome contributions from the community! Please follow these guidelines:
- Fork the repository
- Clone your fork locally
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test thoroughly
- Commit with clear messages (
git commit -m 'Add amazing feature'
) - Push to your branch (
git push origin feature/amazing-feature
) - Submit a Pull Request
- Follow existing code style and conventions
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass before submitting
This project is licensed under the MIT License - see the LICENSE file for details.
- Traditional Ukiyo-e artists who inspired this work
- The Stable Diffusion community for foundational AI models
- Contributors and testers who helped improve the application
- Japanese cultural preservation organizations
- Documentation: Check this README and inline code comments
- Issues: Use GitHub Issues for bug reports and feature requests
- Community: Join discussions in GitHub Discussions
- Updates: Watch the repository for latest releases and updates
Made with β€οΈ for art enthusiasts and technology lovers