Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tutorials]城市街景分割数据集下使用对抗网络Pix2Pix根据掩码生成街景 #5439

Merged
merged 34 commits into from
Jan 18, 2023

Conversation

Liyulingyue
Copy link
Contributor

Add an example with Pix2Pix and Cityscapes

@paddle-bot
Copy link

paddle-bot bot commented Nov 22, 2022

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5439.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:[Beta]飞桨文档预览工具

"\n",
"## 1. 简要介绍\n",
"### 关于城市街景分割数据集下使用对抗网络Pix2Pix根据掩码生成街景\n",
"本项目的目标是,根据分割的伪色彩图生成对应的街道场景。\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以加一下展示效果图方便用户理解,类似 左 分割lable图像 右 生成街景

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solved

"outputs": [],
"source": [
"! wget https://paddleseg.bj.bcebos.com/dataset/cityscapes.tar\n",
"! tar -xf cityscapes.tar"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

! tar -xf cityscapes.tar 运行报错,改为 ! tar -xvf cityscapes.tar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aistudio运行无报错,麻烦请再确认一下。

},
"outputs": [],
"source": [
"! wget https://paddleseg.bj.bcebos.com/dataset/cityscapes.tar\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下载数据集后只有分割图像,没有城市场景图像

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

城市场景图像在cityscapes/leftImg8bit,分割在cityscapes/gtFine

Copy link
Collaborator

@momozi1996 momozi1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

经RD确认:

1、网络结构没问题
2、代码质量,无错误,无冗余,整体看起来整洁
3、运行无报错,一个训练完了可以达到图例效果,一个训练一半,看loss是收敛的
4、能否达到上线“官网-》文档-〉应用实践”的标准:这两个实例代码比较简单,但整体质量还可以,感觉可以合入

Copy link
Collaborator

@momozi1996 momozi1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • https://ai-studio-static-online.cdn.bcebos.com/0312d38398f5453f928b12b14bf794d9513a2bd554874c57890cda0cc3caa2e9,引用的这个图片,可以放到这个目录下面,维护起来。
  • 关于GAN的简介部分,可以引用相关的论文,或其他的介绍。第一次在文中出现这样的专业词汇,至少要给出其全称是什么。(GAN、G、D).
  • 关于Paddle的梯度反馈,这部分要写的更详细一些,如,自动累加模式,要给第一次了解这个概念的人讲清楚。另外这里的backword是typo。
  • 致谢部分挪到最后吧。
  • **什么?上面没看懂?不重要!往下看就行了!锐利的loss!锐利的更新!永远的两步走!** ,Tutorial就直接讲解就好了,不太需要类似这样浮夸的语言。
  • 用到一些术语的时候,注意一下大小写,如PaddleSeg,而不是paddleseg。
  • 展示运行结果的时候,要设置正确的环境,输出的结果里不能有WARNING。

整体上,文字讲解,太过于口语化,严谨程度不够,尚未达到上线官网的质量。

@Liyulingyue
Copy link
Contributor Author

  • https://ai-studio-static-online.cdn.bcebos.com/0312d38398f5453f928b12b14bf794d9513a2bd554874c57890cda0cc3caa2e9,引用的这个图片,可以放到这个目录下面,维护起来。
  • 关于GAN的简介部分,可以引用相关的论文,或其他的介绍。第一次在文中出现这样的专业词汇,至少要给出其全称是什么。(GAN、G、D).
  • 关于Paddle的梯度反馈,这部分要写的更详细一些,如,自动累加模式,要给第一次了解这个概念的人讲清楚。另外这里的backword是typo。
  • 致谢部分挪到最后吧。
  • **什么?上面没看懂?不重要!往下看就行了!锐利的loss!锐利的更新!永远的两步走!** ,Tutorial就直接讲解就好了,不太需要类似这样浮夸的语言。
  • 用到一些术语的时候,注意一下大小写,如PaddleSeg,而不是paddleseg。
  • 展示运行结果的时候,要设置正确的环境,输出的结果里不能有WARNING。

整体上,文字讲解,太过于口语化,严谨程度不够,尚未达到上线官网的质量。

更新了文档表述,图片已经上传。直接更新图片链接会在合入后无法访问,暂时没有在链接中更新。

@momozi1996
Copy link
Collaborator

@wangna11BD wangna11BD 请RD协助再re一下代码质量,用户重新修改了

@wangna11BD
Copy link
Contributor

LGTM

@momozi1996
Copy link
Collaborator

  1. 环境设置,补充paddle的版本, print(paddle.version)

  2. 模型组网,删除“从项目Pixel2Pixel:人像卡通化复制一份代码过来~” 的字段 ,这里附加一下,组网的说明,比如Unet模型网络结构、参数设置等;

  3. 模型训练:“建议没啥事的时候再训练,或者开启程序后自己做一些别的工作。大约需要6个小时以上。”
    这个语句改正,“”训练时间较长,大约需要6小时以上。“
    补充:参数设置的描述,包括分类器,step, loss, 梯度grad设置等,这些更重要。

建议,文字部分,主要描述任务、网络、参数设置等基本说明,其余口语用词可以删除。

@sunzhongkai588
Copy link
Collaborator

sunzhongkai588 commented Jan 11, 2023

  1. paddleseg注意一下大小写,改成PaddleSeg

  2. 模型训练那块儿也写下涉及到的 损失函数

  3. 模型预测那块儿的文字,可以去掉“啦~”之类的口语化文字。tutorial是面向所有开发者的,文字需要严谨~

@jzhang533
Copy link
Collaborator

  • 本项目的目标是,根据分割的伪色彩图生成对应的街道场景。以下图为例,右边是城市接到拍摄图片,左边是分割图片,本项目的目标是根据左图生成右图。
    这句话,请再校对一下。
  • 关于Paddle的梯度反馈
    review 意见同 Add an example with GAN and MINIST #5426
  • Unet 全文统一用 UNet吧。
  • 不需要30个epoch的图片可视化出来,减少到5个就可以了。

@sunzhongkai588
Copy link
Collaborator

sunzhongkai588 commented Jan 12, 2023

  1. 如下图,步骤序号存在问题。另外,可以简短补充关于D为什么接近于1/2,如“D由于难以判定G生成的图片而导致误判率趋近于1/2”
    image

  2. 可以考虑是否要对 mask的定义 做补充 ,可能有人不知道图像分割里的mask是什么
    image

@Liyulingyue
Copy link
Contributor Author

  • 本项目的目标是,根据分割的伪色彩图生成对应的街道场景。以下图为例,右边是城市接到拍摄图片,左边是分割图片,本项目的目标是根据左图生成右图。
    这句话,请再校对一下。
  • 关于Paddle的梯度反馈
    review 意见同 Add an example with GAN and MINIST #5426
  • Unet 全文统一用 UNet吧。
  • 不需要30个epoch的图片可视化出来,减少到5个就可以了。
  1. 如下图,步骤序号存在问题。另外,可以简短补充关于D为什么接近于1/2,如“D由于难以判定G生成的图片而导致误判率趋近于1/2”
    image
  2. 可以考虑是否要对 mask的定义 做补充 ,可能有人不知道图像分割里的mask是什么
    image

changed

@sunzhongkai588
Copy link
Collaborator

sunzhongkai588 commented Jan 17, 2023

  1. 是 根据左图生成右图

image

  1. 错别字,是反向传播。 请写安利的时候注意规范~

image

@jzhang533 jzhang533 merged commit e086765 into PaddlePaddle:develop Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants