Application to transform camera photo into cartoon image.
In previous articles I developed a web based object detection system using YOLO and a text recognition application using Tesseract. In this article let’s build a fun cartoon camera which transforms camera photo into cartoon image.
The is a web based application built using React and FastAPI. The frontend application uses the web camera to capture photo and send to the backend through web socket. The backend application transforms it into a cartoon image, and sends the cartoon image back to the web application.
There are different styles that you can apply to the image. Below is a snapshot of a transformed photo.
The backend is built using FastAPI. It hosts APIs to serve CartooGAN: Generative Adversarial Networks for Photo Cartoonization using HTTP and web socket.
You can access the APIs using FastAPI built-in Swagger UI at http://localhost:8088/docs.
Below is the image used to test the API, using the Swagger UI.
And below are the images with different cartoon styles.