# InternGPT
**Repository Path**: xeval/InternGPT
## Basic Information
- **Project Name**: InternGPT
- **Description**: InternGPT InternGPT
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: imagebind
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2023-05-26
- **Last Updated**: 2023-07-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[[English Document](https://github.com/OpenGVLab/internGPT/blob/main/README.md)]
**[NOTE] 该项目仍在建设中,我们将继续更新,并欢迎社区的贡献/拉取请求。**

|
|
# 🤖💬 InternGPT [[论文](https://arxiv.org/pdf/2305.05662.pdf)][[试玩](https://igpt.opengvlab.com)]
**InternGPT**(简称 **iGPT**) / **InternChat**(简称 **iChat**) 是一种基于指向语言驱动的视觉交互系统,允许您使用指向设备通过点击、拖动和绘制与 ChatGPT 进行互动。internGPT 的名称代表了 **inter**action(交互)、**n**onverbal(非语言)和 Chat**GPT**。与依赖纯语言的现有交互系统不同,通过整合指向指令,iGPT 显著提高了用户与聊天机器人之间的沟通效率,以及聊天机器人在视觉为中心任务中的准确性,特别是在复杂的视觉场景中。此外,在 iGPT 中,采用辅助控制机制来提高 LLM 的控制能力,并对一个大型视觉-语言模型 **Husky** 进行微调,以实现高质量的多模态对话(在ChatGPT-3.5-turbo评测中达到 **93.89% GPT-4 质量**)。
## 🥳 🚀 更新
- (2023.05.18) 已支持[ImageBind](https://github.com/facebookresearch/ImageBind) 🎉🎉🎉。赶紧来体验根据音频生成视频的新工具: [Demo](https://igpt.opengvlab.com/)
- (2023.15.15) [model_zoo](https://huggingface.co/spaces/OpenGVLab/InternGPT/tree/main/model_zoo) 已经公开,里面包含了HuskyVQA! 赶紧在你自己的机器上部署试试吧!
- (2023.15.15) 我们的代码在 [Hugging Face](https://huggingface.co/spaces/OpenGVLab/InternGPT)也同步更新! 你可以复制一份仓库,然后使用自己的GPU运行demo。
## 🤖💬 在线Demo
**InternGPT** 上线了 (请访问: [https://igpt.opengvlab.com](https://igpt.opengvlab.com/)). 赶紧来体验吧!
[注意] 可能会出现排队等待较长时间。您可以clone我们的仓库并使用您自己的GPU运行。
### 🧭 Usage Tips
在图片上传成功后, 您可以发送如下消息与iGPT进行多模态相关的对话:`"what is it in the image?"` or `"what is the background color of image?"`.
您同样也可以交互式地操作、编辑或者生成图片,具体如下:
- 点击图片上的任意位置,然后按下 **`Pick`** 按钮,**预览分割区域**。您也可以按下 **`OCR`** 按钮,识别具体位置处存在的所有单词;
- 要在图像中 **删除掩码区域**,您可以发送如下消息:`“remove the maked region”`;
- 要在图像中 **替换掩码区域的物体为其他物体**,您可以发送如下消息:`“replace the maked region with {your prompt}”`;
- 想 **生成新图像**,您可以发送如下消息:`“generate a new image based on its segmentation describing {your prompt}”`;
- 想通过 **涂鸦创建新图像**,您应该按下 **`Whiteboard`** 按钮并在白板上绘制。绘制完成后,您需要按下 **`保存`** 按钮并发送如下消息:`“generate a new image based on this scribble decribing {your prompt}”`。
[**InternGPT** 已上线,尝试一下!](https://igpt.opengvlab.com)
https://github.com/OpenGVLab/InternGPT/assets/13723743/8fd9112f-57d9-4871-a369-4e1929aa2593
## 🗓️ 项目规划
- [ ] 支持中文
- [ ] 支持 MOSS
- [ ] 基于 InternImage 和 InternVideo 的更强大的基础模型
- [ ] 更准确的交互体验
- [ ] OpenMMLab Toolkit
- [ ] 网页 & 代码生成
- [ ] 支持搜索引擎
- [ ] 低成本部署
- [x] 支持[ImageBind](https://github.com/facebookresearch/ImageBind)
- [x] Agent响应验证
- [x] 提示词优化
- [x] 用户手册和视频demo
- [x] 支持语音助手
- [x] 支持点击交互
- [x] 交互式图像编辑
- [x] 交互式图像生成
- [x] 交互式视觉问答
- [x] Segment Anything模型
- [x] 图像修复
- [x] 图像描述
- [x] 图像抠图
- [x] 光学字符识别(OCR)
- [x] 动作识别
- [x] 视频描述
- [x] 视频密集描述
- [x] 视频高光时刻截取
## 🏠 系统概览

## 🎁 主要功能
A) 移除遮盖的对象

B) 交互式图像编辑

C) 图像生成

D) 交互式视觉问答

E) 交互式图像生成

F) 视频高光解说

## 🛠️ 安装
### 基本要求
- Linux
- Python 3.8+
- PyTorch 1.12+
- CUDA 11.6+
- GCC & G++ 5.4+
- GPU Memory > 17G 用于加载基本工具 (HuskyVQA, SegmentAnything, ImageOCRRecognition)
### 安装Python的依赖项
```shell
pip install -r requirements.txt
```
### 🗃 模型库
我们模型库 `model_zoo` 正式在[huggingface](https://huggingface.co/spaces/OpenGVLab/InternGPT/tree/main/model_zoo)公开!在运行我们的demo前,你需要先将`model_zoo`下载到本地,然后放进项目的根目录下面。
小彩蛋:HuskyVQA模型也在`model_zoo`里开源了!经我们测试,HuskyVQA的视觉问答能力达到了业界顶尖水平。更多细节请参考我们的[report](https://arxiv.org/pdf/2305.05662.pdf)。
## 👨🏫 运行指南
运行以下 shell 可启动一个 gradio 服务:
```shell
python -u app.py --load "HuskyVQA_cuda:0,SegmentAnything_cuda:0,ImageOCRRecognition_cuda:0" --port 3456
```
如果您想启用语音助手,请使用 openssl 生成证书:
```shell
mkdir certificate
openssl req -x509 -newkey rsa:4096 -keyout certificate/key.pem -out certificate/cert.pem -sha256 -days 365 -nodes
```
然后运行:
```shell
python -u app.py --load "HuskyVQA_cuda:0,SegmentAnything_cuda:0,ImageOCRRecognition_cuda:0" --port 3456 --https
```
## 🎫 许可
该项目根据[Apache 2.0 license](LICENSE)发布。
## 🖊️ 引用
如果您在研究中发现这个项目有用,请考虑引用我们的论文:
```BibTeX
@misc{2023interngpt,
title={InternGPT: Solving Vision-Centric Tasks by Interacting with ChatGPT Beyond Language},
author={Zhaoyang Liu and Yinan He and Wenhai Wang and Weiyun Wang and Yi Wang and Shoufa Chen and Qinglong Zhang and Yang Yang and Qingyun Li and Jiashuo Yu and Kunchang Li and Zhe Chen and Xue Yang and Xizhou Zhu and Yali Wang and Limin Wang and Ping Luo and Jifeng Dai and Yu Qiao},
howpublished = {\url{https://arxiv.org/abs/2305.05662}},
year={2023}
}
```
## 🤝 致谢
感谢以下开源项目:
[Hugging Face](https://github.com/huggingface)
[LangChain](https://github.com/hwchase17/langchain)
[TaskMatrix](https://github.com/microsoft/TaskMatrix)
[SAM](https://github.com/facebookresearch/segment-anything)
[Stable Diffusion](https://github.com/CompVis/stable-diffusion)
[ControlNet](https://github.com/lllyasviel/ControlNet)
[InstructPix2Pix](https://github.com/timothybrooks/instruct-pix2pix)
[BLIP](https://github.com/salesforce/BLIP)
[Latent Diffusion Models](https://github.com/CompVis/latent-diffusion)
[EasyOCR](https://github.com/JaidedAI/EasyOCR)
如果您在试用、运行、部署中有任何问题,欢迎加入我们的微信群讨论!如果您对项目有任何的想法和建议,欢迎加入我们的微信群讨论!
加入微信群组二维码:
