Giter Club home page Giter Club logo

styledev.rt's Introduction

styledev.rt

(HackPrinceton 2018) Game asset style transfer for easily extensible fan mods and creations.

About

Style Transfer is a relatively new subfield in machine learning that allows for the quantification of image "styles," typically thought of as "brush patterns" or other local geometry in an image. By training a neural network to quantify such styles, it's possible to "transfer" the style of one image onto another, creating a variety of interesting results, including "Deep Fakes' and other forms of content.

However, while these algorithms have been adapted to video content, including some working demos on live video feeds, such techniques often remain computationally infeasible, requiring anywhere from seconds to minutes to process a single frame on typical hardware. In this project, we offer true real-time style transfer through pre-computed "style transferred" modified game assets, rendering such assets in real time with the original game engine.

Screenshots

Base Style: Base Style Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Demo

To run our modded first level of "Paper Mario: The Thousand Year Door":

  • Install Dolphin Emulator
  • Clone this repo, and copy "demo/modded_textures" to "Your Documents Folder/Dolphin Emulator/Load/Textures"
  • Under Dolphin/Graphics Settings/Advanced, tick "Load Custom Textures"
  • Run TTYD from Dolphin

Requirements

(For recomputing results/changing paramters/textures, etc.) Running this project depends on the following packages (available through conda or pip)

  • torch, torch.nn, numpy
  • torch.optim
  • PIL, PIL.Image,
  • torchvision.transforms
  • torchvision.models

Usage

  1. Tick "dump textures" under Dolphin/Graphics/Advanced. Then play through the desired level(s) that you wish to mod/style transfer onto.
  2. Run
python run_this.py

in your terminal of choice. By default, this uses the textures listed in demo/dumped_textures to determine which textures to replace/style on, searching through all the files listed in demo/base_textures and replacing them in-place. The style to be used is computed from "demo/style.jpg." After doing this, follow the instructions for running the demo.

Future Extensions

  • Style transferring 3D assets, using UV projection information for preservation of spatial features
  • Application to other games/engines
  • Other neural style transfer algorithms

Credits

Thanks to The Dolphin Community TTYD Texture pack, Alexis Jacq et. al, and the Dolphin Team.

styledev.rt's People

Contributors

elu00 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.