Add model card with attribution
Browse files
README.md
CHANGED
|
@@ -1,199 +1,152 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
| 7 |
|
| 8 |
-
|
| 9 |
|
|
|
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 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 |
-
#### Speeds, Sizes, Times [optional]
|
| 98 |
-
|
| 99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 100 |
-
|
| 101 |
-
[More Information Needed]
|
| 102 |
-
|
| 103 |
-
## Evaluation
|
| 104 |
-
|
| 105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 106 |
-
|
| 107 |
-
### Testing Data, Factors & Metrics
|
| 108 |
-
|
| 109 |
-
#### Testing Data
|
| 110 |
-
|
| 111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
### Compute Infrastructure
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Hardware
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
-
|
| 199 |
-
[More Information Needed]
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: dima806/ai_vs_real_image_detection
|
| 4 |
+
tags:
|
| 5 |
+
- image-classification
|
| 6 |
+
- vision
|
| 7 |
+
- ai-detection
|
| 8 |
+
- deepfake-detection
|
| 9 |
+
- vit
|
| 10 |
+
datasets:
|
| 11 |
+
- CIFAKE
|
| 12 |
+
metrics:
|
| 13 |
+
- accuracy
|
| 14 |
+
- f1
|
| 15 |
+
pipeline_tag: image-classification
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# CapCheck AI Image Detection
|
| 19 |
|
| 20 |
+
Vision Transformer (ViT) fine-tuned for detecting AI-generated images.
|
| 21 |
|
| 22 |
+
## Model Lineage & Attribution
|
| 23 |
|
| 24 |
+
This model builds on the work of others:
|
| 25 |
|
| 26 |
+
| Layer | Model | Author | License |
|
| 27 |
+
|-------|-------|--------|---------|
|
| 28 |
+
| Base Architecture | [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) | Google | Apache 2.0 |
|
| 29 |
+
| AI Detection Fine-tune | [dima806/ai_vs_real_image_detection](https://huggingface.co/dima806/ai_vs_real_image_detection) | dima806 | Apache 2.0 |
|
| 30 |
+
| This Model | capcheck/ai-image-detection | CapCheck | Apache 2.0 |
|
| 31 |
|
| 32 |
+
**Special thanks to:**
|
| 33 |
+
- **Google** for the Vision Transformer (ViT) architecture
|
| 34 |
+
- **dima806** for fine-tuning on the CIFAKE dataset for AI image detection
|
| 35 |
|
| 36 |
+
## Model Description
|
| 37 |
|
| 38 |
+
- **Architecture**: ViT-Base (86M parameters)
|
| 39 |
+
- **Input Size**: 224x224 pixels
|
| 40 |
+
- **Training Data**: CIFAKE dataset (AI-generated vs real images)
|
| 41 |
+
- **Task**: Binary classification (Real vs Fake/AI-generated)
|
| 42 |
|
| 43 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
```python
|
| 46 |
+
from transformers import pipeline
|
| 47 |
|
| 48 |
+
detector = pipeline("image-classification", model="capcheck/ai-image-detection")
|
| 49 |
+
result = detector("path/to/image.jpg")
|
| 50 |
|
| 51 |
+
# Output:
|
| 52 |
+
# [{"label": "Fake", "score": 0.95}, {"label": "Real", "score": 0.05}]
|
| 53 |
+
```
|
| 54 |
|
| 55 |
+
## Labels
|
| 56 |
|
| 57 |
+
| Label | Description |
|
| 58 |
+
|-------|-------------|
|
| 59 |
+
| `Real` | Authentic photograph or real-world image |
|
| 60 |
+
| `Fake` | AI-generated or synthetically created image |
|
| 61 |
|
| 62 |
+
## Performance
|
| 63 |
|
| 64 |
+
This model was trained on the CIFAKE dataset. Performance on modern AI generators
|
| 65 |
+
(Flux, Midjourney v6, DALL-E 3, Stable Diffusion 3) may vary.
|
| 66 |
|
| 67 |
+
See [dima806's model card](https://huggingface.co/dima806/ai_vs_real_image_detection)
|
| 68 |
+
for detailed training metrics.
|
| 69 |
|
| 70 |
+
## Limitations
|
| 71 |
|
| 72 |
+
- Trained primarily on older AI generators (pre-2024)
|
| 73 |
+
- May have reduced accuracy on:
|
| 74 |
+
- Very new AI generators not in training data
|
| 75 |
+
- Heavily compressed images (low JPEG quality)
|
| 76 |
+
- Images smaller than 224x224 pixels
|
| 77 |
+
- Works best on images with clear subjects
|
| 78 |
|
| 79 |
+
## Intended Use
|
| 80 |
|
| 81 |
+
- Content moderation and authenticity verification
|
| 82 |
+
- Research into AI-generated content detection
|
| 83 |
+
- Educational purposes
|
| 84 |
|
| 85 |
+
**Not intended for**:
|
| 86 |
+
- Making consequential decisions without human review
|
| 87 |
+
- Law enforcement evidence without corroborating sources
|
| 88 |
|
| 89 |
+
## Ethical Considerations
|
| 90 |
|
| 91 |
+
- This tool is not 100% accurate - false positives harm legitimate creators
|
| 92 |
+
- False negatives can allow misinformation to spread
|
| 93 |
+
- Use in conjunction with other verification methods
|
| 94 |
+
- Human review is recommended for high-stakes decisions
|
| 95 |
|
| 96 |
+
## Roadmap
|
| 97 |
|
| 98 |
+
### Current Version (v1.0.0)
|
| 99 |
|
| 100 |
+
Base model from dima806's CIFAKE-trained ViT. Solid foundation for AI detection.
|
| 101 |
|
| 102 |
+
### Planned Improvements
|
| 103 |
|
| 104 |
+
**Phase 1: Modern Generator Training**
|
| 105 |
+
- Fine-tune on images from Flux, Midjourney v6, DALL-E 3, Stable Diffusion 3
|
| 106 |
+
- Target: Reduce false negatives on 2024+ AI generators
|
| 107 |
|
| 108 |
+
**Phase 2: False Positive Reduction**
|
| 109 |
+
- Curate dataset of real images commonly flagged as AI
|
| 110 |
+
- Photography edge cases: HDR, heavy editing, digital art
|
| 111 |
+
- Target: <5% false positive rate
|
| 112 |
|
| 113 |
+
**Phase 3: Continuous Updates**
|
| 114 |
+
- Quarterly re-training as new generators emerge
|
| 115 |
+
- Community feedback integration
|
| 116 |
+
- Benchmark against latest AI generators
|
| 117 |
|
| 118 |
+
### Contributing
|
| 119 |
|
| 120 |
+
We welcome:
|
| 121 |
+
- Dataset contributions (properly licensed images)
|
| 122 |
+
- Bug reports and false positive/negative examples
|
| 123 |
+
- Benchmark results on new generators
|
| 124 |
|
| 125 |
+
Join the discussion: https://huggingface.co/capcheck/ai-image-detection/discussions
|
| 126 |
|
| 127 |
+
## License
|
| 128 |
|
| 129 |
+
Apache 2.0 (inherited from Google ViT and dima806's fine-tuned model)
|
| 130 |
|
| 131 |
+
## Citation
|
| 132 |
|
| 133 |
+
If you use this model, please cite:
|
| 134 |
|
| 135 |
+
```bibtex
|
| 136 |
+
@misc{capcheck-ai-detection,
|
| 137 |
+
author = {CapCheck},
|
| 138 |
+
title = {AI Image Detection Model},
|
| 139 |
+
year = {2024},
|
| 140 |
+
publisher = {HuggingFace},
|
| 141 |
+
url = {https://huggingface.co/capcheck/ai-image-detection},
|
| 142 |
+
note = {Based on dima806/ai_vs_real_image_detection, fine-tuned from google/vit-base-patch16-224-in21k}
|
| 143 |
+
}
|
| 144 |
+
```
|
| 145 |
|
| 146 |
+
## Changelog
|
| 147 |
|
| 148 |
+
### v1.0.0 (Initial Release)
|
| 149 |
|
| 150 |
+
- Published base model from dima806/ai_vs_real_image_detection
|
| 151 |
+
- Added proper attribution and documentation
|
| 152 |
+
- Established as CapCheck's source of truth for AI image detection
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|