An AI-powered Anime Character Generator for Aspiring Writers
Ficbot is a machine learningβpowered system designed to assist writers in creating original characters effortlessly. It leverages deep learning and NLP models to generate character names from images, with planned expansions for image generation.
Ficbot is now split into two repositories for better organization:
-
ficbot (this repository) β Contains:
- The frontend (user interface).
- The API layer that communicates with the backend inference service.
- Docker configuration for deploying the combined frontend + API container.
-
ficbot-backend β Contains:
- The AI inference service that processes images and generates names and bios.
- The ML models and related dependencies (Torch, Transformers).
- Training scripts, dataset processing, and exploratory notebooks.
- PyTorch: Powers the name generation model, which maps image embeddings to plausible character names.
- Transformers: Used for bio generation with modern NLP architectures, fine-tuned on character metadata.
- Llama.cpp: Enables fast, CPU-efficient inference of quantized language models for resource-constrained environments.
- FastAPI: Serves the backend inference API and provides a lightweight, async-compatible framework for handling requests.
- HTML5/CSS3 & JavaScript: Core technologies for the interactive user interface.
- Bootstrap: Ensures responsive, mobile-friendly layouts.
- FastAPI (Frontend API layer): Also serves static assets and API endpoints consumed by the frontend.
Character names are vectorized and compared to the dataset of top-1000 most popular characters from MyAnimeList.net. The top-matching entries are used to extract genres and themes, which then guide bio generation. This retrieval-enhanced approach grounds outputs in contextually relevant tropes and improves narrative coherence.
Ficbot's AI models were trained using a public dataset of anime characters, which I compiled and explored in depth.
πΉ Dataset on Kaggle: MyAnimeList Character Dataset
πΉ Exploratory Data Analysis Notebook: View on Kaggle
This dataset includes over 106,000 characters, with names, bios, and images, making it a valuable resource for training NLP models.
- πΉ Image β Name Generator
Upload an image, and the AI will generate a character name based on visual analysis.
β¨ Powered by MobileNetV3 + Bidirectional LSTM. - πΉ Bio Generator
Provide a name, and the AI will generate a detailed character bio.
β¨ Built on DistilGPT2 with sliding window chunking (50β200 tokens) and optimized for CPU inference via LlamaCPP. Uses a lightweight RAG-inspired approach: vectorizes the input name, retrieves the most similar characters from the popular characters' set, and injects their anime genres and themes to ground the output in believable character types. - πΉ Anime Filter With a press of a button (stylize), transforms your image into an anime style! β¨ Uses Bryandlee's PyTorch implementation of AnimeGAN2. Check it out!
- πΉ Advanced Name Generator β Enable name generation based on bios or hybrid inputs for more coherent character design.
- πΉ Customizable Themes & Genres β Allow users to manually input preferred themes or genres (e.g., action, pirates, magical girl) to influence bio generation, instead of relying solely on automatic RAG retrieval.
- πΉ AI-Powered Image Generation β Generate character portraits based on the outputted name and bio using image synthesis models.
- πΉ Complete OC Generator β One-click generation of complete original characters, including name, bio, and image.
Windows (without WSL): Guide
Linux / Windows (with WSL): Guide
python3 -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
pip install -r requirements.txt
- Ensure the backend inference service (ficbot-backend) is running.
- Start the frontend + API server:
uvicorn src.main:app --host 0.0.0.0 --port 8000
Once running, access the API at:
π https://127.0.0.1:8000/docs
(Interactive API Documentation)
Note: The frontend API will need to communicate with the ficbot-backend service. Make sure the correct API URL is set in the frontend configuration.
This repository includes a Dockerfile for containerized deployment.
docker build -t ficbot .
docker run -p 8000:8000 ficbot
Once running, you can access Ficbot's UI and API at your server's address.
python -m unittest
pip install coverage
coverage run -m unittest
coverage report # Current coverage: 92%
coverage html -d coverage_html # interactive html reporting
We welcome contributions!
- Report issues or feature requests via GitHub Issues.
- Fork the repository and submit pull requests for new features or bug fixes.
- Check back for roadmap updates and community discussions.
This project is open-source under the BSD-3-Clause license.
This project utilizes AnimeGANv2 for anime-style image transformation.
- AnimeGAN2-PyTorch by bryandlee
- Repository: AnimeGAN2-PyTorch
- License: MIT.
πΉ Live Demo: ficbotweb.com
πΉ Ficbot Backend: ficbot-backend
πΉ Dataset: Kaggle
πΉ Exploratory Data Analysis Notebook: Kaggle