CoolFace
Apppublic

salmanabjam/deepvision-prompt-builder

sourceHugging Facemitupdated 11mo agoView on Hugging Face
0likes
App README

๐ŸŽฏ DeepVision Prompt Builder

AI-Powered Image & Video Analysis with Automatic JSON Prompt Generation

Overview

DeepVision is a modular AI system that analyzes images and videos to generate structured JSON prompts. Perfect for:

  • โ€”๐Ÿ“ธ Automated image tagging
  • โ€”๐ŸŽฌ Video content analysis
  • โ€”๐Ÿค– AI training data preparation
  • โ€”๐Ÿ“Š Media cataloging
  • โ€”๐ŸŽจ Creative prompt generation

Features

Available Plugins

  • โ€”๐ŸŽจ Color Analyzer (Fast): Extract dominant colors, color schemes, brightness, and saturation
  • โ€”๐Ÿ” Object Detector (CLIP): Zero-shot object detection with confidence scores
  • โ€”๐Ÿ’ฌ Caption Generator (BLIP-2): Natural language image descriptions

Supported Formats

  • โ€”Images: JPG, PNG, WebP, BMP, GIF
  • โ€”Videos: MP4, AVI, MOV, MKV

Usage

  1. 1.Upload an image or video file
  2. 2.Select which analysis plugins to use
  3. 3.Click "Analyze" to process
  4. 4.View results in formatted or JSON format
  5. 5.Download JSON output for use in other systems

Performance Notes

  • โ€”Color Analyzer: ~1-2 seconds per image, lightweight
  • โ€”Object Detector: First use downloads ~2GB CLIP model, then ~5-10 seconds per image
  • โ€”Caption Generator: First use downloads ~2-5GB BLIP-2 model, then ~8-15 seconds per image
  • โ€”Video Analysis: Processes N keyframes (configurable 1-20 frames)

Example Output

json
{
  "results": {
    "color_analyzer": {
      "dominant_colors": [
        {"color": [45, 85, 125], "percentage": 35.2, "name": "blue"}
      ],
      "color_scheme": "cool",
      "average_brightness": 128.5,
      "average_saturation": 0.65
    }
  },
  "metadata": {
    "file": {
      "filename": "example.jpg",
      "size_mb": 2.4,
      "width": 1920,
      "height": 1080
    },
    "processing": {
      "duration_seconds": 1.234,
      "plugins_used": ["color_analyzer"]
    }
  }
}

Technology Stack

  • โ€”Framework: Python 3.10+
  • โ€”UI: Gradio 4.44+
  • โ€”CV: OpenCV, PIL, NumPy
  • โ€”AI Models: CLIP, BLIP-2 (via HuggingFace Transformers)
  • โ€”Logging: Loguru

Architecture

DeepVision uses a plugin-based architecture:

  • โ€”Core Engine: Orchestrates analysis pipeline
  • โ€”Plugin System: Modular, extensible analysis components
  • โ€”Result Manager: Aggregates and formats outputs

Local Development

bash
# Clone repository
git clone https://huggingface.co/spaces/YOUR_USERNAME/deepvision
cd deepvision

# Install dependencies
pip install -r requirements.txt

# Run locally
python app.py

License

MIT License - Free to use and modify

Credits

Built by AI Dev Collective v9.0

  • โ€”Astro (Lead Developer)
  • โ€”Lyra (Research)
  • โ€”Nexus (Code Quality)
  • โ€”CryptoX (Security)
  • โ€”NOVA (UI/UX)
  • โ€”Echo (Performance)
  • โ€”Sage (Documentation)
  • โ€”Pulse (DevOps)

Links


Version: 0.1.0 Last Updated: January 2025