File size: 7,087 Bytes
a1f8feb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
license: other
license_name: mixed-see-model-card
license_link: LICENSE
tags:
  - concept-erasure
  - machine-unlearning
  - evaluation
  - image-classification
  - diffusion-models
  - EMMA
library_name: pytorch
---

# EMMA β€” Classifier / Evaluation Checkpoints

Evaluation-only classifier checkpoints used by the **EMMA** concept-erasure benchmark
([github.com/lobsterlulu/EMMA](https://github.com/lobsterlulu/EMMA/tree/main/classifier)).


---

## Contents

The directory layout mirrors `classifier/` in the GitHub repo, so files can be dropped
straight into a clone.

### `Diffusion-MU-Attack/` β€” art-style classifier

ViT (`ViTForImageClassification`) fine-tuned over **129 artist styles**
(`Unknown Artist`, `boris-kustodiev`, `ivan-shishkin`, `amedeo-modigliani`, …).
Consumed by `src/utils/metrics/style_eval.py` via a πŸ€— `image-classification` pipeline.

| File | Size | Needed for inference |
|---|---:|:--:|
| `classifier/checkpoint-2800/pytorch_model.bin` | 328 MB | **yes** |
| `classifier/checkpoint-2800/config.json` | 8 KB | **yes** |
| `classifier/checkpoint-2800/preprocessor_config.json` | 512 B | **yes** |
| `classifier/checkpoint-2800/optimizer.pt` | 656 MB | no β€” resume only |
| `classifier/checkpoint-2800/scheduler.pt` | 623 B | no β€” resume only |
| `classifier/checkpoint-2800/scaler.pt` | 559 B | no β€” resume only |
| `classifier/checkpoint-2800/rng_state.pth` | 15 KB | no β€” resume only |
| `classifier/checkpoint-2800/training_args.bin` | 3.3 KB | no β€” resume only |
| `classifier/checkpoint-2800/trainer_state.json` | 41 KB | no β€” resume only |

If you only want to run evaluation, fetch `pytorch_model.bin` + the two JSON configs
(~328 MB) and skip `optimizer.pt` entirely β€” it is a third of this repo's total size.

Upstream: [OPTML-Group/Diffusion-MU-Attack](https://github.com/OPTML-Group/Diffusion-MU-Attack) (MIT) Β·
[paper](https://arxiv.org/abs/2310.11868)

### `GCD/` β€” celebrity face recognition

Giphy Celebrity Detector: MTCNN face detection followed by a fine-tuned ResNet identity
head over **2306 celebrity labels**.

| File | Size |
|---|---:|
| `resources/face_recognition/best_model_states.pkl` | 289 MB |
| `resources/face_recognition/labels.csv` | 66 KB |

The MTCNN weights (`resources/face_detection/det{1,2,3}.npy`) are small and already
committed as plain files on GitHub β€” they are not duplicated here.

Upstream: [Giphy/celeb-detection-oss](https://github.com/Giphy/celeb-detection-oss) (MPL-2.0 per upstream)

### `ML_Decoder/` β€” object / NSFW multi-label classification

| File | Size | Classes | Notes |
|---|---:|---:|---|
| `models_zoo/tresnet_l_COCO__448_90_0.pth` | 197 MB | 80 | MS-COCO, mAP 90.0 @ 448px. **This is the checkpoint `infer_nsfw.py` defaults to.** |
| `tresnet_l.pth` | 192 MB | 9605 | TResNet-L Open Images backbone (`ltresnet_v2`, bottleneck head, epoch 37) |
| `models_zoo/tresnet_l_stanford_card_96.41.pth` | 197 MB | 196 | Stanford Cars, 96.41%. Not used by the EMMA evaluation paths β€” included for completeness. |

> Note: `infer.py` ships with `--model-path` defaulting to
> `./models_local/TRresNet_L_448_86.6.pth`, a path that does not exist in the repo. Pass
> `--model-path models_zoo/tresnet_l_COCO__448_90_0.pth` explicitly.

Upstream: [Alibaba-MIIL/ML_Decoder](https://github.com/Alibaba-MIIL/ML_Decoder) (MIT) Β·
[paper](https://arxiv.org/abs/2111.12933)

### `YOLO/` β€” brand-logo classification (copyright domain)

| File | Size | Classes | What it is |
|---|---:|---:|---|
| `model/logo_yolo11s_30cls.pt` | 11 MB | **30** | **The EMMA-trained logo classifier.** Fine-tuned from `yolo11s-cls.pt`, 100 epochs, 224Γ—224. |
| `model/yolo11n-cls.pt` | 5.6 MB | 1000 | stock Ultralytics ImageNet-1k |
| `model/yolo11s-cls.pt` | 13 MB | 1000 | stock Ultralytics ImageNet-1k |
| `model/yolo11x-cls.pt` | 57 MB | 1000 | stock Ultralytics ImageNet-1k |
| `model/yolov8n.pt` | 6.3 MB | 80 | stock Ultralytics COCO detector |

⚠️ **Read this if you are reproducing the copyright / logo results.** The four
`yolo11*-cls.pt` / `yolov8n.pt` files are unmodified Ultralytics *pretrained* weights β€”
they predict ImageNet or COCO classes, not brands. They are the starting point for
training, not the evaluator. `classifier/YOLO/run.py` defaults to whichever `.pt` in
`model/` is largest (preferring `yolo11x-cls`), which will silently give you ImageNet
predictions. Use the fine-tuned model explicitly:

```bash
python run.py --image_dir /path/to/images --model_path model/logo_yolo11s_30cls.pt
```

The 30 brand classes:

```
ASUS, Adidas SB, Apple, Asics, BMW, Barbie, Canon, Chevrolet, Colgate, Converse,
GUINNESS, Gap, Gillette, HTC, Heineken, Hot Wheels, Lacoste, Lamborghini, Marvel,
McDonald's, lexus, michelin, nestle, neutrogena, nivea, oakley, pantene, play-doh,
spalding, under armour
```

Framework: [ultralytics/ultralytics](https://github.com/ultralytics/ultralytics) (AGPL-3.0)

---

## Download

### Everything (~1.9 GB)

```bash
pip install -U huggingface_hub
hf download weilulobster/EMMA-classifier-weights --local-dir ./emma-weights
```

### Into an existing EMMA clone

The helper script in the GitHub repo places every file at its expected path:

```bash
git clone https://github.com/lobsterlulu/EMMA.git
cd EMMA/classifier
python download_weights.py              # inference-only set, ~1.2 GB
python download_weights.py --all        # include optimizer/scheduler state, ~1.9 GB
python download_weights.py --group yolo # one component only
python download_weights.py --verify     # re-check sha256 of what is on disk
```

### Individual files

```python
from huggingface_hub import hf_hub_download

p = hf_hub_download(
    "weilulobster/EMMA-classifier-weights",
    "ML_Decoder/models_zoo/tresnet_l_COCO__448_90_0.pth",
)
```

Every file's SHA-256 is recorded in [`SHA256SUMS`](SHA256SUMS):

```bash
cd emma-weights && sha256sum -c SHA256SUMS
```

---

## Licensing

This repository redistributes weights from several upstream projects; each retains its
original license. There is no single license covering the whole repo.

| Component | Origin | License |
|---|---|---|
| `Diffusion-MU-Attack/` | OPTML-Group/Diffusion-MU-Attack | MIT |
| `ML_Decoder/` | Alibaba-MIIL/ML_Decoder | MIT |
| `GCD/` | Giphy/celeb-detection-oss | MPL-2.0 (per upstream) |
| `YOLO/` stock weights | Ultralytics | AGPL-3.0 |
| `YOLO/model/logo_yolo11s_30cls.pt` | EMMA authors, fine-tuned from Ultralytics `yolo11s-cls.pt` | AGPL-3.0 (inherits) |

Brand names in the logo classifier's label set are trademarks of their respective owners
and appear only as class identifiers for research evaluation.

The celebrity recognition model carries the biases and consent limitations of its
upstream training data. It is provided for reproducing erasure-benchmark numbers, not for
identifying people in the wild.

## Citation

If you use these checkpoints, please cite EMMA and the upstream classifier papers listed
above.

```bibtex
@misc{emma,
  title  = {EMMA},
  author = {Lu, Wei and others},
  year   = {2026},
  url    = {https://github.com/lobsterlulu/EMMA}
}
```