--- 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} } ```