Git Product home page Git Product logo

wadsnip's Introduction

Wadsnip

Formerly: A bunch of python scripts that do cool stuff with Doom wads and PK3 archives. Now: Python script [standalone] that 2x upscales PNG images with transparency. No Doom port or WAD files required.

Standalone

Generate your own high resolution PNG & alpha with the help of Neural Net upscaling! Uses waifu2x with xbrz(ScalerTest) to determine the alpha layer. See STANDALONE for details and pre-built releases.

standalone can be launched with arguments:
python standalone.py in out

where 'in' is input file or directory, 'out' is output file or directory. directories can be nested, output file\directory order is same as in input; also standalone can be launched without arguments, but folder 'in' should be presend and not empty;

Setup

Tested on Windows with Python3.8

git clone https://github.com/rev3n4nt/wadsnip.git
git submodule update --init --recursive
pip3 install pillow
pip3 install chainer
pip3 install cupy101
pip3 install pyinstaller
  • for running image conversion - xbrzscale executable need to be downloaded & placed in same folder with standalone script or executable (which one you running).
  • cupy101 - optional
  • pyinstaller - for executable from python

For Windows:

compiling into executable file by following command: pyinstaller.exe --onefile --paths '/[path to Python3]/Lib/site-packages/;waifu2x_chainer/' standalone.py

i.e : pyinstaller.exe --onefile --paths '/c/Program\ Files\ (x86)/Python38-32/Lib/site-packages/;waifu2x_chainer/' standalone.py

standalone executable can be launched with arguments or without, same as python file;

[xbrzscale] (executables from https://sourceforge.net/projects/xbrz/files/HqMAME/) originally (https://github.com/atheros/xbrzscale) and waifu2x-chainer only needed for hires functionality. Cupy is only needed if you want to speed up generation of hires packages with the use of a GPU (currently turned off). See waifu2x-chainer for details.

TODO

  • Define keywords and expected structure for info parsing (regex findall tuples?)
  • Determine wad graphics by whatever is an image type that is not in pnames
  • Use photogrammetry to generate more sprite rotations.

Licensing

Wadsnip is licensed under GPL v3.

Contributions

There is a core set of functionality under doom that is at least somewhat extensible, and plenty of interesting things you can do with the code that are not fully demonstrated. Please feel free to fork this(or former) project to add new functionality and scripts. Make a pull request if you think your code is universally useful and follows the following vague rules:

  1. The project structure is such that user interactable scripts should be short and sweet, mostly just argument parsing for a function in doom.util.
  2. All functions in doom.util should provide their own imports to avoid unnecessary dependencies. (A user shouldn't be forced to install PIL or chainer for a simple lump extraction for example).

wadsnip's People

Contributors

kcghost avatar rev3n4nt 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.