An experimental binary image classifier that flags lewd anime images as goonable, otherwise normal. Runs fully client-side in the browser via ONNX Runtime Web.
This model takes a single RGB image and predicts whether it is goonable (lewd/suggestive anime content) or normal. It is intended for lightweight, on-device content filtering and is experimental, not a moderation authority.
The graph is a MobileNetV3-Small (torchvision) convolutional network: an efficient mobile architecture using depthwise-separable convolutions, Squeeze-and-Excitation blocks, and HardSwish/HardSigmoid activations. The final classifier layer was replaced with a 2-output linear head.
| Backbone | torchvision mobilenet_v3_small |
|---|---|
| Graph ops | 52× Conv, 19× HardSwish, 14× Relu, 10× GlobalAveragePool, 9× HardSigmoid, 2× Gemm (122 nodes total) |
| Classifier head | classifier[3] replaced with Linear(in, 2) → 2 logits |
| Parameters | 108 weight tensors · ~5.9 MB on disk (fp32) |
| Input name | input |
|---|---|
| Input shape | [batch, 3, 224, 224], NCHW, float32 |
| Output name | logits |
| Output shape | [batch, 2], raw logits (apply softmax) |
| Class order | 0 = goonable, 1 = normal (alphabetical, torchvision ImageFolder default) |
Each image is transformed to match the training pipeline (standard torchvision / ImageNet):
[0, 1][0.485, 0.456, 0.406], std [0.229, 0.224, 0.225]Inference output logits are passed through softmax to produce class probabilities.
Fine-tuned in PyTorch on Google Colab. Transfer learning from ImageNet-pretrained MobileNetV3-Small, trained iteratively over 6 versions, each run resumed from the previous checkpoint on a freshly reviewed batch of images, accumulating ~16k images total across all versions.
| Base weights | torchvision MobileNet_V3_Small_Weights.DEFAULT (ImageNet), fine-tuned end-to-end |
|---|---|
| Data source | ~16k anime images scraped from the author's Twitter/X liked posts, hand-reviewed and labeled goonable / normal |
| Training scheme | 6 resumed versions, each fine-tuning on a reviewed batch |
| Train / val split | 80 / 20 per run (split-folders, seed 42) |
| Augmentations | Train: RandomResizedCrop(224, scale 0.8–1.0) + RandomHorizontalFlip. Val: Resize(256) → CenterCrop(224). Both: ImageNet normalize. |
| Optimizer / LR | Adam, lr = 1e-4 |
| Loss | CrossEntropyLoss |
| Epochs / batch size | 10 epochs (this resumed run) · batch size 32 |
| Hardware | Google Colab, T4 GPU |
| Export | torch.onnx.export → ONNX (opset 17), input input, output logits |
Measured on the 20% held-out validation split during training.
| Best val accuracy | 83.3% |
|---|---|
| Final train accuracy | ~93–94% (train accuracy outran val → mild overfitting) |
Inference happens entirely in your browser; no image is uploaded. Serve the folder over HTTP and open localhost:
# for example here using python python -m http.server 8000 # open http://localhost:8000