#openai #ai #ollama #vision #computer-vision #api-bindings #image-analysis

yanked eyeris

A high-performance image analysis service with AI provider support

2 releases

0.1.1 Nov 25, 2024
0.1.0 Nov 25, 2024

#14 in #vision

Download history 260/week @ 2024-11-23 21/week @ 2024-11-30 4/week @ 2024-12-07

285 downloads per month

MIT license

46KB
1K SLoC

eyeris

Build Status License Crates.io Documentation

A high-performance image analysis service that leverages AI models to provide detailed analysis of images. Supports multiple AI providers (currently OpenAI and Ollama).

Features

  • 🚀 High-performance image processing with parallel execution
  • 🤖 Multiple AI provider support (OpenAI, Ollama)
  • 📊 Detailed image analysis with customizable formats
  • 🖼️ Automatic image optimization and thumbnail generation
  • 📈 Token usage tracking
  • 🔒 Rate limiting built-in
  • 📝 Comprehensive logging

Quick Start

# Clone the repository
git clone https://github.com/scald/eyeris

# Navigate to project directory
cd eyeris

# Configure OpenAI API key (if using OpenAI)
echo "OPENAI_API_KEY=your_key_here" > .env

# Run the service
cargo run

API Usage

Send an image for analysis:

curl -X POST http://localhost:3000/process \
  -F "image=@path/to/your/image.jpg" \
  -F "provider=ollama" \
  -F "model=moondream" \
  -F "format=json"

Output Formats

  • JSON: Structured data format for programmatic use
  • Concise: Brief summary of key elements
  • Detailed: Comprehensive analysis with multiple aspects
  • List: Enumerated format for easy reading

Performance

The service is optimized for performance through:

  • Parallel processing with Rayon
  • Automatic image optimization
  • Efficient memory management
  • Rate limiting for stability

Project Structure

src/
├── processor.rs # Core processing logic
├── providers/   # AI provider implementations
├── prompts.rs   # Analysis prompt templates
└── main.rs      # Service entry point

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add your changes
  4. Write/update tests
  5. Submit a pull request

License

MIT License


Built with Rust 🦀

Dependencies

~18–31MB
~503K SLoC