Socket
Book a DemoInstallSign in
Socket

faceapp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faceapp

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Faceapp

Faceapp is neural-network face manipulation application for smartphones.

This gem provides command-line utility and Ruby library to utilize Faceapp API without using smartphone application.

Faceapp Application is available on Google Play and Apple App Store:

  • https://play.google.com/store/apps/details?id=io.faceapp
  • https://itunes.apple.com/us/app/faceapp-free-neural-face-transformations/id1180884341

Usage

Commandline utility

faceapp [options] <filter> <input> [ouput]

  <filter> - Faceapp filter name
    Possible values: smile, smile_2, hot, old, young, female, male

  <input> - Input file name
    Use '-' for STDIN

  [output] - Optinal, output file name
    Do not specify or use '-' for STDOUT

  Options:
    --help - Display this message
    --cropped[=true|false] - Crop output image to face region. Enabled by default.
    --api_host=<api_host> - Faceapp API host
    --device_id=<device_id> - DeviceId for Faceapp
    --user_agent=<user_agent> - User-Agent header for Faceapp API requests
    --silent - Keep quiet, it will override `debug`
    --debug - Print HTTP requests/responses to STDERR.

Example:

$ faceapp female hitler.jpg adolfina.jpg
$ faceapp female - < hitler.jpg > adolfina.jpg

Ruby library

require 'faceapp'

client = Faceapp::Client.new

file = File.open('hitler.jpg', 'rb')
filter = 'female' # smile, smile_2, hot, old, young, male

# File could be String or IO

code = client.upload_photo(file)
# => "2017blablabla"

# By default it will return StringIO
result = client.apply_filter(code, filter)
# => StringIO

output = File.open('output.jpg', 'wb')

# Third argument might be an IO object
result = client.apply_filter(code, filter, output)
# => File

# Or you may specify block, it will receive response chunks
client.apply_filter(code, filter) do |chunk, cursor, total|
    # chunk is String
    puts chunk.bytesize
    # render fancy progress bar
end
# => 100500 # Returns total bytes count

Installation

Add this line to your application's Gemfile:

gem 'faceapp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install faceapp

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 17 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.