Sign inSign up

dixisouls/image-caption

By dixisouls

•Updated almost 2 years ago

This project is a Python-based application designed for image processing and caption generation.

Image
Machine learning & AI
Data science
0

268

dixisouls/image-caption repository overview

⁠Image Captioning: Dockerized

This Docker image is a complete solution for generating captions for images using a pre-trained deep learning model. The container makes it seamless to process images and retrieve meaningful captions, while packaging all necessary dependencies into a lightweight environment.


⁠Features

  • Automatically generates captions for images using pre-trained deep learning models.
  • Simplifies the setup by packaging dependencies and configurations into a single Docker container.
  • Highly flexible and lightweight, no manual installation required.
  • Input your image, and the caption is output to the terminal.

⁠How to Use

⁠1. Pull the Docker Image

Start by pulling the image from Docker Hub:

docker pull dixisouls/image-caption:latest

⁠2. Run the Container

Run the container to generate a caption for an input image:

docker run -v /path/to/input:/input dixisouls/image-caption:latest /input/image.jpg
⁠Explanation:
  • -v /path/to/input:/input: Mounts your local directory (containing the image) into the container. Replace /path/to/input with the absolute path to your folder that contains the image you want to process.
  • dixisouls/image-caption:latest: The Docker image pulled from Docker Hub.
  • /input/image.jpg: Path to the input image inside the container.

The container processes the image and outputs the generated caption directly in the terminal.


⁠Example Usage

If your input image is located in /user/photos and is named example.jpg, you can run:

docker run -v /user/photos:/input dixisouls/image-caption:latest /input/example.jpg

The image caption will be printed in your terminal.


⁠Repository Structure

This project includes all necessary components, such as the inference script and pre-trained models, for performing image captioning efficiently:

project/
├── Dockerfile                # Docker configuration for setting up the environment
├── requirements.txt          # Python dependencies for running the project
├── inference.py              # Main script to generate captions for input images
├── config.py                 # Configuration file for paths, hyperparameters, etc.
├── model.py                  # Definition of deep learning models (encoder and decoder)
├── vocabulary.py             # Script for vocabulary creation and handling
├── checkpoints/              # Pre-trained model weights directory
│   ├── encoder.ckpt          # Encoder checkpoint
│   ├── decoder.ckpt          # Decoder checkpoint
└── README.md                 # Documentation for the project

⁠GitHub Repository

You can find the source code for this project on GitHub:

Image Captioning GitHub Repository⁠

Tag summary

Content type

Image

Digest

sha256:b21035870…

Size

2.9 GB

Last updated

almost 2 years ago

docker pull dixisouls/image-caption