Commit 3ceb2dca authored by wanglch's avatar wanglch
Browse files

add README

parents
# DeepSeek-Janus-Pro
## 论文
`Janus-Series: Unified Multimodal Understanding and Generation Models`
* https://github.com/deepseek-ai/Janus/blob/main/janus_pro_tech_report.pdf
## 模型结构
是一个新颖的自回归框架,统一了多模态理解和生成。它通过将视觉编码解耦到单独的路径中,同时仍然利用单个统一的transformer架构进行处理,解决了以前方法的局限性。这种解耦不仅缓解了视觉编码器在理解和生成中的角色之间的冲突,而且增强了框架的灵活性。骏利超越了以前的统一模型,匹配或超过了特定任务模型的性能。Janus的简单性、高灵活性和有效性使其成为下一代统一多模式模型的有力候选。
![alt text](images/arch.png)
## 算法原理
Janus-Pro是之前工作Janus的高级版本。具体来说,Janus-Pro结合了(1)优化的训练策略(2)扩展的训练数据和(3)扩展到更大的模型尺寸。通过这些改进,Janus-Pro在多模态理解和文本到图像指令跟踪功能方面取得了重大进步,同时还增强了文本到图像生成的稳定性。
![alt text](images/theory.png)
## 环境配置
### Docker(方法一)
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.3.0-ubuntu22.04-dtk24.04.3-py3.10
docker run --shm-size 500g --network=host --name=dpskr1 --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash
cd ./code_path/
pip install -r requirements.txt
### Dockerfile(方法二)
docker build -t <IMAGE_NAME>:<TAG> .
docker run --shm-size 500g --network=host --name=dpskr1 --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash
cd ./code_path/
pip install -r requirements.txt
## 数据集
## 训练
## 推理
注意:修改模型路径及图片路径
### 文生图
```
python inference.py
```
## result
![alt text](images/result1.png)
### 图片问答
```
python generation_inference.py
```
## result
![alt text](images/result2.png)
### 精度
## 应用场景
### 算法类别
`文生图、图片问答`
### 热点应用行业
`电商,教育,广媒,政府`
## 预训练权重
[huggingface](https://hf-mirror.com/deepseek-ai/Janus-Pro-7B) | [SCNet高速下载通道](http://113.200.138.88:18080/aimodels/deepseek-ai/janus-pro-7b)
## 源码仓库及问题反馈
* https://developer.sourcefind.cn/codes/modelzoo/deepseek-janus-pro_pytorch
## 参考资料
* https://github.com/deepseek-ai/Janus
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment