aidyai / Caption-Anything

Caption Anything via Clicking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caption-Anything

Caption-Anything is a versatile image processing tool that combines the capabilities of Segment Anything, Visual Captioning, and ChatGPT. Our solution generates descriptive captions for any object within an image, offering a range of language styles to accommodate diverse user preferences. Caption-Anything supports visual controls (mouse click) and language controls (length, sentiment, factuality, and language).

  • visual controls and language controls for text generation
  • Chat about selected object for detailed understanding
  • Interactive demo
Open in Spaces

Demo

Explore the interactive demo of Caption-Anything, which showcases its powerful capabilities in generating captions for various objects within an image. The demo allows users to control visual aspects by clicking on objects, as well as to adjust textual properties such as length, sentiment, factuality, and language.


Getting Started

  • Clone the repository:
git clone https://github.com/ttengwang/caption-anything.git
  • Install dependencies:
cd caption-anything
pip install -r requirements.txt
  • Download the SAM checkpoints and place it to ./segmenter/sam_vit_h_4b8939.pth.

  • Run the Caption-Anything gradio demo.

# Configure the necessary ChatGPT APIs
export OPENAI_API_KEY={Your_Private_Openai_Key}
python app.py --regular_box  --captioner blip2 --port 6086

Acknowledgement

The project is based on Segment Anything, BLIP/BLIP-2, ChatGPT. Thanks for the authors for their efforts.

About

Caption Anything via Clicking

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 99.9%Language:Shell 0.1%