KinkyRaven Latex v1
Real-Time Skin Segmentation Model
2 min readupdated
The Latex v1 model handles per-pixel naked skin segmentation on images and video in real time. The output is a binary skin probability mask built for scenarios like gaming, video playback, and interactive applications. The solution is powered by lightweight MobileNetV4 architectures (efficient computer vision backbones), and training utilized masks from SAM 3.1. The model is distributed in ONNX format (an open standard for deep learning model interchange) in various size and dataset variants, ranging from realistic photos to anime and anthropomorphic art.
Key features
- Real-time performance thanks to efficient MobileNetV4 backbones of various weight classes.
- Support for different domains depending on the data mix: realistic photos, games, anime, and anthropomorphic art.
- Exported to ONNX format with FP16 support (half-precision for accelerated computation) for easy application integration.
- Open KinkyRaven Latex License 1.0 permitting commercial use and modification.
What you can do
- Integrate skin segmentation into game engines or custom clients for real-time frame processing.
- Run inference (the process of applying a trained model) locally using onnxruntime and Python.
- Choose the right speed and accuracy balance: from tiny variants to high-quality resolutions (epic, unfathomable).
Example
import numpy as np, onnxruntime as ort
from PIL import Image
model = "latex/latex_v1_real_small/latex_v1_real_small_640.onnx"
size = 640
img = Image.open("picture.jpg").convert("RGB")
scale = size / max(img.size)
w, h = round(img.width * scale), round(img.height * scale)
x0, y0 = (size - w) // 2, (size - h) // 2
canvas = Image.new("RGB", (size, size), (114, 114, 114))
canvas.paste(img.resize((w, h), Image.BILINEAR), (x0, y0))
x = np.asarray(canvas, np.float32).transpose(2, 0, 1)[None] / 255
skin = ort.InferenceSession(model).run(None, {"images": x})[0][0, 0]
mask = Image.fromarray((skin[y0:y0 + h, x0:x0 + w] > 0.5).astype(np.uint8) * 255).resize(img.size)
mask.save("mask.png")Read more
DetailsIoU metrics (Intersection over Union, a segmentation accuracy score) on real data reach 0.89–0.92 depending on the tier.
Hardware requirements are minimal: the tiny and small versions weigh just 2.6 MB and 14.6 MB in FP16 format.
Limitations: the model may miss small details and fishnets, and can falsely trigger on similarly colored objects like fruit or toys.










Comments