{"id":24983377,"url":"https://github.com/ashu11-a/manga-segment","last_synced_at":"2026-06-07T11:01:07.378Z","repository":{"id":213393959,"uuid":"732167850","full_name":"Ashu11-A/Manga-Segment","owner":"Ashu11-A","description":"Segmentation of manga in speech balloons and comics","archived":false,"fork":false,"pushed_at":"2026-06-06T16:55:41.000Z","size":13677,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-06T18:22:21.812Z","etag":null,"topics":["ai","bandwidth","bandwidth-hero","classification","manga","models-generation","proxy","proxy-server","pytorch","remove-background","removebg","segmentation","segmentation-models","unet","unet-image-segmentation","unet-segmentation","yolov11","yolov8"],"latest_commit_sha":null,"homepage":"https://universe.roboflow.com/ashu-biqfs/manga-segment","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ashu11-A.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-15T20:20:38.000Z","updated_at":"2026-06-06T16:55:44.000Z","dependencies_parsed_at":"2024-01-22T22:33:30.637Z","dependency_job_id":"dfd84562-fc48-4adf-a66c-8dc4c2a64c20","html_url":"https://github.com/Ashu11-A/Manga-Segment","commit_stats":null,"previous_names":["ashu11-a/manga-converter","ashu11-a/manga-convert","ashu11-a/manga-segment"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Ashu11-A/Manga-Segment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashu11-A%2FManga-Segment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashu11-A%2FManga-Segment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashu11-A%2FManga-Segment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashu11-A%2FManga-Segment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ashu11-A","download_url":"https://codeload.github.com/Ashu11-A/Manga-Segment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashu11-A%2FManga-Segment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34018405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bandwidth","bandwidth-hero","classification","manga","models-generation","proxy","proxy-server","pytorch","remove-background","removebg","segmentation","segmentation-models","unet","unet-image-segmentation","unet-segmentation","yolov11","yolov8"],"created_at":"2025-02-04T09:14:02.511Z","updated_at":"2026-06-07T11:01:07.297Z","avatar_url":"https://github.com/Ashu11-A.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# [ML] Manga Segment\n\n![license-info](https://img.shields.io/github/license/Ashu11-A/Manga-Segment?logo=gnu\u0026style=for-the-badge\u0026colorA=302D41\u0026colorB=f9e2af\u0026logoColor=f9e2af)\n![stars-infoa](https://img.shields.io/github/stars/Ashu11-A/Manga-Segment?colorA=302D41\u0026colorB=f9e2af\u0026style=for-the-badge)\n\n![Last-Comitt](https://img.shields.io/github/last-commit/Ashu11-A/Manga-Segment?style=for-the-badge\u0026colorA=302D41\u0026colorB=b4befe)\n![Comitts Year](https://img.shields.io/github/commit-activity/y/Ashu11-A/Manga-Segment?style=for-the-badge\u0026colorA=302D41\u0026colorB=f9e2af\u0026logoColor=f9e2af)\n![reposize-info](https://img.shields.io/github/repo-size/Ashu11-A/Manga-Segment?style=for-the-badge\u0026colorA=302D41\u0026colorB=90dceb)\n\n\u003c/div\u003e\n\u003cdiv align=\"left\"\u003e\n\n## 📃 | Description\n\nThis is a simple project developed in [Python](https://www.python.org), aimed at removing manga backgrounds. I created this because I usually read manga at night.\n\nTo use this project in production, you need to install the [Bandwidth Hero](https://bandwidth-hero.com/) browser extension. If you prefer reading manga in a specific reader, I recommend [TachiyomiAZ](https://github.com/jobobby04/TachiyomiSY), which is compatible with [Bandwidth Hero](https://bandwidth-hero.com/).\n\nThis project was structured and tested with [U-Net](https://en.wikipedia.org/wiki/U-Net) and [Yolo](https://docs.ultralytics.com)(v8, v11).\n\n| Input | YoloV8n (v0.1) | YoloV8s (v0.2) | YoloV11s (v0.2) |\n|--|--|--|--|\n| ![Input](./.github/img/input.png) | ![YolovV8n-output](./.github/img/yolov8n-0.1-output.png) | ![YolovV8s-output](./.github/img/yolov8s-0.2-output.png) | ![YoloV11s-output](./.github/img/yolov11s-0.2-output.png) |\n\n## Diff\n\n| Input | YoloV8n(v0.1) / YoloV8s(v0.2) | Yolov8n(v0.1) / Yolov11s(v0.2) | Yolov8s(v0.2) / Yolov11s(v0.2)\n|--|--|--|--|\n| ![Input](./.github/img/input.png) | ![YoloV8n-YoloV8s-Diff](./.github/img/yolov8n-0.1-yolov8s-0.2-diff.png) | ![Yolov11-Yolov8-Diff](./.github/img/yolov11s-0.2-yolov8n-0.1-diff.png) | ![Yolov8s-Yolov11s-Diff](./.github/img/yolov8s-0.2-yolov11s-0.2-diff.png)\n\n## Tune\n| Model | Tuning Time | Image Size | Epochs/Inter | Iterations | Fitness | Scatter Plots |\n|--|--|--|--|--|--|--|\n| [YoloV8n](https://github.com/Ashu11-A/Manga-Segment/releases/tag/v0.1) (v0.1) | 45.1h | 1280x1280 | 100 | 100 | ![yolo-tune_fitness](./.github/img/yolo-tune_fitness.png) | ![yolo-tune_scatter_plots](./.github/img/yolo-tune_scatter_plots.png) |\n\n## Dataset versions\n\n| Property                  | v0.1                        | v0.2                                   |\n|---------------------------|-----------------------------|----------------------------------------|\n| Images                    | 283                         | ⬆️ 480                                 |\n| Train                     | 249                         | ⬆️ 420                                 |\n| Valid                     | 22                          | ⬆️ 40                                  |\n| Test                      | 12                          | ⬆️ 20                                  |\n| Annotations               | 3293                        | ⬆️ 4832                                |\n| Annotation comic          | 1258                        | ⬆️ 1938                                |\n| Annotation speech-balloon | 2035                        | ⬆️ 2894                                |\n| Auto-Orient               | Applied                     | Applied                                |\n| Resize                    | Stretch to 963x1400         | ⬜ Fit (white edges) in 963x1400       |\n| Auto-Adjust Contrast      | Using Contrast Stretching   | Using Contrast Stretching              |\n| Flip                      | Horizontal, Vertical        | Horizontal, Vertical                   |\n| Rotation                  | ❌                          | Between -15° and +15°                  |\n| Grayscale                 | Applied                     | Applied                                |\n| Exposure                  | ❌                          | Between -10% and +10%                  |\n| Blur                      | 0.5px                       | ⬆️ 1px                                 |\n| Noise                     | 0.5%                        | 0.5%                                   |\n\n\n## Comparison (Unet vs YoloV8 vs YoloV11)\n\n| Property         | Unet                | YoloV8 (v0.1)            | Yolov8s (v0.2)           | YoloV11 (v0.2)           |\n|------------------|---------------------|--------------------------|--------------------------|--------------------------|\n| Precision        | 0.7444              | 0.98424                  | 0.96524                  | 0.968                    |\n| Recall           | ❌                  | 0.95234                  | 0.97068                  | 0.965                    |\n| Val Seg Loss     | ❌                  | 0.7037                   | 0.65568                  | 0.69089                  |\n| Val Clas Loss    | 0.23221             | 0.26816                  | 0.31534                  | 0.27078                  |\n| Pretrained Model | ❌                  | Yolo Nano                | Yolo Small               | Yolo Small               |\n| EarlyStopping    | 20                  | 100                      | 25                       | 25                       |\n| Stop Epoch       | 26                  | 411                      | 169                      | 251                      |\n| Image Set        | 3.882               | 283                      | 480                      | 480                      |\n| Image Channels   | 4                   | 3                        | 3                        | 3                        |\n| Training Size    | 512x768             | 1280x1280                | 1400x1400                | 1400x1400                |\n| Dropout          | 0.2                 | ❌                       | ❌                       | ❌                       |\n| Kernel Size      | 3                   | 3                        | 3                        | 3                        |\n| Filter           | [32,64,128,256,512] | [64,128,256,512,768]     | [64,128,256,512,768]     | [64,128,256,512,1024]    |\n| Artifacts        | high                | low                      | low                      | low                      |\n\n[Details about Yolov8](https://github.com/ultralytics/ultralytics/issues/189)\n[Details about Yolov11](https://www.youtube.com/watch?v=L9Va7Y9UT8E)\n\n## 📝 | Cite [This Project](https://universe.roboflow.com/ashu-biqfs/manga-segment)\nIf you use this dataset in a research paper, please cite it using the following BibTeX:\n\n```\n@misc{\n  manga-segment_dataset,\n  title = { manga-segment Dataset },\n  type = { Open Source Dataset },\n  author = { Ashu },\n  howpublished = { \\url{ https://universe.roboflow.com/ashu-biqfs/manga-segment } },\n  url = { https://universe.roboflow.com/ashu-biqfs/manga-segment },\n  journal = { Roboflow Universe },\n  publisher = { Roboflow },\n  year = { 2025 },\n  month = { jan },\n  note = { visited on 2025-01-24 },\n}\n```\n\n## ⚙️ | Requirements\n\n| Program | Version   |\n| ------- | --------  |\n| [Python](https://www.python.org)  | [v3.10.12](https://www.python.org/downloads/release/python-31012/) |\n\n## 💹 | [Production](https://github.com/Ashu11-A/Manga-Segment/tree/main/src) (proxy only)\n\n```sh\n# Install requirements\ncd src\npython3.10 -m venv ./python\nsource python/bin/activate\n\npip install -r requirements.txt\n\nsource python/bin/activate\n\n# Start\npython app.py\n```\n\n## 🐛 | [Develop](https://github.com/Ashu11-A/Manga-Segment/tree/main/training) (training)\n\n### Install requirements\n\n```sh\n# Windows WSL2: https://www.tensorflow.org/install/pip?hl=en#windows-wsl2_1\n# Install CUDA: https://developer.nvidia.com/cuda-downloads\n\nsudo apt install nvidia-cuda-toolkit\nsudo apt install -y python3.10-venv libjpeg-dev zlib1g-dev\n```\n\n### Training\n\n```sh\ncd training\npython3.10 -m venv ./python\nsource python/bin/activate\n\npip install -r requirements.txt\npip install --upgrade pip setuptools wheel\npip install pillow --no-binary :all:\n\nsource python/bin/activate\n```\n\nYolo\n```sh\n# Train normally\npython training/start.py --yolo --size 1400\n\n# Look for the best result\npython training/start.py --yolo --size 1400 --best\n\n# Train on another model\npython training/start.py --yolo --size 1400 --model 10\n\n# Convert model in TensorFlow\npython training/start.py --yolo --size 1400 --model 10 --convert # or only --convert without --model for latest model\n\n# Test Model\npython training/start.py --yolo --size 1400 --model 10 --test # or only --test without --model for latest model\n```\n\nUnet (legacy)\n```sh\n# Look for the best result\npython training/start.py --unet --best\n\n# Run a ready-made script\npython training/start.py --unet\n\n# Convert model in TensorFlow\npython training/start.py --unet --model 3 --convert\n```\n\n##### Saving current Libraries\n\n```sh\npip freeze \u003e requirements.txt \n```\n\n## ⚠️ Error Solutions\n\n#### Error code: ImportError: cannot import name 'shape_poly' from 'jax.experimental.jax2tf'\n\n##### Cause: This error comes from the code itself.\n\n##### Solution:\n[https://github.com/google/jax/issues/18978#issuecomment-1866980463](https://github.com/google/jax/issues/18978#issuecomment-1866980463)\n\n```py\n# Path: lib/python3.10/site-packages/tensorflowjs/converters/jax_conversion.py\n\n# Remove:\nfrom jax.experimental.jax2tf import shape_poly\nPolyShape = shape_poly.PolyShape\n\n# Add:\nfrom jax.experimental.jax2tf import PolyShape\n```\n\n#### Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND\n\n##### Cause: You possibly uninstalled and reinstalled WSL/distribution.\n\n##### Solution:\n\n```sh\n# List the distributions installed by running the following in PowerShell.\nwsl -l\n\n# Unregister the distribution. Replace \"Ubuntu\" below with your distribution name found in Step #1:\nwsl --unregister Ubuntu-22.04\n\n# Launch the Ubuntu (or other distribution) installed via the Microsoft Store\n```\n\n#### Yolo arg --best\n##### Error:\n```\nQObject::moveToThread: Current thread (0x5a75e26f1250) is not the object's thread (0x5a75e21c6fa0).\nCannot move to target thread (0x5a75e26f1250)\n\nqt.qpa.plugin: Could not load the Qt platform plugin \"xcb\" in \"/home/ashu/Documents/GitHub/Manga-Segment/lib/python3.10/site-packages/cv2/qt/plugins\" even though it was found.\nThis application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.\n\nAvailable platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.\n\n```\n\n### Solution:\n[https://github.com/NVlabs/instant-ngp/discussions/300#discussioncomment-3179213](https://github.com/NVlabs/instant-ngp/discussions/300#discussioncomment-3179213)\n```sh\npip uninstall opencv-python\npip install opencv-python-headless\n```\n\n## [YoloV8](https://docs.ultralytics.com/models/yolov8):\n```\n@software{yolov8_ultralytics,\n  author = {Glenn Jocher and Ayush Chaurasia and Jing Qiu},\n  title = {Ultralytics YOLOv8},\n  version = {8.0.0},\n  year = {2023},\n  url = {https://github.com/ultralytics/ultralytics},\n  orcid = {0000-0001-5950-6979, 0000-0002-7603-6750, 0000-0003-3783-7069},\n  license = {AGPL-3.0}\n}\n```\n\n## [YoloV11](https://docs.ultralytics.com/models/yolo11):\n```\n@software{yolo11_ultralytics,\n  author = {Glenn Jocher and Jing Qiu},\n  title = {Ultralytics YOLO11},\n  version = {11.0.0},\n  year = {2024},\n  url = {https://github.com/ultralytics/ultralytics},\n  orcid = {0000-0001-5950-6979, 0000-0002-7603-6750, 0000-0003-3783-7069},\n  license = {AGPL-3.0}\n}\n```\n\n## [U-Net article](https://arxiv.org/abs/1505.04597):\n```\nRonneberger, Olaf, Philipp Fischer, and Thomas Brox.\n\"U-net: Convolutional networks for biomedical image segmentation.\"\nIn International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 234-241. Springer, Cham, 2015.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashu11-a%2Fmanga-segment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashu11-a%2Fmanga-segment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashu11-a%2Fmanga-segment/lists"}