Convert images and videos into a cartoon!
The webapp is deployed here - https://cartoonize-lkqov62dia-de.a.run.app
These are important steps if you want to leverage Google buckets, signed URLs and Algorithmia's platform.
To use any functionalities pertaining to Google Cloud, you'll need a global authentication file (JSON). You can obtain this JSON by following the steps given here - Getting started with authentication
After you get the JSON file, rename it to token.json
(so that it's compatible with the codebase).
Set the environment variable in your terminal -
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/token.json"
Notes:
- You can set it permanently by adding this line to
~/.bashrc
. Dockerfile
already includes the setting of this particular environment variable. :)
We used the Serveless AI Layer product of Algorithmia for inference on videos. To learn more on how to deploy your model in Algorithmia, check here - https://algorithmia.com/developers
The easiest way to get the webapp running is by using the Dockerfile:
cd
into the root directory and build the image
docker build -t cartoonize .
Note: Set the appropriate values in config.yaml
before building the image.
- Run the container by exposing the appropriate ports
docker run -p 8080:8080 cartoonize
- Make a virtual environment using
virutalenv
and activate it
virtualenv -p python3 cartoonize
source cartoonize/bin/activate
- Install python dependencies
pip install -r requirements.txt
- Run the webapp. Be sure to set the appropriate values in
config.yaml
file before running the application.
python app.py
-
Copyright © Cartoonizer (Demo webapp)
-
Authors: Niraj Pandkar and Tejas Mahajan.
-
Licensed under the CC BY-NC-SA 4.0
-
Commercial application is prohibited by license
-
-
Copyright (C) Xinrui Wang, Jinze Yu. (White box cartoonization)
- All rights reserved.
- Licensed under the CC BY-NC-SA 4.0
- Also, Commercial application is prohibited license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
About the License: [Template from this repo]
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This design file is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.
A summary of this license is as follows.
You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.