Work

Face-to-Comic Image Generator

Upload a face photo, take one with the camera, or pick a dataset example, and the app redraws it as a comic portrait, or turns a comic face back into a photo. A CycleGAN trained on 10,000 photos and 10,000 comic faces.

Fields
AI / ML
Stack
  • Python
  • TensorFlow
  • Keras
  • CycleGAN
  • Streamlit
  • VPS
Live demo: the task-assignment model solved, with results per objective and a box plot of skill scores

01 / Problem

The model has to change a face's style without losing who it is.

02 / How it works

  1. Upload, snap or pick a face photo.
  2. It is cropped to a square and resized for the model.
  3. A generator redraws it in the other style: photo to comic, or comic to photo.
  4. Download the result as a PNG.

03 / Tech & why

CycleGAN
Two generators translate in opposite directions; photo → comic → photo must return the original, which keeps the face recognisable.
ResNet generators + PatchGAN discriminators
Adversarial, cycle-consistency and identity losses, 50 epochs on Face2Comics v2 at 128 px.
TensorFlow 2.18+ / Keras 3 package
Refactored the Kaggle notebook into a package: fixed swapped domains and loss bugs, added a training CLI and tests.
Streamlit on Community Cloud + own VPS
The same app on two hosts; comic.farisznafis.my.id is the VPS version.

04 / Results

  • Live photo ↔ comic translator with upload, camera and PNG download.
  • Tested codebase that retrains with one command.

Faris Zaidan Nafis

Loading portfolio