mahjong_soul_vision (ONNX)
An ONNX export of pjura/mahjong_soul_vision, a ViT-base image classifier its author fine-tuned to tell the 34 Japanese mahjong tile kinds apart on Mahjong Soul screen crops. Hosted here because the original repository only has PyTorch weights; it is used by an offline mahjong study aid that reads the game window and never touches the game.
Changes from the original
- Exported from revision
ea01ca0bcb9be0fc10a5fa09ee8356770c25adc5withtorch.onnx.export(opset 18, dynamic batch axis). The weights are not changed, retrained or quantized. - On 2989 tile crops the ONNX model and the original PyTorch model give the same answer for every crop; the largest logit difference is 4e-5.
Input and output
pixel_values: float32[batch, 3, 224, 224]. Resize the RGB crop to 224x224 with Pillow's bilinear filter, then scale each value asv / 127.5 - 1(seepreprocessor_config.json).logits: float32[batch, 34], in the order ofid2labelinconfig.json(n= characters,p= circles,b= bamboo;ew sw ww nwwinds;wd gd rddragons). There is no red-five class.
Files
| File | SHA-256 |
|---|---|
model.onnx |
07fd9d39409ff453d6ad06bc83be3f74aa359b24365f5cd70c839237c0fab239 |
config.json |
086fd81a962469a0feed7b117f389062ab88287a0996425ac6af2faa49562543 |
preprocessor_config.json |
a34861a24e781942424ad790b82bc99348404a2e64ea882de88c40905851698d |
License and training data
Apache License 2.0, as the original model; see LICENSE. The model was trained by its
original author on screenshots of the game Mahjong Soul
(pjura/mahjong_souls_tiles).
The game art belongs to its owners. This repository contains no images. If you hold rights
to the game and want it removed, open a discussion and it will be taken down.