Skip to content

4ier/LOGODETH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LOGODETH πŸ”₯

License: MIT Python 3.11+ Docker FastAPI AI Powered

AI-Powered Metal Band Logo Recognition Engine

LOGODETH uses advanced multimodal AI models (GPT-4V, Claude Vision) to identify even the most illegible extreme metal band logos. Built for the metal community, by metal enthusiasts.

"In the abyss of illegible logos, we bring order to chaos"

✨ Features

  • πŸ€– Multimodal AI Recognition - Powered by GPT-4o and Claude-3.5-Sonnet
  • ⚑ Lightning Fast - Redis caching with intelligent fallback
  • 🎯 High Accuracy - Specialized in extreme metal typography
  • πŸ”’ Production Ready - Docker, security hardening, monitoring
  • 🌐 Web Interface - Dark metal-themed UI with drag & drop
  • πŸ“Š Confidence Scoring - Know how certain the AI is
  • 🎡 Genre Classification - Black Metal, Death Metal, Doom, and more
  • πŸ’Ύ Smart Caching - Reduces API costs and improves speed

πŸš€ Quick Start

Docker (Recommended)

# Clone the repository
git clone https://github.com/4ier/LOGODETH.git
cd LOGODETH

# Copy environment template
cp .env.example .env
# Edit .env with your OpenAI API key

# Start with Docker Compose
docker-compose up -d

# Open http://localhost:8000

Local Development

# Requirements
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements_multimodal.txt

# Start Redis (required)
docker run -d -p 6379:6379 redis:7-alpine

# Configure environment
export LOGODETH_OPENAI_API_KEY="sk-your-key-here"
export LOGODETH_REDIS_URL="redis://localhost:6379"

# Start API server
uvicorn backend.app:app --reload --host 0.0.0.0 --port 8000

# Serve frontend (separate terminal)
cd frontend && python3 -m http.server 8080

πŸ“– Documentation

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Web Frontend  β”‚    β”‚   FastAPI       β”‚    β”‚  Multimodal AI  β”‚
β”‚   (HTML/JS)     │◄──►│   Backend       │◄──►│   (GPT-4V/      β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚   Claude-3.5)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   Redis Cache   β”‚
                       β”‚   (24hr TTL)    β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Components

  • Frontend: Dark metal-themed web interface with drag & drop
  • Backend: FastAPI server with async support and rate limiting
  • AI Integration: OpenAI GPT-4V and Anthropic Claude Vision APIs
  • Caching: Redis with SHA-256 image hashing and metadata
  • Security: Input validation, rate limiting, CORS protection

πŸ”§ Configuration

LOGODETH uses environment variables for configuration. See .env.example for all options.

Essential Settings

# Required: OpenAI API Key
LOGODETH_OPENAI_API_KEY=sk-your-openai-key

# Optional: Anthropic API Key (fallback)
LOGODETH_ANTHROPIC_API_KEY=sk-ant-your-key

# Redis Configuration
LOGODETH_REDIS_URL=redis://localhost:6379
LOGODETH_CACHE_TTL=86400  # 24 hours

# API Settings
LOGODETH_API_RATE_LIMIT=10  # requests per minute
LOGODETH_MAX_FILE_SIZE=10485760  # 10MB

🎯 Usage Examples

Web Interface

  1. Open http://localhost:8000 in your browser
  2. Drag & drop or select a metal band logo image
  3. Click "⚑ ANALYZE LOGO ⚑"
  4. View results with confidence scores and genre classification

REST API

# Upload and analyze a logo
curl -X POST "http://localhost:8000/api/v1/recognize" \
  -F "file=@brutal_logo.jpg" \
  -H "Accept: application/json"

# Response
{
  "band_name": "Dying Fetus",
  "genre": "Technical Death Metal", 
  "confidence": 94.2,
  "description": "Classic brutal death metal typography with gothic influences",
  "ai_model": "gpt-4o",
  "processing_time_ms": 1247,
  "_cache_metadata": {
    "cached_at": "2024-12-07T10:30:00Z",
    "image_hash": "a1b2c3d4...",
    "ttl_seconds": 86400
  }
}

Python SDK

import requests

def recognize_logo(image_path: str) -> dict:
    with open(image_path, 'rb') as f:
        response = requests.post(
            'http://localhost:8000/api/v1/recognize',
            files={'file': f}
        )
    return response.json()

result = recognize_logo('logo.jpg')
print(f"Band: {result['band_name']} ({result['confidence']:.1f}%)")

πŸ§ͺ Testing

# Run all tests
pytest

# Run specific test categories
pytest tests/test_recognition.py  # AI recognition tests
pytest tests/test_cache.py        # Cache functionality
pytest tests/test_api.py          # API endpoint tests

# Test with coverage
pytest --cov=backend --cov-report=html

πŸš€ Deployment

Production with Docker

# Use production configuration
docker-compose -f docker-compose.prod.yml up -d

# Or with custom settings
LOGODETH_ENVIRONMENT=production \
LOGODETH_OPENAI_API_KEY=sk-prod-key \
docker-compose -f docker-compose.prod.yml up -d

Cloud Deployment

  • AWS: ECS with ALB, ElastiCache Redis, Secrets Manager
  • Google Cloud: Cloud Run, Memorystore Redis, Secret Manager
  • Azure: Container Instances, Redis Cache, Key Vault

See deployment documentation for detailed guides.

πŸ“Š Performance

  • Response Time: < 2 seconds average (with cache: < 100ms)
  • Throughput: 10-50 requests/minute (configurable rate limiting)
  • Accuracy: ~85% for common metal bands, ~70% for obscure bands
  • Cache Hit Rate: ~60% in typical usage patterns
  • Memory Usage: ~500MB (API) + ~512MB (Redis)

🀝 Contributing

We welcome contributions from the metal community! Please see our Contributing Guide.

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run tests: pytest
  5. Commit: git commit -m 'Add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Create a Pull Request

Areas for Contribution

  • 🎡 Genre Classification: Improve metal subgenre detection
  • πŸ–ΌοΈ Logo Database: Expand training data with rare bands
  • 🌐 Internationalization: Support for non-English band names
  • πŸ“± Mobile App: React Native or Flutter mobile interface
  • πŸ”Œ Integrations: Discord bots, browser extensions

πŸ›‘οΈ Security

  • Input validation and file type checking
  • Rate limiting to prevent abuse
  • No user data storage or tracking
  • Secure API key management
  • Regular dependency updates

Report security issues to: security@logodeth.ai

πŸ“ˆ Roadmap

🎯 Phase 1: Core Features (βœ… Complete)

  • Multimodal AI integration
  • Web interface and REST API
  • Redis caching system
  • Docker deployment

πŸš€ Phase 2: Enhancement (πŸ”„ In Progress)

  • Batch processing API
  • User authentication system
  • Recognition history tracking
  • Advanced analytics dashboard

🌟 Phase 3: Community (πŸ“‹ Planned)

  • Mobile applications
  • Browser extensions
  • Discord/Slack integrations
  • Community logo database
  • Self-hosted model training

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for GPT-4 Vision capabilities
  • Anthropic for Claude Vision API
  • Metal Archives for inspiration and the incredible metal database
  • The Metal Community for being brutal and supporting illegible logos
  • FastAPI and Redis for excellent open-source tools

πŸ“ž Support


Made with πŸ”₯ for the Metal Community

Website β€’ API Docs β€’ Discord

About

Let's do LOGODETH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •