File size: 2,124 Bytes
0b8f939
 
2d6f30b
 
0b8f939
 
 
 
 
 
 
9067441
2d6f30b
 
 
 
 
 
 
0b8f939
 
9067441
0b8f939
9067441
0b8f939
2d6f30b
df40c6c
0b8f939
 
 
 
2d6f30b
0b8f939
 
 
 
 
 
2d6f30b
0b8f939
 
 
 
 
 
 
2d6f30b
0b8f939
 
2d6f30b
0b8f939
 
 
 
 
 
 
9067441
0b8f939
2d6f30b
0b8f939
 
 
 
9067441
2d6f30b
 
0b8f939
2d6f30b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---

license: mit
library_name: pytorch
pipeline_tag: image-classification
tags:
  - image-to-text
  - ocr
  - cipher
  - moon-cipher
  - pytorch
  - cnn
  - image-classification

# Shown in model card widget (with model.safetensors)
model_size: "13.6M params"
tensor_type: "F32"
format: Safetensors
training_epochs: 150

---


# Moon Cipher Detector (Classifier)

CNN classifier for **moon cipher** glyph recognition: 27 classes (A–Z plus `~`). Input: 128×128 grayscale glyph crop. Use with a detector for full image decoding.

**Model card (right sidebar):** This repo includes **Safetensors** (`model.safetensors`), so the Hub shows **Model size**, **Tensor type (F32)**, and format. Best checkpoint from training (up to 150 epochs).

## Model metadata

| Model | Format | Size | Params | Tensor type |
|-------|--------|------|--------|--------------|
| Classifier (`model.safetensors`) | Safetensors | 51.98 MB | 13,616,347 params | F32 |

## Usage

### 1. Install

```bash

pip install torch torchvision huggingface_hub safetensors

```

### 2. Download from Hugging Face

```python

from huggingface_hub import hf_hub_download



# Safetensors (preferred; used for Hub widget)

model_path = hf_hub_download(

    repo_id="nhellyercreek/moon-cipher-detector",

    filename="model.safetensors"

)

mappings_path = hf_hub_download(

    repo_id="nhellyercreek/moon-cipher-detector",

    filename="mappings.json"

)

```

### 3. Load and run

Use `MoonClassifier` from the Moon-Cipher-Detector repo (`models/moon_classifier.py`). Load Safetensors with `safetensors.torch.load_file(model_path)` and `model.load_state_dict(state_dict)`, or use `best_classifier.pth` with `torch.load(..., weights_only=True)`. Input: 128×128 grayscale glyph crops.

## Config

- **Classes**: 27 (A–Z + `~`)
- **Architecture**: Custom CNN (MoonClassifier), 128×128 input.
- **Format**: Safetensors + PyTorch `.pth`, **tensor type**: F32.
- **Training**: Best checkpoint (up to 150 epochs).

See `config.json` for machine-readable settings (params, size, format, training_epochs).