为微软samples-for-ai贡献代码是种怎么样的体验?
推送原文链接:传送门
还记得微软神器samples-for-ai吗?它可不仅仅可以用来安装框架,它其实是个开源的AI样例库,以Visual Stdio工程形式包装,会为微软用户学习开发AI应用带来不小的帮助。现在,Someday及其小伙伴们的代码已经被sameples-for-ai采用!我们是github上首个用Keras框架实现Progressive Growing of GANs模型的项目。该模型出自NVIDIA的研究,原论文将在ICLR 2018上发表,是目前世界上最先进的对抗生成网络模型之一。
samples-for-ai项目目前正处在收尾阶段,样例近期还会继续扩充~
Keras-progressive_growing_of_gans项目的代码的主要贡献者为:naykun、Somedaywilldo、Leext、参与者还有WJQ、WJJ。(Somedaywilldo当然是Someday的github ID了)
二话不说,先上项目地址~
微软samples-for-ai项目地址:
https://github.com/Microsoft/samples-for-ai
其中我们的贡献位于examples/keras/Progressive growing of GANs:
下面是我们的项目原地址(大本营):
https://github.com/Somedaywilldo/Keras-progressive_growing_of_gans
(求github小星星,能为大本营和samples-for-ai各点一颗就更好了嘻嘻~)
附上我们的README,README出自Someday之手,可能是目前为止Someday写的最正式的一次README:
Keras-progressive_growing_of_gans
Introduction
Keras implementation of Progressive Growing of GANs for Improved Quality, Stability, and Variation.
Developed by BUAA Microsoft Student Club.
Leader developers: Kun Yan, Yihang Yin, Xutong Li
Developers: Jiaqi Wang, Junjie Wu
Requirements
Python3
keras 2.1.2 (TensorFlow backend)
How to run
1. Clone the repository
2. Prepare the dataset
First download CelebA Dataset.
Run h5tool.py to create HDF5 format datatset. Default settings of h5tool.py will crop the picture to 128*128, and create a channel-last h5 file.
$ python3 h5tool.py create_celeba_channel_last <h5 file name> <CelebA directory>
Modify config.py to your own settings.
# In config.py:
data_dir = 'datasets'
result_dir = 'results'
dataset = dict(h5_path=<h5 file name>, resolution=128, max_labels=0, mirror_augment=True)
# Note: "data_dir" should be set to the direcory of your h5 file.
We only support CelebA dataset for now, you may need to modify the code in dataset.py and h5tools.py if you want to switch to another dataset.
3. Begin training!
$ python3 train.py
In train.py:
# In train.py:
speed_factor = 20
# set it to 1 if you don't need it.
"speed_factor" parameter will speed up the transition procedure of progressive growing of gans(switch resolution), at the price of reducing images' vividness, this parameter is aimed for speed up the validation progress in our development, however it is useful to see the progressive growing procedure more quickly, set it to "1" if you don't need it.
So far, if your settings have no problem, you should see running information like our running_log_example
4. Save and resume training weights
Parameters in train.py will determine the frequency of saving the training result snapshot. And if you want to resume a previous result, just modify train.py:
# In train.py:
image_grid_type = 'default',
# modify this line bellow
# resume_network = None,
# to:
resume_network = <weights snapshot directory>,
resume_kimg = <previous trained images in thousands>,
5. Using main.py (optional)
We provide main.py for remote training for Visual Stdio or Visual Stdio Code users. So you can directely start the training process using command line, which will be convenient in remote job submission.
$ python3 main.py --data_dir = <dataset h5 file directory> \
--resume_dir = <weights snapshot directory> \
--resume_kimg = <previous trained images in thousands>
Contact us
Any bug report or advice, please contact us:
Kun Yan (naykun) : yankun1138283845@foxmail.com
Yihang Yin (Somedaywilldo) : somedaywilldo@foxmail.com
Reference
Progressive Growing of GANs for Improved Quality, Stability, and Variation, Tero Karras (NVIDIA), Timo Aila (NVIDIA), Samuli Laine (NVIDIA), Jaakko Lehtinen (NVIDIA and Aalto University) Paper (NVIDIA research)
tkarras/progressive_growing_of_gans (https://github.com/tkarras/progressive_growing_of_gans
github-pengge/PyTorch-progressive_growing_of_gans (https://github.com/github-pengge/PyTorch-progressive_growing_of_gans)
License
Our code is under MIT license. See LICENSE
这个项目在上周六杀青,代码主要是naykun和Someday贡献的,复现过程异常艰难,中途曾经多次想放弃。首先作为一篇非常新的顶会论文,我们读论文、搞清模型原理就花了大量的时间,naykun甚至在火车上手写了原文翻译稿(给大佬递茶),而Someday则把原作者所有的代码都hack了一遍才把训练数据和输出结果调出来,因为不同框架的色彩channel位置不一样。项目的日常就是Someday和naykun接力debug到1点,然后Someday和naykun失眠到2点。上周这个项目配合着OO捎带电梯、冯如杯院审、蓝桥杯一起食用,味道十分酸爽。
不过,在这段艰难的过程中,Someday深深体会到了科学家的严谨和实力、单从代码上就可以看出Someday自己还差那么10年功力。
在接下来的两周中,Someday会和naykun大佬一起,用推送记录下贡献项目的这段血泪史。这两周的推送会带给你GANs(对抗生成网络)的原理(Someday翻译了GANs的开山论文),Progressive growing of GANs 的原理,以及我们从根本看不懂模型代码,到经过几次战略调整之后,逐步成功复现模型的全过程,应该会为大家带来不少的收获,希望对深度学习、对抗生成网络有兴趣的朋友们多多支持,多多转发!
(原作者生成的高清明星脸)
目前我们只支持CelebA数据集,功能也还较为单一,我们会在接下来的时间里,添加更多的数据集和功能,敬请期待!
关注SomedayWill,了解为微软项目贡献代码的始终。

为微软samples-for-ai贡献代码是种怎么样的体验?的更多相关文章
- AI框架外部用户贡献代码
AI框架外部用户贡献代码 概述 飞桨是百度自主研发的一款开源的深度学习框架,是主流深度学习框架中首个完全国产化的产品,已经在农业.医疗.林业.科研.服务等领域成功应用.无论是已入职场的深度学习从业者. ...
- 如何往Spark社区做贡献,贡献代码
随着社区正在努力准备Apache Spark的下一版本3.0,您可能会问自己“我如何参与其中?”.现在的Spark代码已经很庞大,因此很难知道如何开始自己做出贡献.Spark PMC & Co ...
- 如何为PHP贡献代码
PHP在之前把源代码迁移到了git下管理, 同时也在github(https://github.com/php/php-src)上做了镜像, 这样一来, 就方便了更多的开发者为PHP来贡献代码. 今天 ...
- 如何在github上fork一个项目来贡献代码以及同步原作者的修改
[-] 如何贡献自己的力量 如何让自己的项目与原作者的项目保持同步 作为一个IT人,通过github进行学习是最快的成长手 段.我们可以浏览别人的优秀代码.但只看不动手还是成长得很慢,因此为别人贡献代 ...
- 花20分钟写的-大白话讲解如何给github上项目贡献代码
原文地址:http://site.douban.com/196781/widget/notes/12161495/note/269163206/ 本文献给对git很迷茫的新手,注意是新手,但至少会点基 ...
- 【转】如何在github上fork一个项目来贡献代码以及同步原作者的修改 -- 不错
原文网址:http://www.cnblogs.com/astwish/articles/3548844.html 作为一个IT人,通过github进行学习是最快的成长手段.我们可以浏览别人的优秀代码 ...
- GitHub上fork一个项目贡献代码以及同步原作者的修改【转】
如何贡献自己的力量 首先你总得有自己的github帐号吧,注册一个,非常简单,只需用户名,邮箱,密码,邮箱只是用来找回密码的,不做验证.因此注册后立即能用!比如我现在新注册一个叫JsLouvre的示范 ...
- win10安装PS和AI后报代码为16的错误解决方法
win10安装PS和AI后报代码为16的错误解决方法 一.总结 一句话总结:修改兼容性和以管理员方式运行就可以了 修改兼容性 以管理员身份运行 二.PS和AI安装后报代码为16的错误解决方法介绍(转) ...
- (转)大白话讲解如何给github上项目贡献代码
转自:https://site.douban.com/196781/widget/notes/12161495/note/269163206/ 2013-03-30 22:53:55 本文献给对g ...
随机推荐
- 【BZOJ1212】L语言(AC自动机)
[BZOJ1212]L语言(AC自动机) 题面 BZOJ 题解 很自然的,既然要匹配单词,那就全部都丢到\(AC\)自动机里面去 现在想想怎么匹配 先是\(AC\)自动机正常的匹配 如果此时这个位置能 ...
- 【洛谷2744 】【CJOJ1804】[USACO5.3]量取牛奶Milk Measuring
题面 Description 农夫约翰要量取 Q(1 <= Q <= 20,000)夸脱(夸脱,quarts,容积单位--译者注) 他的最好的牛奶,并把它装入一个大瓶子中卖出.消费者要多少 ...
- [Luogu3041][USACO12JAN]视频游戏的连击Video Game Combos
题面 sol 设\(f_{i,j}\)表示填了前\(i\)个字母,在\(AC\)自动机上跑到了节点\(j\)的最大得分.因为匹配需要暴跳\(fail\)所以预先把\(fail\)指针上面的匹配数传下来 ...
- Luogu4149:[IOI2011]Race
题目 bzoj权限题... Luogu Sol 点分治辣,边权非负,k>=1,开个\(1e6\)的桶就好辣 # include <bits/stdc++.h> # define RG ...
- java中获取项目在tomcat目录下的路径方法
HttpServletRequest request //获取的是ROOT项目在tomcat下的路径 方法1: String path = request.getSession().getServle ...
- linux字符集介绍及解决中文乱码实战
字符集对应配置文件:/etc/sysconfig/i18n 先备份再修改: 备份:cp /etc/sysconfig/i18n /etc/sysconfig/i18n.oldboy.20150521 ...
- django 下拉菜单显示为object的解决办法
在创建完Django数据库结构之后,使用Django自带的强大的admin功能往数据库中添加数据,图形化界面如下: 但时候有下拉框选项(只要在model中有定义Charfield就会显示为下拉框),如 ...
- three.js引擎基础知识—摄像机、场景及渲染器
一.three.js采用右手坐标系: x轴正方向向右,y轴正方向向上,z轴由屏幕从里向外,如下图右: 二.3D编程三要素:场景.渲染器.摄像机 1.场景:创建的物品和模型都需放入场景中 threejs ...
- windows下编译caffe报错:error MSB4062: 未能从程序集 E:\NugetPackages\OpenCV.2.4.10\......的解决办法
参考博客:http://blog.csdn.net/u013277656/article/details/75040459 在windows上编译caffe时,用vs打开后会自动加载还原NugetPa ...
- 使用netty的第一个Hello World
server端 package com.netty.test;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.Cha ...