Update artwork_for_sdxl.py
Browse files- artwork_for_sdxl.py +8 -15
artwork_for_sdxl.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# coding=utf-8
|
2 |
-
# Copyright
|
3 |
#
|
4 |
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
# you may not use this file except in compliance with the License.
|
@@ -12,37 +12,32 @@
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
-
"""
|
16 |
|
17 |
import os
|
18 |
|
19 |
import pandas as pd
|
20 |
import datasets
|
21 |
-
from
|
22 |
|
23 |
# from .classes import IMAGENET2012_CLASSES
|
24 |
|
25 |
|
26 |
-
_HOMEPAGE = "https://huggingface.co/datasets/
|
27 |
|
28 |
_CITATION = """\
|
29 |
-
|
30 |
-
title={Learning Robust Global Representations by Penalizing Local Predictive Power},
|
31 |
-
author={Wang, Haohan and Ge, Songwei and Lipton, Zachary and Xing, Eric P},
|
32 |
-
booktitle={Advances in Neural Information Processing Systems},
|
33 |
-
pages={10506--10518},
|
34 |
-
year={2019}
|
35 |
}
|
36 |
"""
|
37 |
|
38 |
_DESCRIPTION = """\
|
39 |
-
Artwork Images, to
|
40 |
"""
|
41 |
|
42 |
_URL = "https://huggingface.co/datasets/wintercoming6/artwork_for_sdxl/resolve/main/metadata.jsonl"
|
43 |
|
44 |
class Artwork(datasets.GeneratorBasedBuilder):
|
45 |
-
"""Artwork Images - a dataset of centuries of Images
|
46 |
|
47 |
def _info(self):
|
48 |
return datasets.DatasetInfo(
|
@@ -53,10 +48,8 @@ class Artwork(datasets.GeneratorBasedBuilder):
|
|
53 |
"image_data": Image,
|
54 |
}
|
55 |
),
|
56 |
-
supervised_keys=("
|
57 |
homepage=_HOMEPAGE,
|
58 |
-
citation=_CITATION,
|
59 |
-
task_templates=[ImageClassification(image_column="image_data", label_column="prompt")],
|
60 |
)
|
61 |
|
62 |
def _split_generators(self, dl_manager):
|
|
|
1 |
# coding=utf-8
|
2 |
+
# Copyright 2024 The HuggingFace Datasets Authors and the current dataset script contributor.
|
3 |
#
|
4 |
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
# you may not use this file except in compliance with the License.
|
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
+
"""Artwork Images - a dataset of centuries of Images prompt."""
|
16 |
|
17 |
import os
|
18 |
|
19 |
import pandas as pd
|
20 |
import datasets
|
21 |
+
from PIL import Image
|
22 |
|
23 |
# from .classes import IMAGENET2012_CLASSES
|
24 |
|
25 |
|
26 |
+
_HOMEPAGE = "https://huggingface.co/datasets/wintercoming6/artwork_for_sdxl/tree/main"
|
27 |
|
28 |
_CITATION = """\
|
29 |
+
Rombach, R., Blattmann, A., Lorenz, D., Esser, P., & Ommer, B. (2022). High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition (pp. 10684-10695).
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
"""
|
32 |
|
33 |
_DESCRIPTION = """\
|
34 |
+
Artwork Images, to generate the similar artwork using stable diffusion model.
|
35 |
"""
|
36 |
|
37 |
_URL = "https://huggingface.co/datasets/wintercoming6/artwork_for_sdxl/resolve/main/metadata.jsonl"
|
38 |
|
39 |
class Artwork(datasets.GeneratorBasedBuilder):
|
40 |
+
"""Artwork Images - a dataset of centuries of Images prompt."""
|
41 |
|
42 |
def _info(self):
|
43 |
return datasets.DatasetInfo(
|
|
|
48 |
"image_data": Image,
|
49 |
}
|
50 |
),
|
51 |
+
supervised_keys=("prompt","image_data"),
|
52 |
homepage=_HOMEPAGE,
|
|
|
|
|
53 |
)
|
54 |
|
55 |
def _split_generators(self, dl_manager):
|