Project

06

Salesforce Blip Image Captioning

Custom API for Alt Text Generation with AI

Postman Dashboard
Postman Dashboard

Project information

I built the Image Captioning API using the Salesforce BLIP (Bootstrapping Language-Image Pre-training) Image Captioning model to generate descriptive alt text for images. This API is designed to accept an image URL, process the image through the BLIP model, and return a human-readable description of the image. This functionality is particularly useful for enhancing accessibility and SEO by providing meaningful alt text for images.

How It Works

  1. Input: The client sends a GET request to the API endpoint with the url parameter specifying the image URL.

  2. Processing:

    • The API fetches the image from the provided URL.

    • The fetched image is then passed to the Salesforce BLIP Image Captioning model.

    • The BLIP model processes the image and generates a textual description.

  3. Output: The API returns a JSON response containing the generated description.

Example Request

curl -X GET "https://dashing-centaur-eeaac3.netlify.app/.netlify/functions/api/analyze-image?url=https://example.com/path/to/image.jpg"

Example Response

{
  "description": {
    "generated_text": "a person walking on a sand dune"
  }
}

Use Cases

  • Accessibility: Automatically generate alt text for images to improve web accessibility for visually impaired users.

  • SEO: Enhance search engine optimization by providing descriptive alt text for images.

  • Content Management: Assist content creators in generating descriptions for large numbers of images efficiently.

Advantages

  • Efficiency: Automates the process of generating descriptive alt text, saving time and effort.

  • Consistency: Ensures a consistent style and quality of descriptions across all images.

  • Scalability: Capable of handling requests for multiple images efficiently, making it suitable for large-scale implementations.

Limitations

  • Accuracy: While the BLIP model provides high-quality descriptions, the accuracy may vary depending on the complexity and context of the images.

  • Dependency on Image Quality: The quality of the generated description may depend on the clarity and detail of the input image.

This API serves as a robust tool for automatically generating descriptive text for images, leveraging advanced AI models to enhance user experience and content accessibility.

Use Case: Link

👨‍💻 Technical Stack:

Backend:

  • Node.js

  • Express

Build + Test Tools:

  • Netlify

  • Postman

AI Model:

  • Salesforce BLIP (Bootstrapping Language-Image Pre-training) Image Captioning model

Version Control:

  • GitHub

Opening hours:

Mo – Fr: 8:00 – 6:00

Location:

700 S. Rosemary Ave

West Palm Beach, FL 33401

CRAFTING

DIGITAL

EXCELLENCE

ᕙ( •̀ ᗜ •́ )ᕗ

Copyright © 2024 Manny

Opening hours:

Mo – Fr: 8:00 – 6:00

Location:

700 S. Rosemary Ave

West Palm Beach, FL 33401

CRAFTING

DIGITAL

EXCELLENCE

ᕙ( •̀ ᗜ •́ )ᕗ

Copyright © 2024 Manny

Opening hours:

Mo – Fr: 8:00 – 6:00

Location:

700 S. Rosemary Ave

West Palm Beach, FL 33401

CRAFTING

DIGITAL

EXCELLENCE

ᕙ( •̀ ᗜ •́ )ᕗ

Copyright © 2024 Manny