目录
目录README.md

Jittor-CGAN

简述

本项目是基于jittor深度学习框架,在数字图片数据集 MNIST 上训练一个将随机噪声和类别标签映射为数字图片的 Conditional GAN 模型,生成指定数字序列对应的图片。

安装

运行本项目需要首先安装jittor框架。Jittor 框架目前支持 Linux 或 Windows(包括 WSL),mac 系统请安装虚拟机解决。需要使用 Python 及 C++ 编译器(g++ 或 clang)。下面给出Jittor的docker和pip安装方法:

  • Docker安装,不需要额外配置环境

    # CPU only(Linux)
    docker run -it --network host jittor/jittor
    # CPU and CUDA(Linux)
    docker run -it --network host --gpus all jittor/jittor-cuda
    # CPU only(Mac and Windows)
    docker run -it -p 8888:8888 jittor/jittor
  • Windows安装

    # check your python version(>=3.8)
    python --version
    python -m pip install jittor
    # if conda is used
    conda install pywin32

    Windows环境下,jittor会自动检测显卡并安装对应的 CUDA。

  • 检查

    要检查Jittor的完整性,可以运行Resnet18训练测试。需要注意的是,这个测试需要6G显存。

    # Windows
    python -m jittor.test.test_resnet
  • 更详细的安装信息,请参加jittor官网 https://cg.cs.tsinghua.edu.cn/jittor/download/

运行

本项目是基于第三届计图人工智能挑战赛——计图挑战热身赛搭建,赛题提供示例代码框架,数据下载、模型定义、训练步骤等功能。

运行方法为在对应的项目路径下,打开终端输入下列内容

python CGAN.py

这将直接开始运行文件,将运行的中间结果输入到对应编号的png,并在终端记录当前的epoch和batch。最后的结果将会储存在result.png文件中。

本项目生成的随机数字序列为13907001389530。 之前项目运行的中间结果和模型储存在下面的网盘链接中。 https://cloud.tsinghua.edu.cn/library/0e880936-a69f-488a-ac07-29b65054bb29/%E5%9B%BE%E5%BD%A2%E5%AD%A6PA3/

链接

计图挑战赛官网:https://www.educoder.net/competitions/Jittor-4

Jittor官网:https://cg.cs.tsinghua.edu.cn/jittor

关于

计图挑战赛热身赛题目,基于Conditional GAN的数字生成

39.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号