- nouveau module src/scalper/inpaint.py : protocol Inpainter, SimpleInpainter (remplissage par couleur de fond, ex-comportement) et LamaInpainter (big-lama advimman/lama via port ONNX Carve/LaMa-ONNX, onnxruntime CPU) : crop carre 512x512 avec contexte par region, masque polygone OCR (poly) ou rectangle dilate, composite uniquement des pixels masques a la resolution d'origine ; modele telecharge une fois (208 Mo, sha256 verifie) dans SCALPER_LAMA_CACHE, SCALPER_LAMA_MODEL pour un fichier local - selection par SCALPER_INPAINT_ENGINE / --inpaint-engine / "inpaint_engine" (simple|lama|auto, defaut auto = lama si onnxruntime installe) - typeset.py : inpainting de toute l'image via l'Inpainter puis retypographie de la traduction (Pillow) ; ocr.py : PaddleOCR expose le quadrilatere poly - pipeline/cli/server : parametre inpaint_engine cable de bout en bout - packaging : extra .[inpaint-lama] (onnxruntime+numpy), Dockerfile, entrypoint.sh (SCALPER_LAMA_CACHE=/app/data/.lama), docker-compose (SCALPER_INPAINT_ENGINE=lama), .env.example, README - tests : tests/test_inpaint.py (moteurs, masque, crop, telechargement sha256, LaMa avec session factice + test reel optionnel SCALPER_TEST_LAMA_MODEL) Verifie en reel sur une page du out/ : 0 pixel modifie hors masques, contraste du texte efface dans les boites, traduction reinseree par-dessus (~2,2 s/region en CPU). Suite complete : 74 passed, 1 skipped. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
32 lines
958 B
TOML
32 lines
958 B
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "scalper"
|
|
version = "0.1.0"
|
|
description = "Pipeline de scraping et de traduction de chapitres manga/webtoon"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { text = "MIT" }
|
|
dependencies = []
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8"]
|
|
agents = ["mistralai-agents>=1.1"]
|
|
ocr = ["pillow>=10.1", "pytesseract>=0.3.10"]
|
|
ocr-paddle = ["paddlepaddle>=3.0,<3.3", "paddleocr>=3.0"] # paddlepaddle 3.3.x: bug oneDNN ConvertPirAttribute2RuntimeAttribute (Paddle#79749) -> pin <3.3
|
|
inpaint-lama = ["onnxruntime>=1.17", "numpy>=1.24"] # inpainting LaMa (big-lama ONNX, github.com/advimman/lama) pour la suppression du texte
|
|
|
|
[project.scripts]
|
|
scalper = "scalper.cli:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.setuptools.package-data]
|
|
scalper = ["data/demo/*"]
|
|
|
|
[tool.mistralai.agents]
|
|
entrypoint = "scalper.agents.main:agent"
|