Commit
•
7ccab00
1
Parent(s):
a9f625a
Upload metadata.parquet (#1)
Browse files- Upload metadata.parquet (8d4847322d839dfb5695e308d963d0d3aebfb643)
- Update README.md (7dc9fef5c161095d52a0a280569ef34158e7cb4f)
- Update README.md (d1b052bcd7d5383ba047bccd7f833716d3ecd774)
- Create LICENSE (509b742f2c6fde8cc28d783db0e609fc49640116)
- Update README.md (d3e89f0d9e54c653ca3b8a0851a700a71b9d7869)
Co-authored-by: AngelBottomless@aria4th <AngelBottomless@users.noreply.huggingface.co>
- LICENSE +26 -0
- README.md +139 -2
- metadata.parquet +3 -0
LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License-Minimal-Modified
|
2 |
+
====================================
|
3 |
+
Copyright (c) 2024 **NoCopyright**
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this dataset and associated documentation files (the "Dataset"), subject to the following conditions:
|
6 |
+
|
7 |
+
1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Dataset.
|
8 |
+
|
9 |
+
2. Users must possess sufficient knowledge and expertise to use the Dataset appropriately. Any derived works or outputs are the sole responsibility of the user.
|
10 |
+
|
11 |
+
3. PROHIBITED USES:
|
12 |
+
- Using the Dataset or its outputs for harassment, threats, or intimidation
|
13 |
+
- Spreading false or misleading information
|
14 |
+
- Any use intended to cause harm to individuals, organizations, or society
|
15 |
+
- Generating content that violates applicable laws or regulations
|
16 |
+
- Modifying content for controversial materials against ethical guidelines
|
17 |
+
- Any use that incites hate, violence, or discrimination
|
18 |
+
|
19 |
+
4. Users explicitly agree to:
|
20 |
+
- Adhere to all conditions specified in this LICENSE
|
21 |
+
- Take full responsibility for Dataset usage and resulting consequences
|
22 |
+
- Comply with the opt-out policy of the original booru database
|
23 |
+
|
24 |
+
5. THE DATASET IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATASET OR THE USE OR OTHER DEALINGS IN THE DATASET.
|
25 |
+
|
26 |
+
6. Users agree to indemnify and hold harmless the creators against any claims, damages, or liabilities arising from their use of the Dataset.
|
README.md
CHANGED
@@ -18,8 +18,145 @@ annotations_creators:
|
|
18 |
source_datasets:
|
19 |
- danbooru
|
20 |
---
|
|
|
21 |
|
22 |
-
|
|
|
|
|
23 |
|
24 |
-
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
source_datasets:
|
19 |
- danbooru
|
20 |
---
|
21 |
+
# 🎨 Danbooru2024 Dataset
|
22 |
|
23 |
+
![Dataset Size](https://img.shields.io/badge/Images-6.5M-blue)
|
24 |
+
![Language](https://img.shields.io/badge/Languages-EN%20|%20JA-green)
|
25 |
+
![Category](https://img.shields.io/badge/Category-Image%20Classification-orange)
|
26 |
|
27 |
+
## 📊 Dataset Overview
|
28 |
|
29 |
+
The **Danbooru2024** dataset is a comprehensive collection focused on animation and illustration artwork, derived from the official Danbooru platform. It contains approximately **6.5 million high-quality, user-annotated images** with corresponding tags and textual descriptions.
|
30 |
+
|
31 |
+
This dataset is filtered from an original set of **8.3 million entries**, excluding NSFW-rated, **opt-out** entries to create a more accessible and audience-friendly resource. It addresses the challenges associated with overly crawled booru databases by providing a curated and well-structured solution.
|
32 |
+
|
33 |
+
## ✨ Features
|
34 |
+
|
35 |
+
### 📋 Metadata Support
|
36 |
+
Includes a Parquet format metadata.
|
37 |
+
|
38 |
+
Example code for usage:
|
39 |
+
```python
|
40 |
+
# install necessary packages, you can choose pyarrow or fastparquet
|
41 |
+
#%pip install pandas pyarrow
|
42 |
+
|
43 |
+
from tqdm.auto import tqdm
|
44 |
+
import pandas as pd
|
45 |
+
tqdm.pandas() # register progress_apply
|
46 |
+
|
47 |
+
# read parquet file
|
48 |
+
df = pd.read_parquet('metadata.parquet')
|
49 |
+
print(df.head()) # check the first 5 rows
|
50 |
+
|
51 |
+
#print(df.columns) # you can check the columns of the dataframe
|
52 |
+
necessary_rows = [
|
53 |
+
"created_at", "score", "rating", "tag_string", "up_score",
|
54 |
+
"down_score", "fav_count"
|
55 |
+
]
|
56 |
+
df = df[necessary_rows] # shrink the dataframe to only necessary columns
|
57 |
+
df['created_at'] = pd.to_datetime(df['created_at']) # convert to datetime
|
58 |
+
|
59 |
+
datetime_start = pd.Timestamp('2007-01-01', tz='UTC')
|
60 |
+
datetime_end = pd.Timestamp('2008-01-01', tz='UTC')
|
61 |
+
subdf = df[(df['created_at'] >= datetime_start) &
|
62 |
+
(df['created_at'] < datetime_end)]
|
63 |
+
|
64 |
+
# count some rating
|
65 |
+
print(subdf['rating'].value_counts())
|
66 |
+
# export subdataframe
|
67 |
+
subdf.to_parquet('metadata-2007.parquet')
|
68 |
+
```
|
69 |
+
|
70 |
+
### 📥 Partial Downloads
|
71 |
+
To simplify downloading specific entries, use the **[CheeseChaser](https://github.com/deepghs/cheesechaser)** library:
|
72 |
+
|
73 |
+
```python
|
74 |
+
#%pip install cheesechaser # >=0.2.0
|
75 |
+
from cheesechaser.datapool import Danbooru2024SfwDataPool
|
76 |
+
from cheesechaser.query import DanbooruIdQuery
|
77 |
+
|
78 |
+
pool = Danbooru2024SfwDataPool()
|
79 |
+
#my_waifu_ids = DanbooruIdQuery(['surtr_(arknights)', 'solo'])
|
80 |
+
# above is only available when Danbooru is accessible, if not, use following:
|
81 |
+
import pandas as pd
|
82 |
+
|
83 |
+
# read parquet file
|
84 |
+
df = pd.read_parquet('metadata.parquet',
|
85 |
+
columns=['id', 'tag_string']) # read only necessary columns
|
86 |
+
|
87 |
+
#surtr_(arknights) -> gets interpreted as regex so we need to escape the brackets
|
88 |
+
subdf = df[df['tag_string'].str.contains('surtr_\\(arknights\\)') &
|
89 |
+
df['tag_string'].str.contains('solo')]
|
90 |
+
ids = subdf.index.tolist()
|
91 |
+
print(ids[:5]) # check the first 5 ids
|
92 |
+
|
93 |
+
# download danbooru images with surtr+solo, to directory /data/exp2_surtr
|
94 |
+
pool.batch_download_to_directory(
|
95 |
+
resource_ids=ids,
|
96 |
+
dst_dir='/data/exp2_surtr',
|
97 |
+
max_workers=12,
|
98 |
+
)
|
99 |
+
```
|
100 |
+
# Terms and Conditions for Dataset Use
|
101 |
+
|
102 |
+
## General Use Requirements
|
103 |
+
- **User Responsibility**:
|
104 |
+
Users must possess sufficient knowledge and expertise to use the dataset appropriately. Any derived works or outputs created using the dataset are the sole responsibility of the user. The creators of the dataset do not offer any guarantees or warranties regarding the outcomes or uses of such derived works.
|
105 |
+
|
106 |
+
## License Agreement
|
107 |
+
- **Mandatory Agreement**:
|
108 |
+
Usage of this dataset is contingent upon the user’s acceptance of the associated LICENSE terms. Without agreement, users are prohibited from utilizing the dataset.
|
109 |
+
|
110 |
+
- **Modifications and Updates**:
|
111 |
+
The dataset may be subject to updates or changes over time. These modifications are governed by the same LICENSE terms and conditions.
|
112 |
+
|
113 |
+
- **Opt-Out Compliance**:
|
114 |
+
The dataset aligns with the opt-out policy of the original booru database. If applicable, any modifications to this policy will be reflected and respected in the dataset.
|
115 |
+
|
116 |
+
## Prohibited Uses
|
117 |
+
The dataset explicitly prohibits the following activities:
|
118 |
+
|
119 |
+
1. **Harmful or Malicious Activities**:
|
120 |
+
- Using the dataset or its outputs to harass, threaten, or intimidate individuals or groups.
|
121 |
+
- Spreading false or misleading information.
|
122 |
+
- Any use intended to cause harm to individuals, organizations, or society.
|
123 |
+
|
124 |
+
2. **Illegal Activities**:
|
125 |
+
- Generating content or outputs that violate local, national, or international laws.
|
126 |
+
- Any use that breaches applicable regulations or promotes unlawful actions.
|
127 |
+
|
128 |
+
3. **Unethical or Offensive Content Modification**:
|
129 |
+
- Modified for producing controversial materials that go against ethical guidelines or community standards.
|
130 |
+
- Any use that could incite hate, violence, or discrimination.
|
131 |
+
|
132 |
+
## User Agreement and Acknowledgment
|
133 |
+
By using this dataset, users explicitly agree to:
|
134 |
+
- Adhere to the conditions specified in the LICENSE.
|
135 |
+
- Take full responsibility for how the dataset and its outputs are utilized, including any consequences resulting from their use.
|
136 |
+
|
137 |
+
## Disclaimer
|
138 |
+
- **No Warranties**:
|
139 |
+
The creators of the dataset provide it "as is" and make no warranties regarding the dataset's quality, reliability, or fitness for any particular purpose.
|
140 |
+
|
141 |
+
- **Indemnification**:
|
142 |
+
Users agree to indemnify and hold harmless the creators against any claims, damages, or liabilities arising from their use of the dataset.
|
143 |
+
|
144 |
+
## 🏷️ Dataset Information
|
145 |
+
|
146 |
+
- **License**: Other
|
147 |
+
- **Task Categories**:
|
148 |
+
- Image Classification
|
149 |
+
- Zero-shot Image Classification
|
150 |
+
- Text-to-Image
|
151 |
+
- **Languages**:
|
152 |
+
- English
|
153 |
+
- Japanese
|
154 |
+
- **Tags**:
|
155 |
+
- Art
|
156 |
+
- Anime
|
157 |
+
- **Size Category**: 1M < n < 10M
|
158 |
+
- **Annotation Creators**: No annotation
|
159 |
+
- **Source Datasets**: [Danbooru](danbooru.donmai.us)
|
160 |
+
|
161 |
+
---
|
162 |
+
*Note: This dataset is provided for research and development purposes. Please ensure compliance with all applicable usage terms and conditions.*
|
metadata.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8cc44aee3237b4c51e44da499208ec0214650cce7e34ab669dbcbc006fad151b
|
3 |
+
size 5520278642
|