数据集:

FredZhang7/anime-prompts-180K

英文

有关数据收集和预处理算法的更多信息,请参阅 Fast Anime PromptGen

80K个独特提示

  • safebooru_clean:来自Safebooru API的得分≥8的清理提示

有关Danbooru数据的免责声明,请参阅 Danbooru Tag Generator

100K个独特提示(每个)

  • danbooru_raw:来自Danbooru API的得分≥3的原始提示
  • danbooru_clean:来自Danbooru API的得分≥3的清理提示

Python

将数据集下载并保存到本地的anime_prompts.csv文件中。

pip install datasets
import csv
import datasets

dataset = datasets.load_dataset("FredZhang7/anime-prompts-180K")

train = dataset["train"]
safebooru_clean = train["safebooru_clean"]
danbooru_clean = train["danbooru_clean"]
danbooru_raw = train["danbooru_raw"]

with open("anime_prompts.csv", "w") as f:
    writer = csv.writer(f)
    writer.writerow(["safebooru_clean", "danbooru_clean", "danbooru_raw"])
    for i in range(len(safebooru_clean)):
        writer.writerow([safebooru_clean[i], danbooru_clean[i], danbooru_raw[i]])