AI Alt Tag Generator
AI-powered alt tag generation for web accessibility - Making the web accessible for everyone!
β¨ Features
- π Fast Generation: 0.5-2 seconds per image
- π― 5 Alt Tag Styles: Short, Medium, Long, Accessibility, SEO
- π 89 Languages: Multilingual support via Google Translate
- β‘ GPU Acceleration: Automatic CUDA detection and fallback
- βΏ WCAG 2.1 AA: Compliance-focused alt text generation
π Quick Start
Installation
pip install -r requirements.txt
Basic Usage
from alt_tag_generator import AltTagGenerator
# Initialize generator
generator = AltTagGenerator()
# Generate alt tags for an image
results = generator.generate_alt_tags("https://example.com/image.jpg")
# Display results
generator.display_results(results)
Output Example
ALT TAG RESULTS
==================================================
Source: https://example.com/cat.jpg
Size: (800, 600)
Caption: a cat sitting on a table
Device: cuda
Time: 1.23s
Confidence: 0.85
ALT TAG VARIATIONS:
------------------------------
SHORT: cat sitting table
MEDIUM: cat sitting on table
LONG: cat sitting on a table
ACCESSIBILITY: Image shows cat sitting on a table
SEO: cat sitting table
==================================================
π§ͺ Testing
Run the built-in demo:
from alt_tag_generator import quick_demo
quick_demo()
π Performance
- Speed: 0.5-2 seconds per image
- Memory: ~1GB GPU VRAM (or 2GB RAM for CPU)
- Model Size: ~990MB download
- Accuracy: 85%+ typical confidence
- Languages: 89 supported languages
π οΈ System Requirements
Minimum Requirements
- Python 3.8+
- 4GB RAM
- 2GB disk space
Recommended Requirements
- Python 3.10+
- 8GB RAM
- NVIDIA GPU with 4GB+ VRAM
- 10GB disk space
π License
This project is licensed under the MIT License.
π Acknowledgments
- Salesforce BLIP: For the amazing image captioning model
- Hugging Face: For the transformers library and model hosting
- Accessibility Community: For guidance on WCAG compliance
Made with love for web accessibility by abhilash88
"Making the web accessible for everyone, one image at a time."