Skip to main content

Autogenerate image descriptions with the help of computer vision

Project description

Autogenerate image descriptions with the help of computer vision (inspired by altify).

Requirements

  • Python 2.7 / Python 3.4 / PyPy

  • Django 1.8+

  • Wagtail 1.7+

  • An Microsoft Cognitive Service account

  • Images must be accessible by third part (to enable Computer Vision processing)

Installation

Install the library with pip:

$ pip install wagtailaltgenerator

Quick Setup

  1. Register an account on Microsoft Cognitive Service

  2. Retrive api key for the product Computer Vision - Preview

  3. Add the key to your django settings:

    COMPUTER_VISION_API_KEY = 'yourkey'
  4. Make sure wagtailaltgenerator is added to your INSTALLED_APPS.

    INSTALLED_APPS = (
        # ...
        'wagtailaltgenerator',
    )

Usage

  1. Upload an image through Wagtail

  2. Watch the title get generated…

  3. …And done!

Settings

  • COMPUTER_VISION_API_KEY: Computer Vision api key

Tests

This library include tests, just run python runtests.py

Make sure to install dev requirements: pip install -r requirements/dev.txt

Before running any type of tests, make sure the env variable COMPUTER_VISION_API_KEY is exported.

You can also run separate test cases: runtests.py tests.GenerateLabelTest

Contributing

Want to contribute? Awesome. Just send a pull request.

License

Wagtail-alt-generator is released under the MIT License.

Project details


Download files

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

Source Distribution

wagtailaltgenerator-1.0.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

wagtailaltgenerator-1.0.0-py2-none-any.whl (5.9 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page