celestial317-weaver-ai/
├── README.md
├── class2idx.json # Color class mappings
├── load_models.py # Model initialization script
├── model_for_gen.py # Model generation utilities
├── model_weights.pth # Trained ResNet model
├── subclass2idx.json # Color subclass mappings
├── vector_db_resnet.py # ResNet-based vector database setup
├── react_app/ # React frontend application
│ ├── eslint.config.js
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── tailwind.config.js
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ ├── vite.config.ts
│ └── src/
│ ├── App.tsx
│ ├── index.css
│ ├── main.tsx
│ ├── vite-env.d.ts
│ ├── components/
│ │ ├── FileUpload.tsx
│ │ ├── Footer.tsx
│ │ ├── LoadingSpinner.tsx
│ │ └── Navbar.tsx
│ └── pages/
│ ├── AISearch.tsx
│ ├── Catalogue.tsx
│ ├── HomePage.tsx
│ ├── ImageRecommendations.tsx
│ ├── Stylizer.tsx
│ ├── VirtualTryOn.tsx
│ └── VisualDesigner.tsx
└── server_scripts/ # Backend server scripts
├── ai_search.py # AI search server
├── amalgam.py # Amalgam server
├── designer.py # Designer server
└── recommender.py # Recommendation server
Before starting, make sure you have the following environment variables configured:
GEMINI_API_KEY- Your Google Gemini API keyQDRANT_API_KEY- Your Qdrant API keyQDRANT_URL- Your Qdrant database URL
-
Navigate to the project directory:
cd weaver-ai -
Load and initialize models:
python load_models.py python model_for_gen.py
-
Populate the vector database:
python vector_db_resnet.py
This script will:
- Initialize the Qdrant vector database
- Process and embed fashion data using ResNet
- Create searchable vector collections
-
Start all backend servers (run each in a separate terminal):
Terminal 1 - AI Search Server:
python server_scripts/ai_search.py
Terminal 2 - Recommendation Server:
python server_scripts/recommender.py
Terminal 3 - Designer Server:
python server_scripts/designer.py
Terminal 4 - Amalgam Server:
python server_scripts/amalgam.py
-
Navigate to the React project:
cd react_app -
Install Node.js dependencies:
npm install
-
Start the React development server:
npm run dev
-
Open the web application:
- The React app will be available at: http://localhost:5173
- Navigate through the different pages using the navigation menu
The application now features multiple AI-powered pages:
-
Home Page (/):
- Landing page with navigation to all features
- Overview of available AI tools
-
Image Recommendations (/image-recommendations):
- Upload an image for AI-powered clothing recommendations
- Color palette analysis using ResNet
- Matching clothing items with confidence scores
-
AI Search (/ai-search):
- Text-based fashion search powered by AI
- Natural language queries for clothing items
- Semantic search through the fashion database
-
Virtual Try-On (/virtual-tryon):
- Virtual clothing try-on capabilities
- AI-powered garment fitting simulation
-
Stylizer (/stylizer):
- AI-powered styling suggestions
- Outfit coordination and recommendations
- Generates style transfer of two cloth images
-
Visual Designer (/visual-designer):
- AI-assisted fashion design tools
- Creative design generation capabilities
- Ingest drawing, will return cloth
-
Catalogue (/catalogue):
- Browse the complete fashion database
- Filter and search through available items
The application runs multiple specialized servers:
- Endpoint:
/ai-search - Features: Natural language fashion search
- AI Model: semantic search
- Endpoint:
/recommend - Features: Image-based clothing recommendations
- AI Model: ResNet color analysis + vector similarity
- Endpoint:
/designer - Features: AI-powered design generation
- AI Model: Generative AI for fashion design
- Endpoint:
/amalgam - Features: Combined AI services orchestrator
- AI Model: Multi-modal AI coordination
Make sure to configure the following in your environment:
# Gemini AI Configuration
export GEMINI_API_KEY="your_gemini_api_key_here"
# Qdrant Vector Database Configuration
export QDRANT_API_KEY="your_qdrant_api_key_here"
export QDRANT_URL="your_qdrant_cluster_url_here"- ResNet Analysis: Deep color and pattern recognition
- Gemini AI: Natural language processing and generation
- Vector Database: Qdrant-powered similarity search
- IP Adapter with ControlNet : for amalgam generation
- Semantic Search: Natural language fashion queries
- Visual Recognition: Image-based style analysis
- Style Generation: AI-powered design creation
- Virtual Try-On: Realistic garment visualization
- Smart Recommendations: Multi-factor matching algorithms
- Modern React Interface: Responsive, mobile-friendly design
- Real-time Processing: Fast AI inference and responses
- Multi-Page Navigation: Dedicated features for each AI capability
- Drag & Drop Upload: Intuitive file handling
- Live Feedback: Progress indicators and status updates
- Microservices: Specialized servers for each AI feature
- Vector Storage: Efficient similarity search with Qdrant
- Model Management: Centralized AI model loading and caching
- API Integration: FastAPI services with CORS support
- Development Tools: Hot reload, TypeScript, Tailwind CSS
-
API Keys Not Set:
# Set environment variables export GEMINI_API_KEY="your_api_key" export QDRANT_API_KEY="your_api_key" export QDRANT_URL="your_cluster_url"
-
Vector Database Not Populated:
# Re-run the database setup python vector_db_resnet.py -
Model Loading Issues:
# Reload models python load_models.py -
Server Port Conflicts:
# Check for running processes netstat -ano | findstr :8000 # Kill conflicting processes taskkill /PID <process_id> /F
-
React Build Issues:
cd react_app rm -rf node_modules package-lock.json npm install
-
Testing Individual Servers:
# Test each server endpoint individually curl http://localhost:8000/health curl http://localhost:8001/status -
Monitoring Logs:
- Each server outputs logs to its terminal
- Check browser console for frontend errors
- Monitor Qdrant dashboard for database status
-
Model Performance:
- Ensure sufficient GPU/CPU resources
- Monitor memory usage during inference
- Check model loading completion before testing
Models Ready:
- Model initialization completed successfully
- ResNet model weights loaded
- Vector database populated with embeddings
Servers Running:
- AI Search server: Running and responsive
- Recommendation server: Image processing functional
- Designer server: Generation capabilities active
- Amalgam server: Service orchestration working
Frontend Ready:
- React app running on http://localhost:5173
- All pages accessible via navigation
- Component rendering without errors
- API calls connecting to backend servers
Integration Working:
- Image uploads trigger AI analysis
- Search queries return relevant results
- Recommendations display with confidence scores
- All AI features respond as expected
Developed by Soumya Sourav | Ishansh | Hafsah