Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- Hemg/AI-Generated-vs-Real-Images-Datasets
|
4 |
+
metrics:
|
5 |
+
- accuracy
|
6 |
+
base_model:
|
7 |
+
- microsoft/resnet-50
|
8 |
+
pipeline_tag: image-classification
|
9 |
+
tags:
|
10 |
+
- art
|
11 |
+
---
|
12 |
+
|
13 |
+
# Multi-Task Image Classifier
|
14 |
+
|
15 |
+
|
16 |
+
## Model Overview
|
17 |
+
This model is a **Multi-Task Image Classifier** that performs two tasks simultaneously:
|
18 |
+
1. **Object Recognition:** Identifies the primary object in an image (e.g., "cat," "dog," "car," etc.).
|
19 |
+
2. **Authenticity Classification:** Determines whether the image is AI-generated or a real photograph.
|
20 |
+
|
21 |
+
The model uses a ResNet-50 backbone with two heads: one for multi-class object recognition (trained on pseudo-labels generated by a Vision Transformer) and another for binary classification (AI-generated vs. Real). It was trained on a subset of the [Hemg/AI-Generated-vs-Real-Images-Datasets](https://huggingface.co/datasets/Hemg/AI-Generated-vs-Real-Images-Datasets).
|
22 |
+
|
23 |
+
## Intended Use
|
24 |
+
This model is designed for:
|
25 |
+
- **Digital Content Verification:** Detecting AI-generated images to prevent misinformation.
|
26 |
+
- **Social Media Moderation:** Automatically flagging images that are likely AI-generated.
|
27 |
+
- **Content Analysis:** Helping researchers understand the prevalence of AI art versus real images.
|
28 |
+
|
29 |
+
## How to Use
|
30 |
+
You can use this model locally or via a Hugging Face Space. For local usage, load the state dictionary into the model architecture using PyTorch. For example:
|
31 |
+
```python
|
32 |
+
import torch
|
33 |
+
from model import MultiTaskModel # your model definition
|
34 |
+
|
35 |
+
model = MultiTaskModel(...)
|
36 |
+
model.load_state_dict(torch.load("multitask_model_weights.pth", map_location="cpu"))
|
37 |
+
model.eval()
|