hongseok-lee's picture
Upload README.md with huggingface_hub
0e7f4b7 verified
---
license: cc-by-nc-4.0
language:
- en
- ko
tags:
- object-detection
- advertising
- computer-vision
- deep-learning
- advertisement
- call-to-action
datasets:
- custom
metrics:
- mAP
- precision
- recall
model-index:
- name: MADUP Ad Action Element Detection
results:
- task:
type: object-detection
name: Object Detection
dataset:
type: custom
name: MADUP Internal Advertisement Dataset
metrics:
- type: mAP
value: 0.81
name: mAP@50
- type: precision
value: 0.83
name: Precision
- type: recall
value: 0.84
name: Recall
---
# MADUP Ad Action Element Detection Model
## Overview
A state-of-the-art deep learning model for detecting call-to-action elements in advertising images, developed by **MADUP** and released as a contribution to the AI research community.
## Performance
**Korea Testing Certification (KOTCA) Certified Performance** on internal dataset:
| Metric | Score | Description |
|--------|-------|-------------|
| **mAP@50** | **0.81** | Industry-leading performance |
| **Precision** | **0.83** | High accuracy in detection |
| **Recall** | **0.84** | Excellent coverage of elements |
| **Optimization Runs** | **211** | Optuna hyperparameter tuning |
## Model Description
This model automatically detects and localizes call-to-action (CTA) elements in advertising images using advanced deep learning techniques. It has been optimized through extensive hyperparameter tuning to achieve superior performance in real-world advertising scenarios.
### Key Features
- **High Performance**: Achieves 0.81 mAP@50 score
- **Extensively Optimized**: 211 Optuna hyperparameter optimization trials
- **Production Ready**: Suitable for real-world advertising analysis and automation
- **Open Source**: Released for research and educational purposes
### Detectable Elements
The model can identify four types of advertising elements:
- **Text**: Advertising copy and call-to-action text
- **Rectangle**: Buttons and clickable areas
- **Banner**: Promotional banners
- **Capsule**: Pill-shaped UI elements
## Quick Start
### Installation
```bash
pip install -r requirements.txt
```
### Basic Usage
```python
from inference import AdElementDetector
# Initialize the detector
detector = AdElementDetector(model_path="best_model.pt")
# Run inference on an image
results = detector.predict("advertisement.jpg")
# Extract bounding boxes
boxes = detector.get_boxes(results)
print(f"Detected {len(boxes)} ad elements")
```
### Command Line Interface
```bash
# Basic inference
python inference.py --image advertisement.jpg
# Save visualization
python inference.py --image advertisement.jpg --save output.jpg
# Adjust confidence threshold
python inference.py --image advertisement.jpg --conf 0.5
```
### Batch Processing
```python
from inference import AdElementDetector
detector = AdElementDetector()
# Process multiple images
image_paths = ["ad1.jpg", "ad2.jpg", "ad3.jpg"]
results = detector.predict_batch(image_paths, batch_size=8)
for img_path, result in zip(image_paths, results):
boxes = detector.get_boxes(result)
print(f"{img_path}: {len(boxes)} detections")
```
## Technical Details
### Architecture
- **Base Model**: Deep Learning Object Detection Architecture
- **Input Size**: 486x486 pixels
- **Training Epochs**: 120
- **Optimization**: 211 Optuna trials for hyperparameter tuning
### Optimized Hyperparameters
```yaml
imgsz: 486
lr0: 0.000515
dropout: 0.1
mixup: 0.15
copy_paste: 0.1
mosaic: 0.0
```
### Model Files
```
β”œβ”€β”€ best_model.pt # Trained model weights (50MB)
β”œβ”€β”€ inference.py # Inference script
β”œβ”€β”€ config.yaml # Model configuration
β”œβ”€β”€ data.yaml # Dataset configuration
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ LICENSE # CC BY-NC 4.0 License
└── README.md # Documentation
```
## Requirements
- Python 3.8+
- PyTorch 1.8+
- CUDA-capable GPU (recommended)
- 4GB+ RAM
### Python Dependencies
```
ultralytics
opencv-python
numpy
```
## License
This model is released under the **Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)** license.
- **Permitted**: Research, education, personal projects
- **Not Permitted**: Commercial use without explicit permission
- **Commercial Inquiries**: pr_chapter@madup.com
## Contributing
MADUP is committed to advancing the field of advertising technology through open research. We welcome contributions from the community.
### Public Contribution Goals
- **Research Support**: Enabling academic research and innovation
- **Industry Advancement**: Driving advertising technology forward
- **Community Growth**: Contributing to the open-source ecosystem
## Citation
If you use this model in your research, please cite:
```bibtex
@misc{madup_ad_detection_2024,
title={MADUP Ad Action Element Detection Model},
author={MADUP Research Team},
year={2024},
publisher={HuggingFace},
note={KOTCA Certified Performance - mAP@50: 0.81}
}
```
## About MADUP
**MADUP** is a leading data-driven advertising technology company specializing in AI-powered advertising optimization solutions.
- **Website**: [https://www.madup.com](https://www.madup.com)
- **Research Team**: pr_chapter@madup.com
- **LinkedIn**: [MADUP Company](https://www.linkedin.com/company/madup)
## Support
- **Bug Reports**: Please use the Issues tab
- **Feature Requests**: Submit a Pull Request
- **General Inquiries**: pr_chapter@madup.com
---
**Built with dedication by MADUP Research Team for the global AI community**