Skip to main content

A CLI tool for generating high-quality image-text pairs for AI training

Project description

GenIText: Generative Image-Text Automated package

Demonstration video of GenIText tool

Overview

This repository is independently developed as a felxible framework to generate high-quality Image-Text pairs for finetuning Image-Generation models, such as Stable Diffusion, DALL-E, and other generative models. By leveraging open-source captioning models, GenIText automates the process of generating diverse captions for corresponding images, ensuring that the text data is well-suited for downstream applications such as style-specific generations or domain adaptation. This framework is designed to complement contemporary repositories or modules in the field, offering an additional option for flexibility and automation to create customized datasets.

GenIText will become distributable as a CLI tool once package is ready for testing across systems. Please support in any way you see fit!

Table of Contents

Benchmarks

Model Auto-Batch Memory Usage Auto-Batch Seconds per Image 1 Batch Memory Usage 1 Batch Seconds per Image
LLaVA 7B 17,978 MB 3.25 7,014 MB 3.62
ViT-GPT2 0.27B 7,570 MB 0.08 914 MB 0.79
BLIPv2 2.7B 13,534 MB 0.25 4,590 MB 2.53

All models were tested on 502 random image from kaggle dataset found here. Images were resized based on their config files and tested on GeForce RTX 4090 Graphics Card with 24 Gb memory.

Installation

GenIText is available as a Python package and can be installed easily using pip.

To install GenIText, simply run:

pip install genitext

After installation, you can verify that the CLI tool is accessible by running:

genitext --help

To initiate the CLI tool, run:

genitext

GenIText incorporates LLMs from Ollama to assist with prompt refinement which means ollama has to be available on the device when running /refine in the CLI tool. You can download the software for Mac or Windows OS from here. For Linux OS, you can install directly via the following:

curl -fsSL https://ollama.com/install.sh | sh

After installing, pull the appropriate LLM you want to use in /refine. Currently, the default config is set to deepseek-r1:7b since it offers strong performance with it's reasoning capabilities while using relatively trivial memory. Options to switch the LLM in config will be made available soon.

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

genitext-0.3.4.tar.gz (204.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genitext-0.3.4-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file genitext-0.3.4.tar.gz.

File metadata

  • Download URL: genitext-0.3.4.tar.gz
  • Upload date:
  • Size: 204.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for genitext-0.3.4.tar.gz
Algorithm Hash digest
SHA256 b5c48a83633957c1817a01467fb849164b8a153c9005d9ce14cb00f28293bdff
MD5 9af2d1d781161c18e125a5cb54415f91
BLAKE2b-256 86a55d2b66731c27c1783abbf8e39d4bd47aef2c65433df5ac0c931da9c42bde

See more details on using hashes here.

File details

Details for the file genitext-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: genitext-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for genitext-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cda569dccc93197cffd360f001e27c4502f428e9a2791cb9e0b4569fbdb82ac1
MD5 4537f690a2ff61615eb3a0bec34c9d7f
BLAKE2b-256 a64a7374873e125d6b9ec0e4ab38c0e07e9627672a9beda3d9d509ca43508b5c

See more details on using hashes here.

Supported by

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