Skip to main content

Uses deep learning to caption img tags within a web page and fills out their alt attribute with the related caption

Project description

Altify automizes the task of inserting alternative text attributes for image tags. Altify uses Microsoft Computer Vision API’s deep learning algorithms to caption images in an HTML file and returns a new HTML file in which alt attributes are filled out with their corresponding captions.

Notice: Altify will now ignore any image tag whose alt attribute has content or is just an empty string. (In compliance with standard web practices)


  • Python 2.7
  • BeautifulSoup

Install and Usage (Latest Version)

1) Get a Microsoft API Key for Free

2) Install via pip

Open up terminal and enter: pip install altify

3) Use

altify path_to_your_html api_key

4) Enjoy!

A new HTML file called altify.html is created next to the HTML file you selected.

How It was Built

  1. Parses the html using BeautifulSoup.
  2. Finds all the image tags.
  3. Sends a request to Microsoft’s API to caption.
  4. Fills out the alt attributes for all the images.
  5. Writes an edited HTML file next to the file you selected.

Captioned Images Samples

Donald Trump wearing a suit and tie

A piano keyboard

A squirrel eating

A close up of a cat looking at the camera

A woman wearing a red hat

A small boat in a lake surrounded by mountains


Humans are currently better at captioning images than machines. Use responsibly!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
altify-4.2.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page