diff --git a/README.md b/README.md index 0aa37c9b8719993da38795058f571d23175a3838..601f8380ee1b8fd7794292fc25a5324e65f01e3b 100755 --- a/README.md +++ b/README.md @@ -6,19 +6,25 @@ This porject based on "semantic segmentation" and "Image-to-Image Translation".< * [中文版README](./README_CN.md)
### 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 diff --git a/README_CN.md b/README_CN.md index d9f9c4c45005be129181ad7444ad34103c4b27ed..94a2e50d2cd67fce6c5eea82123169231cc0bd88 100644 --- a/README_CN.md +++ b/README_CN.md @@ -3,19 +3,25 @@ 这是一个通过深度学习自动的为图片/视频添加马赛克,或消除马赛克的项目.
它基于“语义分割”以及“图像翻译”.
### 更多例子 + 原始 | 自动打码 | 自动去码 :-:|:-:|:-: ![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) ## 如何运行 diff --git a/docs/exe_help.md b/docs/exe_help.md index 1b5bc09f8cbcd57b76b99d1ba8fd1be9d6a7d97a..3f9f2428051ebaca9209937f206491fb64e78cef 100644 --- a/docs/exe_help.md +++ b/docs/exe_help.md @@ -17,6 +17,7 @@ Attentions:
### Introduction to pre-trained models * Mosaic + | Name | Description | | :------------------------------: | :---------------------------------------------------------: | | add_face.pth | Add mosaic to all faces in images/videos. | @@ -27,6 +28,7 @@ Attentions:
| clean_youknow_video_HD.pth | Clean mosaic to all (FBI Warning) in videos.
(RAM > 8GB) | * Style Transfer + | Name | Description | | :---------------------: | :-------------------------------------------------------: | | style_apple2orange.pth | Convert apples to oranges. | @@ -55,6 +57,7 @@ Attentions:
### 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 diff --git a/docs/exe_help_CN.md b/docs/exe_help_CN.md index 69624d48f2f1a5386f5567e49d0845386696656a..a160c724cb9d0555b0f2dd1499ff2dc96b33c062 100644 --- a/docs/exe_help_CN.md +++ b/docs/exe_help_CN.md @@ -18,6 +18,7 @@ 当前的预训练模型分为两类——添加/移除马赛克以及风格转换. * 马赛克 + | 文件名 | 描述 | | :------------------------------: | :-------------------------------------------: | | add_face.pth | 对图片或视频中的脸部打码 | @@ -28,6 +29,7 @@ | clean_youknow_video_HD.pth | 对视频中的十八禁内容去码
(要求内存 > 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 diff --git a/docs/options_introduction.md b/docs/options_introduction.md index c8cfa66885445c9f12ce0fd204d7c25b58264304..410d136937dc94188c8cad1de5cc0c915212110e 100644 --- a/docs/options_introduction.md +++ b/docs/options_introduction.md @@ -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 diff --git a/docs/options_introduction_CN.md b/docs/options_introduction_CN.md index f40f4884ea7ac79419215e47a60c5a72690eeb76..b71e0790c21fb739d635532544bbb46cea505d45 100644 --- a/docs/options_introduction_CN.md +++ b/docs/options_introduction_CN.md @@ -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 diff --git a/docs/pre-trained_models_introduction.md b/docs/pre-trained_models_introduction.md index a74355dab7f2343eed5402c3d8dbac399d056899..042857365b50c77b6c749b906591c65bdbf4955d 100644 --- a/docs/pre-trained_models_introduction.md +++ b/docs/pre-trained_models_introduction.md @@ -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)
### 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.
(RAM > 8GB) | ### Style Transfer + | Name | Description | | :---------------------: | :-------------------------------------------------------: | | style_apple2orange.pth | Convert apples to oranges. | diff --git a/docs/pre-trained_models_introduction_CN.md b/docs/pre-trained_models_introduction_CN.md index 95162d827fb5d8890f0a82670f5589bdc3b546c7..fa60d1ea07464241d29fd8732ce53b398839f8e7 100644 --- a/docs/pre-trained_models_introduction_CN.md +++ b/docs/pre-trained_models_introduction_CN.md @@ -3,6 +3,7 @@ 可以通过以下方式下载预训练模型 [[Google Drive]](https://drive.google.com/open?id=1LTERcN33McoiztYEwBxMuRjjgxh4DEPs) [[百度云,提取码1x0a]](https://pan.baidu.com/s/10rN3U3zd5TmfGpO_PEShqQ)
### 马赛克 + | 文件名 | 描述 | | :------------------------------: | :-------------------------------------------: | | add_face.pth | 对图片或视频中的脸部打码 | @@ -13,6 +14,7 @@ | clean_youknow_video_HD.pth | 对视频中的十八禁内容去码
(要求内存 > 8GB) | ### 风格转换 + | 文件名 | 描述 | | :---------------------: | :-------------------------------------------------------: | | style_apple2orange.pth | 苹果变橙子 |