All Projects → IBM → Max Image Caption Generator

IBM / Max Image Caption Generator

Licence: apache-2.0
IBM Code Model Asset Exchange: Show and Tell Image Caption Generator

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Max Image Caption Generator

Docker Bind
Bind caching DNS server on Debian with wild-card domain support
Stars: ✭ 50 (-19.35%)
Mutual labels:  docker-image
Socat
Run socat command in alpine container
Stars: ✭ 53 (-14.52%)
Mutual labels:  docker-image
Scala Graalvm Docker
Docker images to build and generate native artifacts using GraalVM
Stars: ✭ 60 (-3.23%)
Mutual labels:  docker-image
Utils
Docker image with tools like curl, wget, ping, nslookup, dig, psql etc.
Stars: ✭ 49 (-20.97%)
Mutual labels:  docker-image
Docker Bungeecord
A BungeeCord server to use in conjunction with itzg/minecraft-server
Stars: ✭ 52 (-16.13%)
Mutual labels:  docker-image
Docker Spark Cluster
A Spark cluster setup running on Docker containers
Stars: ✭ 57 (-8.06%)
Mutual labels:  docker-image
Bitnami Docker Tensorflow Serving
Bitnami Docker Image for TensorFlow Serving
Stars: ✭ 49 (-20.97%)
Mutual labels:  docker-image
Docker Image Builder
标准化组件方式构建Docker镜像。Build a docker image from pieces of standard components.
Stars: ✭ 61 (-1.61%)
Mutual labels:  docker-image
Fabric Baseimage
Stars: ✭ 53 (-14.52%)
Mutual labels:  docker-image
Dockviz
Visualizing Docker data
Stars: ✭ 1,104 (+1680.65%)
Mutual labels:  docker-image
Nominatim Docker
Fully-featured container for geocoding, reverse geocoding and address lookup based on Nominatim and Open Street Map data.
Stars: ✭ 52 (-16.13%)
Mutual labels:  docker-image
Dockerpi
A Virtualised Raspberry Pi inside a Docker image
Stars: ✭ 1,064 (+1616.13%)
Mutual labels:  docker-image
Dokai
Collection of Docker images for ML/DL and video processing projects
Stars: ✭ 58 (-6.45%)
Mutual labels:  docker-image
Koa Typescript Starter
Integrating TypeScript with KOA2 to hit the ground running faster
Stars: ✭ 51 (-17.74%)
Mutual labels:  docker-image
Docker Laravel Queue Worker
A docker image for working with queues being monitored by supervisor as recommended by laravel.
Stars: ✭ 60 (-3.23%)
Mutual labels:  docker-image
Leanote Dockerfile
docker-compose for leanote.
Stars: ✭ 49 (-20.97%)
Mutual labels:  docker-image
Bitnami Docker Parse
Stars: ✭ 56 (-9.68%)
Mutual labels:  docker-image
Docker Yourls
📦 Docker Official Image packaging for YOURLS
Stars: ✭ 61 (-1.61%)
Mutual labels:  docker-image
Docker Hugo
🐳 Docker Image for Hugo, a fast and flexible static site generator
Stars: ✭ 60 (-3.23%)
Mutual labels:  docker-image
Fullstaq Ruby Docker
Docker image for Ruby build from Fullstaq based on Debian 9 and Debian 10.
Stars: ✭ 59 (-4.84%)
Mutual labels:  docker-image

Build Status Website Status

IBM Developer Model Asset Exchange: Image Caption Generator

This repository contains code to instantiate and deploy an image caption generation model. This model generates captions from a fixed vocabulary that describe the contents of images in the COCO Dataset. The model consists of an encoder model - a deep convolutional net using the Inception-v3 architecture trained on ImageNet-2012 data - and a decoder model - an LSTM network that is trained conditioned on the encoding from the image encoder model. The input to the model is an image, and the output is a sentence describing the image content.

The model is based on the Show and Tell Image Caption Generator Model. The checkpoint files are hosted on IBM Cloud Object Storage. The code in this repository deploys the model as a web service in a Docker container. This repository was developed as part of the IBM Code Model Asset Exchange.

Model Metadata

Domain Application Industry Framework Training Data Input Data Format
Vision Image Caption Generator General TensorFlow COCO Images

References

Licenses

Component License Link
This repository Apache 2.0 LICENSE
Model Weights MIT Pretrained Show and Tell Model
Model Code (3rd party) Apache 2.0 im2txt
Test assets Various Sample README

Pre-requisites:

  • docker: The Docker command-line interface. Follow the installation instructions for your system.
  • The minimum recommended resources for this model is 2GB Memory and 2 CPUs.
  • If you are on x86-64/AMD64, your CPU must support AVX at the minimum.

Deployment options

Deploy from Quay

To run the docker image, which automatically starts the model serving API, run:

$ docker run -it -p 5000:5000 quay.io/codait/max-image-caption-generator

This will pull a pre-built image from the Quay.io container registry (or use an existing image if already cached locally) and run it. If you'd rather checkout and build the model locally you can follow the run locally steps below.

Deploy on Red Hat OpenShift

You can deploy the model-serving microservice on Red Hat OpenShift by following the instructions for the OpenShift web console or the OpenShift Container Platform CLI in this tutorial, specifying quay.io/codait/max-image-caption-generator as the image name.

Deploy on Kubernetes

You can also deploy the model on Kubernetes using the latest docker image on Quay.

On your Kubernetes cluster, run the following commands:

$ kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Image-Caption-Generator/master/max-image-caption-generator.yaml

The model will be available internally at port 5000, but can also be accessed externally through the NodePort.

A more elaborate tutorial on how to deploy this MAX model to production on IBM Cloud can be found here.

Run Locally

  1. Build the Model
  2. Deploy the Model
  3. Use the Model
  4. Development
  5. Cleanup

1. Build the Model

Clone this repository locally. In a terminal, run the following command:

$ git clone https://github.com/IBM/MAX-Image-Caption-Generator.git

Change directory into the repository base folder:

$ cd MAX-Image-Caption-Generator

To build the docker image locally, run:

$ docker build -t max-image-caption-generator .

All required model assets will be downloaded during the build process. Note that currently this docker image is CPU only (we will add support for GPU images later).

2. Deploy the Model

To run the docker image, which automatically starts the model serving API, run:

$ docker run -it -p 5000:5000 max-image-caption-generator

3. Use the Model

The API server automatically generates an interactive Swagger documentation page. Go to http://localhost:5000 to load it. From there you can explore the API and also create test requests.

Use the model/predict endpoint to load a test file and get captions for the image from the API.

pic

You can also test it on the command line, for example:

$ curl -F "[email protected]/surfing.jpg" -X POST http://localhost:5000/model/predict
{
  "status": "ok",
  "predictions": [
    {
      "index": "0",
      "caption": "a man riding a wave on top of a surfboard .",
      "probability": 0.038827644239537
    },
    {
      "index": "1",
      "caption": "a person riding a surf board on a wave",
      "probability": 0.017933410519265
    },
    {
      "index": "2",
      "caption": "a man riding a wave on a surfboard in the ocean .",
      "probability": 0.0056628732021868
    }
  ]
}

4. Development

To run the Flask API app in debug mode, edit config.py to set DEBUG = True under the application settings. You will then need to rebuild the docker image (see step 1).

5. Cleanup

To stop the Docker container, type CTRL + C in your terminal.

Links

Resources and Contributions

If you are interested in contributing to the Model Asset Exchange project or have any queries, please follow the instructions here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].