A smart avatar matching application that uses AI to find the best avatar match for your photo.
- Python 3.8+
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd desc_avtr_match
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the root directory:GEMINI_API_KEY=your_gemini_api_key_here -
Run the Streamlit app
streamlit run streamlit_app.py
The following files are required to run the application:
streamlit_app.py- Main Streamlit applicationavatar_match_pipeline_v2.py- Optimized avatar matching pipelineavatar_service.py- Avatar metadata and image download servicein_memory_llm_service.py- LLM service for image analysisavatar_metadata.jsonl- Avatar metadata databaserequirements.txt- Python dependenciesuser_test_images/ghibli.jpg- Sample test image
- Smart Gender & Age Detection: Automatically detects gender and age group from uploaded photos
- Optimized Processing: Pre-downloads avatars once and processes them in memory
- Tournament-Style Matching: Uses elimination rounds to find the best match
- Performance Metrics: Shows download times and processing statistics
- Beautiful UI: Modern, responsive interface with real-time progress tracking
- Upload your photo
- AI detects your gender and age group
- System filters avatars based on your characteristics
- Downloads matching avatars (once, in parallel)
- Runs tournament-style elimination to find the best match
- Displays results with performance metrics
- Pre-download Strategy: All filtered avatars downloaded once at start
- In-Memory Processing: No temporary files, direct PIL image processing
- Image Caching: Images cached by ID, reused across all rounds
- Parallel Downloads: Multiple avatars downloaded simultaneously
- Numbered Strips: LLM-friendly image numbering for accurate identification
- Batch Size: Adjust the number of avatars compared at once (2-8)
- API Key: Set your Gemini API key in the
.envfile
This project is for educational and research purposes.