An Image and Video Cartoonization Algorithm

environment

Introduction

cartoonizer is an open source image/video cartoonization project. The author also integrated flask web framework in the project. We can easily deploy it to the network for our own or others’ use.

online experience

The official website provides a web site for online experience. The address is: https://cartoonize-lkqov62dia-de.a.run.app/ . I found a photo of the goddess. After uploading it, it will be processed in a while. Come Let’s see the effect before and after

local practice

First, create a brand new virtual environment

 conda create -n cartoonizer python=3.7 conda activate cartoonizer

Then pull the code locally

 git clone https://github.com/experience-ml/cartoonize.git cd cartoonize # 按照外部的依赖库pip install -r requirements.txt

After the dependencies are completed, the service can be started. This is a web service that uses flask framework

Then, open http://127.0.0.1:8080 in your browser

Upload image processing

Overall, it is the same as the online version provided by the author

It should be noted here that video processing cannot take effect, and the original code is developed based on linux , so if you want to experience video animation, you need to switch to linux operating system.

FAQ

ImportError: cannot import name ‘Markup’ from ‘jinja2’

Upgrade flask

 pip install -U flask

NotImplementedError: Cannot convert a symbolic Tensor (strided_slice:0) to a numpy array.

Here you need to lower the version of numpy

 pip install numpy==1.19.5

References

This article is transferred from https://xugaoxiang.com/2023/03/17/image-video-cartoonizer/
This site is only for collection, and the copyright belongs to the original author.