Giter Club home page Giter Club logo

mindspore-hp-vae-gan's Introduction

Contents

Hp-vae-gan uses a single image or video sample to generate different but similar new samples.

Paper Gur S , Benaim S , Wolf L . Hierarchical Patch VAE-GAN: Generating Diverse Videos from a Single Sample[J]. 2020.

The BibTex citing format for this repository is as follows:

@article{hp-vae-gan,
  title={Hierarchical Patch VAE-GAN: Generating Diverse Videos from a Single Sample},
  journal={Github repository},
  publisher={Github},
  year={2022},
  howpublished={\url{https://github.com/SakiRinn/mindspore-hp-vae-gan}}
}

The overall network architecture of hp-vae-gan is show below:

Link

Just a picture or a video. It can be specified by the user.

  • Data format: RGB images.
  • Note: We provide a sample dataset in ./data folder.
.
├── LICENSE
├── README.md
├── ascend310_infer
│   ├── CMakeLists.txt
│   ├── build.sh
│   ├── inc
│   │   └── utils.h
│   └── src
│       ├── main.cc
│       └── utils.cc
├── data                        # Sample dataset
│   ├── imgs
│   │   └── air_balloons.jpg
│   └── vids
│       └── air_balloons.mp4
├── eval_image.py
├── eval_video.py
├── export.py
├── postprocess.py
├── preprocess.py
├── requirements.txt
├── scripts
│   ├── run_eval_ascend.sh      # script for evaluation on Ascend 910
│   ├── run_infer_310.sh        # script for inference on Ascend 310
│   └── run_train_ascend.sh     # script for training on Ascend 910
├── src
│   ├── __init__.py
│   ├── datasets
│   │   ├── __init__.py
│   │   ├── generate_frames.py
│   │   ├── image.py
│   │   └── video.py
│   ├── modules
│   │   ├── __init__.py
│   │   ├── losses.py
│   │   ├── networks_2d.py
│   │   ├── networks_3d.py
│   │   └── optimizers.py
│   ├── sinFID
│   │   ├── __init__.py
│   │   ├── c3d.py
│   │   ├── fid_score.py
│   │   └── inception.py
│   ├── tools
│   │   ├── __init__.py
│   │   ├── pt2ms.py
│   │   ├── spectral_norm.py
│   │   └── trilinear.py
│   └── utils
│       ├── __init__.py
│       ├── extract.py
│       ├── images.py
│       ├── logger.py
│       ├── progress_bar.py
│       └── saver.py
├── train_image.py
├── train_video.py
└── train_video_baselines.py

You can start training using python or shell scripts. The usage of shell scripts as follows:

sh scripts/run_train_ascend.sh IMAGE_PATH [DEVICE_ID]
  • IMAGE_PATH: The filename of the training image.
  • DEVICE_ID: The number of the Ascend device.

You can start evaluation using python or shell scripts. The usage of shell scripts as follows:

sh scripts/run_eval_ascend.sh EXPERIMENT_DIR [DEVICE_ID]
  • EXPERIMENT_DIR: The directory to the training output folder.
  • DEVICE_ID: The number of the Ascend device.

Export MindIR on local.

python export.py --exp-dir [EXP_DIR] --device-id [DEVICE_ID]
  • EXP_DIR: The directory to the training output folder.
  • DEVICE_ID: The number of the Ascend device.

Before performing inference, the mindir file must bu exported by export.py script. We only provide an example of inference using MINDIR model.

sh scripts/run_infer_image_310.sh EXPERIMENT_DIR [DEVICE_ID]
  • EXPERIMENT_DIR: The directory to the training output folder.
  • DEVICE_ID: The number of the Ascend device.

Please check the official homepage.

mindspore-hp-vae-gan's People

Contributors

sakirinn avatar xdwang97 avatar xx-tao avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.