Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
a123456jy
DeepMosaics
提交
341dbbf2
DeepMosaics
项目概览
a123456jy
/
DeepMosaics
与 Fork 源项目一致
Fork自
Hypo / DeepMosaics
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DeepMosaics
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
341dbbf2
编写于
8月 26, 2019
作者:
H
hypox64
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more example
上级
27fffdb4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
3 deletion
+27
-3
README.md
README.md
+12
-0
README_CN.md
README_CN.md
+13
-1
util/ffmpeg.py
util/ffmpeg.py
+2
-2
未找到文件。
README.md
浏览文件 @
341dbbf2
...
...
@@ -4,6 +4,17 @@ You can use it to automatically remove the mosaics in images and videos, or add
This porject based on ‘semantic segmentation’ and ‘Image-to-Image Translation’.
<br>
*
[
中文版
](
./README_CN.md
)
<br>
### More example
origin | auto add mosaic | auto clean mosaic
:-:|:-:|:-:
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/lena.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/lena_add.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/lena_clean.jpg
)
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/youknow.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/youknow_add.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/youknow_clean.png
)
*
Compared with
[
DeepCreamPy
](
https://github.com/deeppomf/DeepCreamPy
)
mosaic image | DeepCreamPy | ours
:-:|:-:|:-:
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_a_mosaic.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/a_dcp.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_a_clean.jpg
)
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_b_mosaic.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/b_dcp.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_b_clean.jpg
)
## Notice
The code do not include the part of training, I will finish it in my free time.
<br>
...
...
@@ -21,6 +32,7 @@ Attentions:<br>
-
Different pre-trained models are suitable for different effects.
<br>
-
Run time depends on computer performance.
<br>
-
If output video cannot be played, you can try with
[
potplayer
](
https://daumpotplayer.com/download/
)
.
-
GUI version update slower than source.
### Run from source
#### Prerequisites
...
...
README_CN.md
浏览文件 @
341dbbf2
...
...
@@ -2,6 +2,17 @@
# <img src="./imgs/icon.jpg" width="48">DeepMosaics
这是一个通过深度学习自动的为图片/视频添加马赛克,或消除马赛克的项目.
<br>
它基于“语义分割”以及“图像翻译”.
<br>
### 更多例子
原始 | 自动打码 | 自动去码
:-:|:-:|:-:
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/lena.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/lena_add.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/lena_clean.jpg
)
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/youknow.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/youknow_add.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/youknow_clean.png
)
*
与
[
DeepCreamPy
](
https://github.com/deeppomf/DeepCreamPy
)
相比较
马赛克图片 | DeepCreamPy | ours
:-:|:-:|:-:
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_a_mosaic.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/a_dcp.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_a_clean.jpg
)
![
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_b_mosaic.jpg
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/b_dcp.png
)
| !
[
image
](
https://github.com/HypoX64/DeepMosaics_example/blob/master/face_b_clean.jpg
)
## 一些说明
代码暂不包含训练部分,训练方法我将在空闲时间给出.
<br>
现在,代码已经支持基于
[
pix2pixHD
](
https://github.com/NVIDIA/pix2pixHD
)
训练出的模型,但网络仍在训练中,这将使得输出结果看起来更加清晰,"真实".
<br>
...
...
@@ -19,7 +30,8 @@
-
程序的运行要求在64位Windows操作系统,我仅在Windows10运行过,其他版本暂未经过测试
<br>
-
请根据需求选择合适的预训练模型进行测试
<br>
-
运行时间取决于电脑性能,对于视频文件,我们建议可以先使用截图进行测试.
<br>
-
如果输出的视频无法播放,这边建议您尝试
[
potplayer
](
https://daumpotplayer.com/download/
)
.
-
如果输出的视频无法播放,这边建议您尝试
[
potplayer
](
https://daumpotplayer.com/download/
)
.
<br>
-
相比于源码,该版本的更新将会延后.
### 通过源代码运行
#### 前提要求
...
...
util/ffmpeg.py
浏览文件 @
341dbbf2
...
...
@@ -4,12 +4,12 @@ def video2image(videopath,imagepath):
os
.
system
(
'ffmpeg -i "'
+
videopath
+
'" -f image2 '
+
imagepath
)
def
video2voice
(
videopath
,
voicepath
):
os
.
system
(
'ffmpeg -i
'
+
videopath
+
'
-f mp3 '
+
voicepath
)
os
.
system
(
'ffmpeg -i
"'
+
videopath
+
'"
-f mp3 '
+
voicepath
)
def
image2video
(
fps
,
imagepath
,
voicepath
,
videopath
):
os
.
system
(
'ffmpeg -y -r '
+
str
(
fps
)
+
' -i '
+
imagepath
+
' -vcodec libx264 '
+
'./tmp/video_tmp.mp4'
)
#os.system('ffmpeg -f image2 -i '+imagepath+' -vcodec libx264 -r '+str(fps)+' ./tmp/video_tmp.mp4')
os
.
system
(
'ffmpeg -i ./tmp/video_tmp.mp4 -i
'
+
voicepath
+
'
-vcodec copy -acodec copy '
+
videopath
)
os
.
system
(
'ffmpeg -i ./tmp/video_tmp.mp4 -i
"'
+
voicepath
+
'"
-vcodec copy -acodec copy '
+
videopath
)
def
get_video_infos
(
videopath
):
cmd_str
=
'ffprobe -v quiet -print_format json -show_format -show_streams -i "'
+
videopath
+
'"'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录