Instructions to use HaseLab/mahjong-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use HaseLab/mahjong-models with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("HaseLab/mahjong-models") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Keep three production model artifacts
Browse files- README.md +0 -42
- classifier/best_mahjong_resnet50.pt → classifier-resnet50.pt +0 -0
- classifier/.gitkeep +0 -1
- classifier/resnet50.pt +0 -3
- detection/.gitkeep +0 -1
- grouping/.gitkeep +0 -1
- grouping/best40.pt +0 -3
- grouping/region-yolo26n-seg.pt → regions-yolo-26n.pt +0 -0
- grouping/tile-yolo26n-seg.pt → tile-yolo-26n.pt +0 -0
README.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: other
|
| 3 |
-
library_name: pytorch
|
| 4 |
-
tags:
|
| 5 |
-
- mahjong
|
| 6 |
-
- object-detection
|
| 7 |
-
- image-segmentation
|
| 8 |
-
- image-classification
|
| 9 |
-
---
|
| 10 |
-
|
| 11 |
-
# Mahjong recognition models
|
| 12 |
-
|
| 13 |
-
Model artifacts selected from the `HaseLab/mahjong-cg` training runs.
|
| 14 |
-
|
| 15 |
-
| File | Role |
|
| 16 |
-
|---|---|
|
| 17 |
-
| `grouping/region-yolo26n-seg.pt` | First-stage YOLO26n segmentation model for hand, discard, meld, dora, riichi, and table regions |
|
| 18 |
-
| `grouping/tile-yolo26n-seg.pt` | Second-stage single-class YOLO26n segmentation model for tiles inside region crops |
|
| 19 |
-
| `classifier/resnet50.pt` | Legacy 38-output ResNet-50 tile-face classifier |
|
| 20 |
-
| `classifier/best_mahjong_resnet50.pt` | Copy of the legacy ResNet-50 checkpoint retained under its original artifact name |
|
| 21 |
-
| `grouping/best40.pt` | Legacy 40-class model retained under its original artifact name |
|
| 22 |
-
|
| 23 |
-
The current two-stage pipeline uses:
|
| 24 |
-
|
| 25 |
-
1. `grouping/region-yolo26n-seg.pt`
|
| 26 |
-
2. `grouping/tile-yolo26n-seg.pt`
|
| 27 |
-
3. `classifier/resnet50.pt`
|
| 28 |
-
|
| 29 |
-
The legacy ResNet checkpoint has 38 outputs without embedded class metadata.
|
| 30 |
-
Its output indices follow lexicographic ImageFolder order:
|
| 31 |
-
|
| 32 |
-
```text
|
| 33 |
-
0m, 0p, 0s, 0z, 1m, 1p, 1s, 1z, ... , 9m, 9p, 9s
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
New classifier checkpoints produced by `mahjong-cg` contain an explicit
|
| 37 |
-
`classes` array and include the `back` class.
|
| 38 |
-
|
| 39 |
-
## Source
|
| 40 |
-
|
| 41 |
-
Training and inference code:
|
| 42 |
-
https://github.com/haselab-dev/mahjong-cg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classifier/best_mahjong_resnet50.pt → classifier-resnet50.pt
RENAMED
|
File without changes
|
classifier/.gitkeep
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
|
|
|
|
|
|
classifier/resnet50.pt
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:96dd30bed30d51990c9ab577845aa1f2e79ca3374c33e3429a42be608cf50593
|
| 3 |
-
size 94668627
|
|
|
|
|
|
|
|
|
|
|
|
detection/.gitkeep
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
|
|
|
|
|
|
grouping/.gitkeep
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
|
|
|
|
|
|
grouping/best40.pt
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:4b03756cbc5caaec5b7d6a43951c96dd33de93798f844b6f25e275d23553ac46
|
| 3 |
-
size 25383257
|
|
|
|
|
|
|
|
|
|
|
|
grouping/region-yolo26n-seg.pt → regions-yolo-26n.pt
RENAMED
|
File without changes
|
grouping/tile-yolo26n-seg.pt → tile-yolo-26n.pt
RENAMED
|
File without changes
|