# Color Splash Example
This is an example showing the use of Mask RCNN in a real application.
We train the model to detect balloons only, and then we use the generated
masks to keep balloons in color while changing the rest of the image to
grayscale.
[This blog post](https://engineering.matterport.com/splash-of-color-instance-segmentation-with-mask-r-cnn-and-tensorflow-7c761e238b46) describes this sample in more detail.
![Balloon Color Splash](/assets/balloon_color_splash.gif)
## Installation
From the [Releases page](https://github.com/matterport/Mask_RCNN/releases) page:
1. Download `mask_rcnn_balloon.h5`. Save it in the root directory of the repo (the `mask_rcnn` directory).
2. Download `balloon_dataset.zip`. Expand it such that it's in the path `mask_rcnn/datasets/balloon/`.
## Apply color splash using the provided weights
Apply splash effect on an image:
```bash
python3 balloon.py splash --weights=/path/to/mask_rcnn/mask_rcnn_balloon.h5 --image=<file name or URL>
```
Apply splash effect on a video. Requires OpenCV 3.2+:
```bash
python3 balloon.py splash --weights=/path/to/mask_rcnn/mask_rcnn_balloon.h5 --video=<file name or URL>
```
## Run Jupyter notebooks
Open the `inspect_balloon_data.ipynb` or `inspect_balloon_model.ipynb` Jupter notebooks. You can use these notebooks to explore the dataset and run through the detection pipelie step by step.
## Train the Balloon model
Train a new model starting from pre-trained COCO weights
```
python3 balloon.py train --dataset=/path/to/balloon/dataset --weights=coco
```
Resume training a model that you had trained earlier
```
python3 balloon.py train --dataset=/path/to/balloon/dataset --weights=last
```
Train a new model starting from ImageNet weights
```
python3 balloon.py train --dataset=/path/to/balloon/dataset --weights=imagenet
```
The code in `balloon.py` is set to train for 3K steps (30 epochs of 100 steps each), and using a batch size of 2.
Update the schedule to fit your needs.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于MASK-RCNN框架训练自己的数据与任务.zip (593个子文件)
setup.cfg 99B
训练自己的数据步骤.docx 13KB
mask_rcnn_coco.h5 245.63MB
mask_rcnn_shapes_0010.h5 170.9MB
workspace.ini 415B
vcs.ini 92B
encoding.ini 64B
codestyle.ini 62B
inspect_balloon_model.ipynb 9.99MB
inspect_model.ipynb 9.84MB
inspect_data.ipynb 7.84MB
inspect_balloon_data.ipynb 7.8MB
inspect_nucleus_model.ipynb 6.59MB
inspect_nucleus_data.ipynb 4.21MB
demo.ipynb 1.48MB
inspect_weights.ipynb 1.21MB
train_shapes.ipynb 99KB
9.jpg 32KB
9.jpg 32KB
23.jpg 31KB
19.jpg 30KB
45.jpg 29KB
35.jpg 29KB
37.jpg 28KB
34.jpg 28KB
44.jpg 28KB
49.jpg 28KB
39.jpg 28KB
36.jpg 28KB
31.jpg 28KB
41.jpg 28KB
30.jpg 27KB
26.jpg 27KB
43.jpg 27KB
50.jpg 27KB
20.jpg 27KB
22.jpg 27KB
42.jpg 27KB
32.jpg 27KB
16.jpg 27KB
16.jpg 27KB
40.jpg 27KB
21.jpg 27KB
38.jpg 26KB
27.jpg 26KB
33.jpg 26KB
25.jpg 26KB
17.jpg 26KB
17.jpg 26KB
48.jpg 26KB
47.jpg 26KB
51.jpg 26KB
46.jpg 26KB
52.jpg 26KB
7.jpg 26KB
7.jpg 26KB
12.jpg 26KB
12.jpg 26KB
18.jpg 25KB
18.jpg 25KB
13.jpg 25KB
2.jpg 25KB
2.jpg 25KB
10.jpg 25KB
10.jpg 25KB
10.jpg 25KB
1.jpg 25KB
1.jpg 25KB
1.jpg 25KB
24.jpg 25KB
56.jpg 24KB
28.jpg 24KB
29.jpg 24KB
53.jpg 24KB
6.jpg 24KB
6.jpg 24KB
4.jpg 23KB
4.jpg 23KB
11.jpg 23KB
11.jpg 23KB
15.jpg 23KB
15.jpg 23KB
54.jpg 23KB
5.jpg 22KB
5.jpg 22KB
55.jpg 22KB
14.jpg 22KB
14.jpg 22KB
8.jpg 22KB
8.jpg 22KB
3.jpg 22KB
3.jpg 22KB
9.json 44KB
23.json 42KB
19.json 41KB
45.json 40KB
35.json 39KB
37.json 38KB
34.json 38KB
44.json 38KB
共 593 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
机器学习杨卓越
- 粉丝: 2161
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功