|
This directory contains the `image_captioning.py` module. |
|
The image_captioning.py module provides functionality for generating captions for images using |
|
InstructBlip model. It includes tools for loading and configuring the model and tokenizer, |
|
resizing images, and generating captions for single or multiple images. |
|
|
|
|
|
Notes: |
|
Ensure the necessary dependencies are installed and properly configured. |
|
The module supports various image input formats, including file paths, file-like objects, and PIL Images. |
|
The free_gpu_resources() function is used to manage GPU memory effectively. |
|
Configuration settings for the model are imported from my_model.config.captioning_config. |