Fashion-AI  by liangdabiao

AI pipeline for automated e-commerce promotional image generation

Created 2 months ago
256 stars

Top 98.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project addresses the challenge of generating professional promotional images for new e-commerce products by automating a pipeline. It targets cross-border e-commerce sellers and advertisers, offering a cost-effective and time-saving solution compared to traditional methods.

How It Works

The pipeline employs a three-stage approach: first, it uses Milvus with hybrid retrieval (dense visual vectors, sparse keyword vectors, scalar sales data) and Reciprocal Rank Fusion (RRF) to find similar best-selling products. Second, a multimodal LLM (Qwen 3.5) analyzes these reference images to generate a detailed style prompt. Finally, an image generation model (e.g., Gemini, GPT) uses the new product image, reference style, and prompt to create the final promotional visual. This hybrid search and LLM-driven style analysis are key differentiators.

Quick Start & Requirements

  • Installation: Clone the repository and run pip install -r requirements.txt.
  • Prerequisites: Python 3.10+, Zilliz Cloud account, OpenRouter account with API key. Configure API keys and Milvus connection details in a .env file.
  • Data: Populate images/ with historical best-seller photos and new_products/ with new item flat lays. Edit corresponding CSV files (products.csv, new_products.csv) with metadata.
  • Execution:
    • python main.py setup: Initializes Milvus database and ingests data.
    • python main.py search --new-id NEW001: Tests the retrieval mechanism.
    • python main.py generate --new-id NEW001: Runs the full pipeline to generate a promotional image.
  • Links: OpenRouter: https://openrouter.ai/keys; Zilliz Cloud console.

Highlighted Details

  • Advanced Retrieval: Implements hybrid search combining dense (visual), sparse (TF-IDF), and scalar (sales) vectors, re-ranked using Reciprocal Rank Fusion (RRF) for superior accuracy in finding relevant best-sellers.
  • Unified Model Access: Leverages OpenRouter for API calls to various embedding, LLM, and image generation models, simplifying integration and enabling easy model swapping.
  • Flexible Image Generation: Supports multiple generation models (e.g., Nano Banana 2/Gemini, GPT-5 variants) via a command-line parameter, allowing customization of aspect ratio, resolution, and model choice.
  • Cost Management: Utilizes free embedding models and cost-effective LLMs, with image generation costs clearly itemized per image.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or project roadmap were found in the provided README content.

Licensing & Compatibility

The provided README content does not explicitly state the project's license. Therefore, compatibility for commercial use or closed-source linking cannot be determined from this information.

Limitations & Caveats

Placeholder images must be replaced with actual product photos for the pipeline to function correctly. Image resolution impacts embedding quality, with 800x800px or higher recommended. The Nano Banana 2 model may occasionally produce unnatural fits between clothing and the body. Milvus Lite is not supported on Windows; Zilliz Cloud is used as an alternative.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
36 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.