Ashu11-A / Manga-Convert

manga converter in dark mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ML] Manga (Dark Mode)

license-info stars-infoa

Last-Comitt Comitts Year reposize-info

📃 | Description

Um simples projeto feito em Python (training) e TypeScript (proxy/tests) para remover o background de mangas. Fiz isso, pois leio mangas majoritariamente a noite.

Input Output
Input Output

Esse projeto usa U-Net, e foi implementado usando Tensorflow.

U-Net article:

Ronneberger, Olaf, Philipp Fischer, and Thomas Brox.
"U-net: Convolutional networks for biomedical image segmentation."
In International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 234-241. Springer, Cham, 2015.

⚙️ | Requirements

Program Vesion
Nodejs v21.5.0
Python v3.10.12

💹 | Production (only proxy)

# Install fnm
apt install -y curl unzip

curl -fsSL https://fnm.vercel.app/install | bash
# rode o retorno do fnm, no meu caso:
# export PATH="/home/ashu/.local/share/fnm:$PATH"
eval "$(fnm env --use-on-cd)"
fnm install
fnm use

npm install

# For ARM64
npm rebuild @tensorflow/tfjs-node --build-from-source

# Start
npm run production

🐛 | Develop (training)

Install requirements

# Windowns WSL2: https://www.tensorflow.org/install/pip?hl=pt-br#windows-wsl2_1
# Install cuda: https://developer.nvidia.com/cuda-downloads

sudo apt install nvidia-cuda-toolkit
sudo apt install -y python3.10-venv libjpeg-dev zlib1g-dev
python3.10 -m venv ./
source bin/activate

pip install -r requirements.txt
pip install --upgrade pip setuptools wheel
pip install pillow --no-binary :all:

Training

# Active venv
source bin/activate

# Look for the best result.
python training/start.py --unet --best

# Run a ready-made script.
python training/start.py --unet
Saving current Libs
pip freeze > .\requirements.txt

Soluções de Erros

Error code: ImportError: cannot import name 'shape_poly' from 'jax.experimental.jax2tf'

Causa: Esse erro é do próprio código.

Solução:

# Path: lib/python3.10/site-packages/tensorflowjs/converters/jax_conversion.py

# Remove:
from jax.experimental.jax2tf import shape_poly
PolyShape = shape_poly.PolyShape

# Add:
from jax.experimental.jax2tf import PolyShape
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND

Causa: Possivelmente você desistalou e reinstalou o wsl/distro.

Solução:

# List the distributions installed, by running following in PowerShell.
wsl -l

# Unregister the distribution. Replace the "Ubuntu" below with your distribution name found in Step #1:
wsl --unregister Ubuntu-22.04

# Launch the Ubuntu (or other distribution) which was installed using Microsoft Store

About

manga converter in dark mode

License:MIT License


Languages

Language:Python 53.2%Language:TypeScript 45.7%Language:Shell 1.1%