Skip to content

CDHZAYN/cartoonize_express

Repository files navigation

Cartoonizer-express

Convert ONLY image into a cartoon!

an ExpressJS project forked and changed from experience-ml/cartoonize

The original(Flask-based) webapp is deployed here - https://cartoonize-lkqov62dia-de.a.run.app

Powered by Algorithmia

You can find a writeup on this webapp's architecture here!

Installation Using Google Colab

  1. Clone the repository using either of the below mentioned way:
    • Using Command:

      • Create a new Notebook in Colab and in the cell execute the below command.
       ! git clone https://github.com/CDHZAYN/cartoonize_express.git
      

      Note: Don't forget to add ! at the beginning of the command

    • From Colab User Interface

       Open Colab
           └── File
                └── Open Notebook
                         └── Github
                               └── paste the Url of the repository

Note : Before running the application change the runtime to GPU for processing videos but you for images CPU shall also work just fine.

Runtime
	└── Change runtime type
				└── Select GPU
  1. After cloning the repository navigate to the /cartoonize_express using below command in the notebook cell:
 %cd cartoonize_express
  1. Run the below commands in the notebook cell to install the requirements (CAUTION: "pip install" may firstly uninstall some of existing packages, please check it previously).
 !npm install
 !pip install -U -r requirements.txt
  1. Config your pyngrok to solve NAT Traversal(ngrok account registration in advance needed).
!ngrok authtoken YOUR_NGROK_TOKEN
  1. Run the pyngrok in background, allowing the express' default port 3000 to be visited.
!nohup ngrok http 3000 &
  1. Launch the express app on ngrok.
 !npm run dev
  1. Connect to colab with ngrok in RESTful requests. Image should be transferred according to "Content-Type=form-data" and named "image". express will return with a transformed JPG picture in Base64.
POST http://xxxx-xx-xxx-xxx-xxx.ngrok.io/

Note : Sample Google Colab Notebook for reference


License

  1. Copyright (WHATEVER)

  2. Copyright © Cartoonizer (Demo webapp)

  3. Copyright (C) Xinrui Wang, Jinze Yu. (White box cartoonization)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published