Plana-Archive commited on
Commit
8a80c68
·
verified ·
1 Parent(s): 1adc4e3

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators: []
3
+ language: []
4
+ language_creators: []
5
+ license:
6
+ - cc0-1.0
7
+ multilinguality: []
8
+ pretty_name: Full Body Anime HQ
9
+ size_categories:
10
+ - 100K<n<1M
11
+ source_datasets:
12
+ - original
13
+ tags: []
14
+ task_categories:
15
+ - unconditional-image-generation
16
+ task_ids: []
17
+ ---
18
+
19
+ ## Dataset Description
20
+
21
+ FBAnimeHQ is a dataset with high-quality full-body anime girl images in a resolution of 1024 × 512.
22
+
23
+ ### Dataset Summary
24
+
25
+ The dataset contains 112,806 images.
26
+
27
+ All images are on white background
28
+
29
+ ### Collection Method
30
+
31
+ #### v1.0
32
+ Collect from danbooru website.
33
+
34
+ Use yolov5 to detect and clip image.
35
+
36
+ Use anime-segmentation to remove background.
37
+
38
+ Use deepdanbooru to filter image.
39
+
40
+ Finally clean the dataset manually.
41
+
42
+ #### v2.0
43
+
44
+ Base on v1.0, use Novelai image-to-image to enhance and expand the dataset.
45
+
46
+ ### Contributions
47
+
48
+ Thanks to [@SkyTNT](https://github.com/SkyTNT) for adding this dataset.
data/fbanimehq-00.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ba59205ffa044d6aceb03caf72941dcfaf784be80372c3ad18a86a1eb67d996
3
+ size 2962543000
data/fbanimehq-01.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e709f71c18531aa07da12f28fba81565c6d55874786ba3d8b6094f12d37589a
3
+ size 2908076211
data/fbanimehq-02.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e64162e50f73d631d48a3e123ad615f34cc36bb5344a3d7adb0f4d2a2edbff75
3
+ size 2914682772
data/fbanimehq-03.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c12bbc7d4e008c82dbd1183beda95be6efe263b5c9f270442327ec690d00e12
3
+ size 2930107168
data/fbanimehq-04.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87e351b9110a0a24575951bbe227e8f5eda650815df601d8cb045f4885b412a9
3
+ size 2949153937
data/fbanimehq-05.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb66fe7e2a82917260cd2f2aecd8a5a5075bb9e29415a9d1ce9c4bd0121951c8
3
+ size 2941527792
data/fbanimehq-06.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0256ef8c1c1f4118b1ed951efe3670964f1147b65a55fe6472bc4d1f8e687e1c
3
+ size 2952114595
data/fbanimehq-07.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27687ccea0f957e291451e710a360ca598bab3b71286a4696516444ac095e5b4
3
+ size 2939976702
data/fbanimehq-08.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26fd2f8dfc878e3a338cfe57619c4ade342700c59a46ebbf9bbeec9cedc13f2d
3
+ size 2951730804
data/fbanimehq-09.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f34d2ce4f356e68c7409a1900c2d0910d92b5b4687fb28a10437c06ceb55d9a
3
+ size 2943845131
data/fbanimehq-10.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b676d1e643fc54b698f0d4cd04c7a894eed2057ed3b182ad657054b3b98e407
3
+ size 2944508147
data/fbanimehq-11.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62bc7850768a6d1882a20009ae64312c92dc3f98a9df1c37864527f89c160853
3
+ size 821695089
fbanimehq.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import datasets
3
+ from datasets import DownloadManager, DatasetInfo
4
+
5
+ _DESCRIPTION = """\
6
+ FBAnimeHQ is a dataset with high-quality full-body anime girl images in a resolution of 1024 × 512.
7
+ """
8
+ _HOMEPAGE = "https://huggingface.co/datasets/skytnt/fbanimehq"
9
+ _URL_BASE = "https://huggingface.co/datasets/skytnt/fbanimehq/resolve/main/data/"
10
+ _EXTENSION = [".png", ".jpg"]
11
+ _URLS_HQ = [f"{_URL_BASE}fbanimehq-{i:02d}.zip" for i in range(12)]
12
+ _URLS_SMALL = [
13
+ # _URL_BASE + "fbanimesmall.zip",
14
+ ]
15
+
16
+
17
+ class FBAnimeHQConfig(datasets.BuilderConfig):
18
+
19
+ def __init__(self, urls, **kwargs):
20
+ super(FBAnimeHQConfig, self).__init__(**kwargs)
21
+ self.urls = urls
22
+
23
+
24
+ class FBAnimeHQ(datasets.GeneratorBasedBuilder):
25
+ BUILDER_CONFIGS = [
26
+ FBAnimeHQConfig(name="hq", urls=_URLS_HQ),
27
+ FBAnimeHQConfig(name="small", urls=_URLS_SMALL)
28
+ ]
29
+
30
+ def _info(self) -> DatasetInfo:
31
+ return datasets.DatasetInfo(
32
+ description=_DESCRIPTION,
33
+ features=datasets.Features(
34
+ {
35
+ "image": datasets.Image(),
36
+ }
37
+ ),
38
+ supervised_keys=None,
39
+ homepage=_HOMEPAGE,
40
+ citation="",
41
+ )
42
+
43
+ def _split_generators(self, dl_manager: DownloadManager):
44
+ dirs = dl_manager.download_and_extract(self.config.urls)
45
+ return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"dirs": dirs})]
46
+
47
+ def _generate_examples(self, dirs):
48
+ for path in dirs:
49
+ all_fnames = {os.path.relpath(os.path.join(root, fname), start=path)
50
+ for root, _dirs, files in os.walk(path) for fname in files}
51
+ image_fnames = sorted(fname for fname in all_fnames
52
+ if os.path.splitext(fname)[1].lower() in _EXTENSION)
53
+ for image_fname in image_fnames:
54
+ yield image_fname, {"image": os.path.join(path, image_fname)}