MangaLineExtraction-ONNX
manga line extraction
2 min readupdated
The model extracts structural lines from manga pages, removing screentones and fills while preserving hand-drawn lines. This is the ONNX version of the popular ljsabc/MangaLineExtraction_PyTorch development, converted from the original weights. The model is useful for manga artists, manga translators, and graphics editor developers for automatic scan cleaning.
Key features
- ONNX format: two versions are available — standard fp32 and optimized fp16 with floating point.
- Image processing: accepts grayscale input images with dimensions that are multiples of 16.
- Integration: output values are automatically clipped in the range from 0 to 255 directly within the graph.
- Open license: the project is distributed under the MIT license, matching the original.
What you can do
- Processing tool: embed the ONNX model into your pipeline or application for quick cleaning of manga scans from gray backgrounds and screentones.
- Dataset preparation: use the model to automatically obtain clean line art when creating training sets.
Example
Input data is fed as a tensor of dimension [1, 1, H, W] in the range 0-255 (grayscale), where sides H and W are multiples of 16. The output is an image where lines are marked with zeros and the white background with the value 255.
Read more
DetailsTakes erika.pth weights from the original ljsabc/MangaLineExtraction_PyTorch repository.
Files: line-fp16.onnx (~86.4 MB) and line-fp32.onnx (~172.5 MB).
Both versions successfully pass onnx.checker.check_model verification.
Conversion dependencies: numpy 2.5.5, onnx 1.23.2, onnxruntime 1.32.0.










Comments