# yolo-diffusion
[![collab sticker](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/jermwatt/yolo_diffusion/blob/main/object_diffusion_demo.ipynb)
A simple demo for quick experimentation with [Stable Diffusion 2.0](https://huggingface.co/stabilityai/stable-diffusion-2-inpainting) applied to specific objects in 2d images, detected and segmented via [YOLOv8](https://docs.ultralytics.com/).
You can get started in [collab now](https://colab.research.google.com/github/jermwatt/yolo_diffusion/blob/main/object_diffusion_demo.ipynb) - or watch the walkthrough videos below first.
## Overview
With this simple demo you can start with any image - like the one on the left below.
You can then select any object in the image - like the `pizza`. YOLO will detect and segment this object, and then you can replace it with a diffused suggestion via Stable v2.0.
![cat cash](https://github.com/jermwatt/yolo-diffusion/blob/main/test_data/cat_cash.png?raw=true)
Like "a pile of cash" - shown on the right.
You can take the same image and do the same thing with another object - like the `cat` - as shown below.
![squirrel pizza](https://github.com/jermwatt/yolo-diffusion/blob/main/test_data/squirrel_pizza.png?raw=true)
Here we used the prompt "'sinister looking cartoon squirrel wearing sunglasses, high resolution'".
Here's another example. In this case we replace the `person` with 'an ape, smiling, high resolution, holding something"
![squirrel pizza](https://github.com/jermwatt/yolo-diffusion/blob/main/test_data/example_person_replacement.png?raw=true)
YOLOv8 has more than 70 pre-trained objects that can be quickly detected / segmented, then fed to Stable Diffusion. See the [demo notebook](https://colab.research.google.com/github/jermwatt/yolo-diffusion/blob/main/object_diffusion_demo.ipynb#scrollTo=8GhUUsG2tdZ1) for a complete list of available objects.
没有合适的资源?快使用搜索试试~ 我知道了~
yolo算法 - 目标识别算法
共14个文件
png:6个
py:5个
ipynb:1个
需积分: 5 0 下载量 11 浏览量
2024-11-05
13:21:40
上传
评论
收藏 2.29MB RAR 举报
温馨提示
yolo
资源推荐
资源详情
资源评论
收起资源包目录
yolo.rar (14个子文件)
yolo
setup.py 0B
diffuser.py 2KB
main.py 2KB
utilities.py 1KB
LICENSE 11KB
test_data
monkey_donut.png 162KB
cat_cash.png 225KB
squirrel_pizza.png 224KB
example_donut_replacement.png 608KB
person_apple.png 159KB
example_person_replacement.png 982KB
segmenter.py 9KB
object_diffusion_demo.ipynb 14KB
README.md 2KB
共 14 条
- 1
资源评论
电科_银尘
- 粉丝: 1w+
- 资源: 163
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功