WORK IN PROGRESS - Speech Balloon Detection System
This is a fork of Komelia that implements an automatic speech balloon detection and navigation system inspired by Seeneva. Full credit to the Seeneva project for the reference behavior, UX, and ML model approach that guided this implementation.
Balloon navigation is usable, but still limited:
- Reader modes: Paged and Continuous
- Scaling: Screen Fit only (recommended)
- Panels and other scale modes are not wired yet
- Continuous mode can still miss some balloons depending on page layout
Implement a Seeneva-style speech balloon reader that:
- Automatically detects speech balloons using YOLOv4-tiny ML model
- Allows navigation through balloons with tap gestures (left/right)
- Shows zoomed balloons as popups with proportional scaling
- Supports both manga (RTL) and western comics (LTR) reading directions
- Continuous mode can pre-index balloons for the current comic and reuse that index on the next open
- Continuous mode refreshes the current page and next page in the background to fill missing balloons
The current flow mirrors Seeneva's behavior: each page is processed by a lightweight ML model, detections are stored per page, and taps navigate between balloons before allowing page turns. The overlay computes proportional zoom and positions each balloon over its on-page location, rather than centering everything.
In Continuous mode, balloon detections are indexed once and stored on disk for the current comic. This makes navigation snappy after the first pass. While reading, the current page and next page are re-checked in the background to catch any missed balloons without interrupting navigation.
- Integrate balloon navigation with other reader modes (Panels, Webtoon, etc.)
- Support additional scale modes beyond Screen Fit (e.g., Fit Width, Free Scale)
- Expand testing for edge cases (small balloons, overlapping bubbles, multi-panel pages)
- Performance tuning and optional caching for large chapters
komelia-ui/src/androidMain/kotlin/snd/komelia/ui/reader/balloon/- Android TFLite detectionkomelia-ui/src/commonMain/kotlin/snd/komelia/ui/reader/balloon/- Common balloon state/UIkomelia-app/src/androidMain/assets/yolo_seeneva.tflite- ML model from Seeneva
- Build:
./gradlew :komelia-app:assembleDebug- Install APK from
komelia-app/build/outputs/apk/debug/- Open a comic in Paged or Continuous reader mode
- Tap center to open settings, look for "Smart" toggle
- Enable and tap left/right sides of screen to navigate balloons
- Long-press a balloon to open it directly
Note: For the long-press selection, try to ensure the balloon is around the middle of the screen (or slightly above). Some Komelia gesture layers can interfere if the balloon is too low on screen.
- Latest prebuilt release is available at https://github.com/Snd-R/Komelia/releases
- Google Play Store https://play.google.com/store/apps/details?id=io.github.snd_r.komelia
- F-Droid https://f-droid.org/packages/io.github.snd_r.komelia/
- AUR package https://aur.archlinux.org/packages/komelia
Android and JVM targets require C and C++ compiler for native libraries as well nodeJs for epub reader build
The recommended way to build native libraries is by using docker images that contain all required build dependencies
If you want to build with system toolchain and dependencies try running:
./gradlew komeliaBuildNonJvmDependencies (Linux Only)
Requires jdk 17 or higher
To build with docker container, replace <platform> placeholder with your target platform
Available platforms include: linux-x86_64, windows-x86_64
docker build -t komelia-build-<platfrom> . -f ./cmake/<paltform>.Dockerfiledocker run -v .:/build komelia-build-<paltform>./gradlew <platform>_copyJniLibs- copy built shared libraries to resource directory that will be bundled with the app./gradlew buildWebui- build and copy epub reader webui (npm is required for build)
Then choose your packaging option:
./gradlew :komelia-app:runto launch desktop app./gradlew :komelia-app:packageReleaseUberJarForCurrentOSpackage jar file (output inkomelia-app/build/compose/jars)./gradlew :komelia-app:packageReleaseDebpackage Linux deb file (output inkomelia-app/build/compose/binaries)./gradlew :komelia-app:packageReleaseMsipackage Windows msi installer (output inkomelia-app/build/compose/binaries)
To build with docker container, replace <arch> placeholder with your target architecture
Available architectures include: aarch64, armv7a, x86_64, x86
docker build -t komelia-build-android . -f ./cmake/android.Dockerfiledocker run -v .:/build komelia-build-android <arch>./gradlew <arch>_copyJniLibs- copy built shared libraries to resource directory that will be bundled with the app./gradlew buildWebui- build and copy epub reader webui (npm is required for build)
Then choose app build option:
./gradlew :komelia-app:assembleDebugdebug apk build (output inkomelia-app/build/outputs/apk/debug)./gradlew :komelia-app:assembleReleaseunsigned release apk build (output inkomelia-app/build/outputs/apk/release)
run./gradlew :komelia-komf-extension:app:packageExtension
output archive will be in ./komelia-komf-extension/app/build/distributions
















