File size: 3,701 Bytes
fa3d113 962d6d5 fa3d113 505cfe7 6ed815c 505cfe7 6ed815c 505cfe7 6ed815c 505cfe7 83c8828 505cfe7 589ea79 505cfe7 589ea79 505cfe7 589ea79 505cfe7 589ea79 505cfe7 589ea79 505cfe7 589ea79 6ed815c 589ea79 9f54355 589ea79 6ed815c 589ea79 83c8828 589ea79 |
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 |
---
datasets:
- Hemg/AI-Generated-vs-Real-Images-Datasets
metrics:
- accuracy
base_model:
- microsoft/resnet-50
pipeline_tag: image-classification
---
# DualSight: A Multi-Task Image Classifier for Object Recognition and Authenticity Verification
## Model Overview
This model is a **Multi-Task Image Classifier** that performs two tasks simultaneously:
1. **Object Recognition:** Identifies the primary objects in an image (e.g., "cat," "dog," "car," etc.) using pseudo-labels generated through a YOLO-based object detection approach.
2. **Authenticity Classification:** Determines whether the image is AI-generated or a real photograph.
The model uses a **ResNet-50** backbone with two heads: one for multi-class object recognition 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) and leverages YOLO for improved pseudo-labeling across the entire dataset.
## Model Details
- **Trained by:** [Abdellahi El Moustapha](https://abmstpha.github.io/)
- **Programming Language:** Python
- **Base Model:** ResNet-50
- **Datasets:** Hemg/AI-Generated-vs-Real-Images-Datasets
- **Library:** PyTorch
- **Pipeline Tag:** image-classification
- **Metrics:** Accuracy for both binary classification and multi-class object recognition
- **Version:** v1.0
## Intended Use
This model is designed for:
- **Digital Content Verification:** Detecting AI-generated images to help prevent misinformation.
- **Social Media Moderation:** Automatically flagging images that are likely AI-generated.
- **Content Analysis:** Assisting researchers in understanding the prevalence of AI art versus real images in digital media.
## How to Use
You can use this model locally or via the provided Hugging Face Space. For local usage, load the state dictionary into the model architecture using PyTorch. For example:
```python
import torch
from model import MultiTaskModel # Your model definition
# Instantiate your model architecture (must match training)
model = MultiTaskModel(...)
# Load the saved state dictionary (trained weights)
model.load_state_dict(torch.load("DualSight.pth", map_location="cpu"))
model.eval()
```
Alternatively, you can test the model directly via our interactive demo:
[Test the Model Here(CLICK)](https://huggingface.co/spaces/Abdu07/DualSight-Demo)
## Training Data and Evaluation
- **Dataset:** The model 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) comprising approximately 152k images.
- **Metrics:**
- **Authenticity (AI vs. Real):** Validation accuracy reached around 85% after early epochs.
- **Object Recognition:** Pseudo-label accuracy started at around 38–40% and improved during training.
- **Evaluation:** Detailed evaluation metrics and loss curves are available in our training logs.
## Limitations and Ethical Considerations
- **Pseudo-Labeling:** The object recognition task uses pseudo-labels generated from a pretrained model, which may introduce noise or bias.
- **Authenticity Sensitivity:** The binary classifier may face challenges with highly realistic AI-generated images.
- **Usage:** This model is intended for research and prototyping purposes. Additional validation is recommended before deploying in high-stakes applications.
## How to Cite
If you use this model, please cite:
```bibtex
@misc{multitask_classifier,
title={Multi-Task Image Classifier},
author={Abdellahi El Moustapha},
year={2025},
howpublished={\url{https://huggingface.co/Abdu07/multitask-model}}
}
```
|