Code Monkey home page Code Monkey logo

waifu2x-mac's Introduction

Waifu2x-mac

Waifu2x porting to macos, still in CoreML and Metal. For other details please refer to waifu2x-ios.

Disclaimer

I haven't published this app to the Mac App Store. Any app appears on the store has nothing to do with me.

Requirements

  • macOS 10.13+
  • XCode 9.0+

Compilation Instructions

Option A (automatic):

  1. Open the Terminal (โŒ˜+Space, "terminal")
  2. Drag build.sh from Finder to the Terminal window, and press Return to start building the app.
    All missing dependencies (including Xcode) will be installed automatically by the script if needed.
  3. Once the build has completed, the waifu2x-mac-app application can be found in the build folder.

Option B (manual):

  1. Install dependencies for command-line version:
    sudo gem install xcodeproj
    cd Dependencies
    swift package update
    rake xcodeproj
  2. Build using waifu2x-mac-app scheme
  3. To locate the built macOS app, expand the Products folder on Project Navigator (left pane) and right click on waifu2x-mac-app.app to select Show in Finder

Installing the App and CLI Version

The app can be dragged to any location you choose, such as /Applications.

If you would like to use the CLI version, right click on the app and select Show Package Contents. Navigate to Contents/MacOS. The CLI version is waifu2x.

If you would like to run the program anywhere, you must create a symbolic link by typing ln -s /path/to/waifu2x /usr/local/bin/waifu2x in a terminal. You can also drag the waifu2x executable after ln -s to get the file path in terminal automatically.

For example, if waifu2x-mac-app is in /Applications, you would run the following command to create a symlink:
ln -s /Applications/waifu2x-mac-app.app/Contents/MacOS/waifu2x /usr/local/bin/waifu2x

N.B.: You can not drag the CLI executable out and use it directly as it will not work. You must create a symbolic link as shown above if you want to use it without going into the waifu2x-mac-app.app directory.
Additionally the symbolic link will break if you move the macOS app. You can delete the old symlink with unlink /usr/local/bin/waifu2x and run ln -s again to create a new one.

Command-Line Usage

Usage: waifu2x [options]
    -t, --type:
        Image type - a for anime (default), p for photo
    -s, --scale:
        Scale factor (1 or 2)
    -n, --noise:
        Denoise level (0-4)
    -i, --input:
        Input image file (any format as long as NSImage loads)
    -o, --output:
        Output image file (png)
    -h, --help:
        Print usage

WARNING: The CLI version is not a self-contained executable. waifu2x must remain in the same directory as CommandLineKit.framework and waifu2x_mac.framework.

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.