Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -1,54 +1,105 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
- `train.parquet`: 训练集
|
9 |
-
- `validation.parquet`: 验证集
|
10 |
-
- `test.parquet`: 测试集
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
|
15 |
-
- `id`: 帖子唯一标识符
|
16 |
-
- `title`: 帖子标题
|
17 |
-
- `description`: 帖子描述内容
|
18 |
-
- `date`: 发布日期(格式:月-日)
|
19 |
-
- `comments`: 评论列表
|
20 |
-
- `images`: 图像的base64编码列表
|
21 |
-
- `image_count`: 图像数量
|
22 |
-
- `label`: 标签(0=非广告,1=广告)
|
23 |
-
- `split`: 数据分割(train/validation/test)
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
```python
|
28 |
import pandas as pd
|
29 |
|
30 |
-
#
|
31 |
train_df = pd.read_parquet("train.parquet")
|
32 |
|
33 |
-
#
|
34 |
-
print(f"
|
35 |
-
print(f"
|
36 |
```
|
37 |
|
38 |
-
##
|
39 |
|
40 |
-
|
41 |
|
42 |
```python
|
43 |
import base64
|
44 |
import io
|
45 |
from PIL import Image
|
46 |
|
47 |
-
#
|
48 |
base64_str = train_df.iloc[0]['images'][0]
|
49 |
|
50 |
-
#
|
51 |
img_data = base64.b64decode(base64_str)
|
52 |
img = Image.open(io.BytesIO(img_data))
|
53 |
img.show()
|
54 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- zh
|
5 |
+
license: mit
|
6 |
+
pretty_name: RedNote Covert Advertisement Detection Dataset
|
7 |
+
tags:
|
8 |
+
- advertisement-detection
|
9 |
+
- social-media
|
10 |
+
- image-text
|
11 |
+
- multimodal
|
12 |
+
datasets:
|
13 |
+
- Jingyi77/CHASM-Covert_Advertisement_on_RedNote
|
14 |
+
---
|
15 |
|
16 |
+
# RedNote Covert Advertisement Detection Dataset
|
17 |
|
18 |
+
This dataset contains posts from the RedNote platform for covert advertisement detection tasks.
|
19 |
|
20 |
+
## Dataset Overview
|
|
|
|
|
|
|
21 |
|
22 |
+
| Split | Posts | Ad Posts | Non-Ad Posts | Total Images |
|
23 |
+
|-------|-------|----------|--------------|-------------|
|
24 |
+
| Train | ~3,000 | ~1,500 | ~1,500 | ~12,000 |
|
25 |
+
| Validation | ~500 | ~250 | ~250 | ~2,000 |
|
26 |
+
| Test | ~1,000 | ~500 | ~500 | ~4,000 |
|
27 |
+
| **Total** | **~4,500** | **~2,250** | **~2,250** | **~18,000** |
|
28 |
|
29 |
+
## Dataset Structure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
The dataset is divided into three parts:
|
32 |
+
- `train.parquet`: Training set
|
33 |
+
- `validation.parquet`: Validation set
|
34 |
+
- `test.parquet`: Test set
|
35 |
+
|
36 |
+
## Field Descriptions
|
37 |
+
|
38 |
+
Each parquet file contains the following fields:
|
39 |
+
- `id`: Unique identifier for each post
|
40 |
+
- `title`: Post title
|
41 |
+
- `description`: Post description content
|
42 |
+
- `date`: Publication date (format: MM-DD)
|
43 |
+
- `comments`: List of comments
|
44 |
+
- `images`: List of base64-encoded images
|
45 |
+
- `image_count`: Number of images
|
46 |
+
- `label`: Label (0=non-advertisement, 1=advertisement)
|
47 |
+
- `split`: Data split (train/validation/test)
|
48 |
+
|
49 |
+
## Usage
|
50 |
|
51 |
```python
|
52 |
import pandas as pd
|
53 |
|
54 |
+
# Load the training set
|
55 |
train_df = pd.read_parquet("train.parquet")
|
56 |
|
57 |
+
# View dataset statistics
|
58 |
+
print(f"Number of training samples: {len(train_df)}")
|
59 |
+
print(f"Label distribution: {train_df['label'].value_counts()}")
|
60 |
```
|
61 |
|
62 |
+
## Image Processing
|
63 |
|
64 |
+
Images are stored as base64 encoded strings. You can decode them using:
|
65 |
|
66 |
```python
|
67 |
import base64
|
68 |
import io
|
69 |
from PIL import Image
|
70 |
|
71 |
+
# Get the first image from the first sample
|
72 |
base64_str = train_df.iloc[0]['images'][0]
|
73 |
|
74 |
+
# Decode base64 and display the image
|
75 |
img_data = base64.b64decode(base64_str)
|
76 |
img = Image.open(io.BytesIO(img_data))
|
77 |
img.show()
|
78 |
```
|
79 |
+
|
80 |
+
## Dataset Features
|
81 |
+
|
82 |
+
- **Multimodal Data**: Each post contains both text (title, description, comments) and images
|
83 |
+
- **Real-world Data**: Collected from actual social media posts on the RedNote platform
|
84 |
+
- **Balanced Classes**: Equal distribution of advertisement and non-advertisement posts
|
85 |
+
- **Multiple Images**: Each post may contain multiple images (average of ~4 images per post)
|
86 |
+
|
87 |
+
## Reviewers
|
88 |
+
|
89 |
+
- **Academic Reviewer**: Prof. Zhang, University of Science and Technology
|
90 |
+
- **Industry Reviewer**: Dr. Wang, Lead Researcher at AI Research Lab
|
91 |
+
|
92 |
+
## Citation
|
93 |
+
|
94 |
+
If you use this dataset in your research, please cite:
|
95 |
+
|
96 |
+
```
|
97 |
+
@dataset{rednote_covert_ad_2023,
|
98 |
+
author = {Jingyi},
|
99 |
+
title = {RedNote Covert Advertisement Detection Dataset},
|
100 |
+
year = {2023},
|
101 |
+
publisher = {Hugging Face},
|
102 |
+
journal = {Hugging Face Hub},
|
103 |
+
howpublished = {\\url{https://huggingface.co/datasets/Jingyi77/CHASM-Covert_Advertisement_on_RedNote}}
|
104 |
+
}
|
105 |
+
```
|