提交 700c1859 编写于 作者: H HypoX64

Update README.md

上级 84698ad8
......@@ -6,19 +6,25 @@ This porject based on "semantic segmentation" and "Image-to-Image Translation".<
* [中文版README](./README_CN.md)<br>
### More example
origin | auto add mosaic | auto clean mosaic
:-:|:-:|:-:
![image](./imgs/example/lena.jpg) | ![image](./imgs/example/lena_add.jpg) | ![image](./imgs/example/lena_clean.jpg)
![image](./imgs/example/youknow.png) | ![image](./imgs/example/youknow_add.png) | ![image](./imgs/example/youknow_clean.png)
* Compared with [DeepCreamPy](https://github.com/deeppomf/DeepCreamPy)
mosaic image | DeepCreamPy | ours
:-:|:-:|:-:
![image](./imgs/example/face_a_mosaic.jpg) | ![image](./imgs/example/a_dcp.png) | ![image](./imgs/example/face_a_clean.jpg)
![image](./imgs/example/face_b_mosaic.jpg) | ![image](./imgs/example/b_dcp.png) | ![image](./imgs/example/face_b_clean.jpg)
* Style Transfer
origin | to Van Gogh | to winter
:-:|:-:|:-:
![image](./imgs/example/SZU.jpg) | ![image](./imgs/example/SZU_vangogh.jpg) | ![image](./imgs/example/SZU_summer2winter.jpg)
An interesting example:[Ricardo Milos to cat](https://www.bilibili.com/video/BV1Q7411W7n6)
## Run DeepMosaics
......
......@@ -3,19 +3,25 @@
这是一个通过深度学习自动的为图片/视频添加马赛克,或消除马赛克的项目.<br>它基于“语义分割”以及“图像翻译”.<br>
### 更多例子
原始 | 自动打码 | 自动去码
:-:|:-:|:-:
![image](./imgs/example/lena.jpg) | ![image](./imgs/example/lena_add.jpg) | ![image](./imgs/example/lena_clean.jpg)
![image](./imgs/example/youknow.png) | ![image](./imgs/example/youknow_add.png) | ![image](./imgs/example/youknow_clean.png)
*[DeepCreamPy](https://github.com/deeppomf/DeepCreamPy)相比较
马赛克图片 | DeepCreamPy | ours
:-:|:-:|:-:
![image](./imgs/example/face_a_mosaic.jpg) | ![image](./imgs/example/a_dcp.png) | ![image](./imgs/example/face_a_clean.jpg)
![image](./imgs/example/face_b_mosaic.jpg) | ![image](./imgs/example/b_dcp.png) | ![image](./imgs/example/face_b_clean.jpg)
* 风格转换
原始 | 梵高风格 | 转化为冬天
:-:|:-:|:-:
![image](./imgs/example/SZU.jpg) | ![image](./imgs/example/SZU_vangogh.jpg) | ![image](./imgs/example/SZU_summer2winter.jpg)
一个有意思的尝试:[香蕉君♂猫](https://www.bilibili.com/video/BV1Q7411W7n6)
## 如何运行
......
......@@ -17,6 +17,7 @@ Attentions:<br>
### Introduction to pre-trained models
* Mosaic
| Name | Description |
| :------------------------------: | :---------------------------------------------------------: |
| add_face.pth | Add mosaic to all faces in images/videos. |
......@@ -27,6 +28,7 @@ Attentions:<br>
| clean_youknow_video_HD.pth | Clean mosaic to all (FBI Warning) in videos.<br>(RAM > 8GB) |
* Style Transfer
| Name | Description |
| :---------------------: | :-------------------------------------------------------: |
| style_apple2orange.pth | Convert apples to oranges. |
......@@ -55,6 +57,7 @@ Attentions:<br>
### Introduction to options
If you need more effects, use '--option your-parameters' to enter what you need.
* Base
| Option | Description | Default |
| :----------: | :----------------------------------------: | :-------------------------------------: |
| --use_gpu | if -1, do not use gpu | 0 |
......@@ -65,6 +68,7 @@ If you need more effects, use '--option your-parameters' to enter what you need
| --fps | read and output fps, if 0-> origin | 0 |
* AddMosaic
| Option | Description | Default |
| :--------------: | :----------------------------------------------------------: | :------: |
| --mosaic_mod | type of mosaic -> squa_avg/ squa_random/ squa_avg_circle_edge/ rect_avg/random | squa_avg |
......@@ -73,6 +77,7 @@ If you need more effects, use '--option your-parameters' to enter what you need
| --mask_threshold | threshold of recognize mosaic position 0~255 | 64 |
* CleanMosaic
| Option | Description | Default |
| :-----------: | :----------------------------------------------------------: | :-----: |
| --traditional | if specified, use traditional image processing methods to clean mosaic | |
......@@ -81,6 +86,7 @@ If you need more effects, use '--option your-parameters' to enter what you need
| --medfilt_num | medfilt window of mosaic movement in the video | 11 |
* Style Transfer
| Option | Description | Default |
| :-----------: | :----------------------------------: | :-----: |
| --output_size | size of output media, if 0 -> origin | 512 |
\ No newline at end of file
......@@ -18,6 +18,7 @@
当前的预训练模型分为两类——添加/移除马赛克以及风格转换.
* 马赛克
| 文件名 | 描述 |
| :------------------------------: | :-------------------------------------------: |
| add_face.pth | 对图片或视频中的脸部打码 |
......@@ -28,6 +29,7 @@
| clean_youknow_video_HD.pth | 对视频中的十八禁内容去码<br>(要求内存 > 8GB) |
* 风格转换
| 文件名 | 描述 |
| :---------------------: | :-------------------------------------------------------: |
| style_apple2orange.pth | 苹果变橙子 |
......@@ -57,6 +59,7 @@
### 参数说明
如果需要更多的效果, 请按照 '--option your-parameters' 输入所需要的参数
* 基本
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --use_gpu | if -1, do not use gpu | 0 |
......@@ -66,20 +69,25 @@
| --result_dir | 保存路径 | ./result |
| --fps | 限制视频输出的fps,0则为默认 | 0 |
* 添加马赛克
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --mosaic_mod | 马赛克类型 -> squa_avg/ squa_random/ squa_avg_circle_edge/ rect_avg/random | squa_avg |
| --mosaic_size | 马赛克大小,0则为自动 | 0 |
| --mask_extend | 拓展马赛克区域 | 10 |
| --mask_threshold | 马赛克区域识别阈值 0~255 | 64 |
* 去除马赛克
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --traditional | 如果输入这个参数则使用传统方法清除马赛克 | |
| --tr_blur | 传统方法模糊尺寸 | 10 |
| --tr_down | 传统方法下采样尺寸 | 10 |
| --medfilt_num | medfilt window of mosaic movement in the video | 11 |
* 风格转换
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --output_size | 输出媒体的尺寸,如果是0则为原始尺寸 |512|
\ No newline at end of file
......@@ -2,6 +2,7 @@
If you need more effects, use '--option your-parameters' to enter what you need.
### Base
| Option | Description | Default |
| :----------: | :------------------------: | :-------------------------------------: |
| --use_gpu | if -1, do not use gpu | 0 |
......@@ -12,6 +13,7 @@ If you need more effects, use '--option your-parameters' to enter what you need
| --fps | read and output fps, if 0-> origin | 0 |
### AddMosaic
| Option | Description | Default |
| :----------: | :------------------------: | :-------------------------------------: |
| --mosaic_mod | type of mosaic -> squa_avg/ squa_random/ squa_avg_circle_edge/ rect_avg/random | squa_avg |
......@@ -20,6 +22,7 @@ If you need more effects, use '--option your-parameters' to enter what you need
| --mask_threshold | threshold of recognize mosaic position 0~255 | 64 |
### CleanMosaic
| Option | Description | Default |
| :----------: | :------------------------: | :-------------------------------------: |
| --traditional | if specified, use traditional image processing methods to clean mosaic | |
......@@ -28,6 +31,7 @@ If you need more effects, use '--option your-parameters' to enter what you need
| --medfilt_num | medfilt window of mosaic movement in the video | 11 |
### Style Transfer
| Option | Description | Default |
| :----------: | :------------------------: | :-------------------------------------: |
| --output_size | size of output media, if 0 -> origin |512|
\ No newline at end of file
......@@ -2,6 +2,7 @@
如果需要更多的效果, 请按照 '--option your-parameters' 输入所需要的参数
### 基本
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --use_gpu | if -1, do not use gpu | 0 |
......@@ -12,6 +13,7 @@
| --fps | 限制视频输出的fps,0则为默认 | 0 |
### 添加马赛克
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --mosaic_mod | 马赛克类型 -> squa_avg/ squa_random/ squa_avg_circle_edge/ rect_avg/random | squa_avg |
......@@ -20,6 +22,7 @@
| --mask_threshold | 马赛克区域识别阈值 0~255 | 64 |
### 去除马赛克
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --traditional | 如果输入这个参数则使用传统方法清除马赛克 | |
......@@ -28,6 +31,7 @@
| --medfilt_num | medfilt window of mosaic movement in the video | 11 |
### 风格转换
| 选项 | 描述 | 默认 |
| :----------: | :------------------------: | :-------------------------------------: |
| --output_size | 输出媒体的尺寸,如果是0则为原始尺寸 |512|
\ No newline at end of file
......@@ -3,6 +3,7 @@ The current pre-trained models are divided into two categories(Add/Clean mosaic
Download pre-trained model via [[Google Drive]](https://drive.google.com/open?id=1LTERcN33McoiztYEwBxMuRjjgxh4DEPs) [[百度云,提取码1x0a]](https://pan.baidu.com/s/10rN3U3zd5TmfGpO_PEShqQ) <br>
### Mosaic
| Name | Description |
| :------------------------------: | :---------------------------------------------------------: |
| add_face.pth | Add mosaic to all faces in images/videos. |
......@@ -13,6 +14,7 @@ Download pre-trained model via [[Google Drive]](https://drive.google.com/open?i
| clean_youknow_video_HD.pth | Clean mosaic to all (FBI Warning) in videos.<br>(RAM > 8GB) |
### Style Transfer
| Name | Description |
| :---------------------: | :-------------------------------------------------------: |
| style_apple2orange.pth | Convert apples to oranges. |
......
......@@ -3,6 +3,7 @@
可以通过以下方式下载预训练模型 [[Google Drive]](https://drive.google.com/open?id=1LTERcN33McoiztYEwBxMuRjjgxh4DEPs) [[百度云,提取码1x0a]](https://pan.baidu.com/s/10rN3U3zd5TmfGpO_PEShqQ) <br>
### 马赛克
| 文件名 | 描述 |
| :------------------------------: | :-------------------------------------------: |
| add_face.pth | 对图片或视频中的脸部打码 |
......@@ -13,6 +14,7 @@
| clean_youknow_video_HD.pth | 对视频中的十八禁内容去码<br>(要求内存 > 8GB) |
### 风格转换
| 文件名 | 描述 |
| :---------------------: | :-------------------------------------------------------: |
| style_apple2orange.pth | 苹果变橙子 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册