File size: 3,841 Bytes
9b97ce7 38ad94b 9b97ce7 ac83290 d69c210 ac83290 d69c210 ac83290 220c9a9 d69c210 220c9a9 d69c210 4fd92c2 465db25 d69c210 465db25 d69c210 4fd92c2 d69c210 220c9a9 d69c210 ac83290 d69c210 4fd92c2 d69c210 ac83290 d69c210 ac83290 d69c210 4992a96 d69c210 4fd92c2 d69c210 ac83290 9b97ce7 d69c210 ac83290 d69c210 9b97ce7 d69c210 4fd92c2 d69c210 465db25 d69c210 4fd92c2 d69c210 c6a5134 6a1c880 c6a5134 d69c210 4fd92c2 d69c210 4fd92c2 d69c210 465db25 d69c210 4fd92c2 d69c210 4fd92c2 d69c210 | 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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | ---
language:
- en
license: cc-by-nc-4.0
tags:
- clip
- vision
- multimodal
- youtube
- thumbnail-analysis
pipeline_tag: feature-extraction
---
# TubeCLIP: AI-Driven YouTube Performance Predictor
**TubeCLIP is a fine-tuned variant of CLIP Large designed to analyze YouTube video thumbnails and titles to predict view performance classes.**
### Why?
Content creators and marketers constantly rely on **guesswork, gut feelings, and tedious A/B testing** to figure out which thumbnail and title combination will drive attention.
**TubeCLIP solves this by replacing intuition with data-driven prediction**. By fine-tuning a CLIP model, it evaluates the complex relationship between a thumbnail's visual elements and its title to predict its potential view tier.
**Prediction Demo**
##### (Coming Soon)
### Getting it Running
**Prerequisites**
Before installing, ensure your environment meets the following requirements:
* Python 3.x
* `pytorch-lightning`
* `torchao==0.16.0`
**Installation Guide**
You can install the required dependencies using pip:
```bash
pip install torch pytorch-lightning torchao==0.16.0 huggingface_hub transformers Pillow
```
**Usage & API Examples**
Here is a quick example of how to load the model weights from Hugging Face and run a prediction on your thumbnail and title.
```python
import torch
from huggingface_hub import snapshot_download
from PIL import Image
# 1. Download The Repository
model_path = snapshot_download(repo_id="Krudev/TubeCLIP", local_dir="/TubeCLIP"
)
```
Now run the cli with `predict.py`
```bash
python TubeCLIP.predict.py --model_path "/TubeCLIP/TubeCLIP.ckpt" --input_path "path/to/your/thumbnail/or/directory/of/thumbnails" --title "Your YouTube Video Title!"
```
---
### AI & Technical Specifics
**Performance Metrics & Results**
TubeCLIP achieves **66% accuracy** in classifying video performance across three distinct view tiers:
* **Tier 1:** 10k - 100k views
* **Tier 2:** 100k - 1M views
* **Tier 3:** 1M+ views
#### Evaluation Results
* **Test Loss:** 1.8045
* **Test Accuracy:** 0.6747 (67.47%)
#### Classification Report
| Class | Precision | Recall | F1-Score | Support |
| :--- | :---: | :---: | :---: | :---: |
| **10k-100k** | 0.70 | 0.72 | 0.71 | 1,606 |
| **100k-1M** | 0.61 | 0.59 | 0.60 | 1,608 |
| **1M+** | 0.72 | 0.71 | 0.71 | 1,511 |
| | | | | |
| **Accuracy** | | | **0.67** | 4,725 |
| **Macro Avg** | 0.67 | 0.68 | 0.68 | 4,725 |
| **Weighted Avg** | 0.67 | 0.67 | 0.67 | 4,725 |
<img src="cfmt.png" alt="Confusion Matrix" width="600"/>
**Limitations & Biases**
While the model is highly effective at distinguishing generally "good" (high potential) versus "bad" (low potential) thumbnail/title combinations, it is not an exact view-count calculator. Viewership relies on external factors (channel size, algorithmic luck, trending topics, time of day) that the model cannot see. Expect it to serve as a strong directional compass for A/B testing rather than a perfect view predictor.
**Datasets Used**
The model was trained on a custom-built, highly filtered, and strictly balanced dataset of **30,000 YouTube videos**. This curated dataset ensures the model learns pure visual-textual relationships without being overwhelmed by garbage data.
---
### MORE
**License**
This project is open-source but restricted for commercial use. It is licensed under the **Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)** license. You are free to use, modify, and build upon this tool for personal and research purposes, but you may not use it for commercial gains without permission.
**Support & Contact**
If you encounter bugs, have questions, or want to discuss collaboration, feel free to reach out:
* **Email:** krishnenduk462@gmail.com
* **X (Twitter):** @krishnendw
* **Instagram:** @contentbykrishnendu
|