refactor: all data
Browse files- .gitattributes +1 -0
- after/10.png +0 -3
- after/11.png +0 -3
- after/12.png +0 -3
- after/13.png +0 -3
- after/14.png +0 -3
- after/15.png +0 -3
- after/16.png +0 -3
- after/17.png +0 -3
- after/18.png +0 -3
- after/19.png +0 -3
- after/2.png +0 -3
- after/20.png +0 -3
- after/21.png +0 -3
- after/22.png +0 -3
- after/3.png +0 -3
- after/4.png +0 -3
- after/5.png +0 -3
- after/6.png +0 -3
- after/7.png +0 -3
- after/8.png +0 -3
- after/9.png +0 -3
- before/0.png +0 -3
- before/1.png +0 -3
- before/10.png +0 -3
- before/11.png +0 -3
- before/12.png +0 -3
- before/13.png +0 -3
- before/14.png +0 -3
- before/15.png +0 -3
- before/16.png +0 -3
- before/17.png +0 -3
- before/18.png +0 -3
- before/19.png +0 -3
- before/2.png +0 -3
- before/20.png +0 -3
- before/21.png +0 -3
- before/22.png +0 -3
- before/3.png +0 -3
- before/4.png +0 -3
- before/5.png +0 -3
- before/6.png +0 -3
- before/7.png +0 -3
- before/8.png +0 -3
- before/9.png +0 -3
- botox-injections-before-and-after.py +71 -0
- after/0.png → data/after.tar.gz +2 -2
- after/1.png → data/before.tar.gz +2 -2
- botox.csv → data/botox-injections-before-and-after.csv +0 -0
.gitattributes
CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
data filter=lfs diff=lfs merge=lfs -text
|
after/10.png
DELETED
Git LFS Details
|
after/11.png
DELETED
Git LFS Details
|
after/12.png
DELETED
Git LFS Details
|
after/13.png
DELETED
Git LFS Details
|
after/14.png
DELETED
Git LFS Details
|
after/15.png
DELETED
Git LFS Details
|
after/16.png
DELETED
Git LFS Details
|
after/17.png
DELETED
Git LFS Details
|
after/18.png
DELETED
Git LFS Details
|
after/19.png
DELETED
Git LFS Details
|
after/2.png
DELETED
Git LFS Details
|
after/20.png
DELETED
Git LFS Details
|
after/21.png
DELETED
Git LFS Details
|
after/22.png
DELETED
Git LFS Details
|
after/3.png
DELETED
Git LFS Details
|
after/4.png
DELETED
Git LFS Details
|
after/5.png
DELETED
Git LFS Details
|
after/6.png
DELETED
Git LFS Details
|
after/7.png
DELETED
Git LFS Details
|
after/8.png
DELETED
Git LFS Details
|
after/9.png
DELETED
Git LFS Details
|
before/0.png
DELETED
Git LFS Details
|
before/1.png
DELETED
Git LFS Details
|
before/10.png
DELETED
Git LFS Details
|
before/11.png
DELETED
Git LFS Details
|
before/12.png
DELETED
Git LFS Details
|
before/13.png
DELETED
Git LFS Details
|
before/14.png
DELETED
Git LFS Details
|
before/15.png
DELETED
Git LFS Details
|
before/16.png
DELETED
Git LFS Details
|
before/17.png
DELETED
Git LFS Details
|
before/18.png
DELETED
Git LFS Details
|
before/19.png
DELETED
Git LFS Details
|
before/2.png
DELETED
Git LFS Details
|
before/20.png
DELETED
Git LFS Details
|
before/21.png
DELETED
Git LFS Details
|
before/22.png
DELETED
Git LFS Details
|
before/3.png
DELETED
Git LFS Details
|
before/4.png
DELETED
Git LFS Details
|
before/5.png
DELETED
Git LFS Details
|
before/6.png
DELETED
Git LFS Details
|
before/7.png
DELETED
Git LFS Details
|
before/8.png
DELETED
Git LFS Details
|
before/9.png
DELETED
Git LFS Details
|
botox-injections-before-and-after.py
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
import pandas as pd
|
3 |
+
|
4 |
+
_CITATION = """\
|
5 |
+
@InProceedings{huggingface:dataset,
|
6 |
+
title = {botox-injections-before-and-after},
|
7 |
+
author = {TrainingDataPro},
|
8 |
+
year = {2023}
|
9 |
+
}
|
10 |
+
"""
|
11 |
+
|
12 |
+
_DESCRIPTION = """\
|
13 |
+
The dataset consists of photos featuring the same individuals captured before and after
|
14 |
+
botox injections procedure. The dataset contains a diverse range of individuals with
|
15 |
+
various ages, ethnicities and genders.
|
16 |
+
The dataset is useful for evaluation of the effectiveness of botox injections for
|
17 |
+
different skin and face types, face recognition and reidentification tasks. It can be
|
18 |
+
utilised for biometric tasks , in beauty sphere, for medical purposes and e-commerce.
|
19 |
+
"""
|
20 |
+
_NAME = "botox-injections-before-and-after"
|
21 |
+
|
22 |
+
_HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
|
23 |
+
|
24 |
+
_LICENSE = ""
|
25 |
+
|
26 |
+
_DATA = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}/resolve/main/data/"
|
27 |
+
|
28 |
+
|
29 |
+
class BotoxInjectionsBeforeAndAfter(datasets.GeneratorBasedBuilder):
|
30 |
+
def _info(self):
|
31 |
+
return datasets.DatasetInfo(
|
32 |
+
description=_DESCRIPTION,
|
33 |
+
features=datasets.Features(
|
34 |
+
{
|
35 |
+
"id": datasets.Value("int32"),
|
36 |
+
"before": datasets.Image(),
|
37 |
+
"aftre": datasets.Image(),
|
38 |
+
}
|
39 |
+
),
|
40 |
+
supervised_keys=None,
|
41 |
+
homepage=_HOMEPAGE,
|
42 |
+
citation=_CITATION,
|
43 |
+
)
|
44 |
+
|
45 |
+
def _split_generators(self, dl_manager):
|
46 |
+
before = dl_manager.download(f"{_DATA}before.tar.gz")
|
47 |
+
after = dl_manager.download(f"{_DATA}after.tar.gz")
|
48 |
+
annotations = dl_manager.download(f"{_DATA}{_NAME}.csv")
|
49 |
+
before = dl_manager.iter_archive(before)
|
50 |
+
after = dl_manager.iter_archive(after)
|
51 |
+
return [
|
52 |
+
datasets.SplitGenerator(
|
53 |
+
name=datasets.Split.TRAIN,
|
54 |
+
gen_kwargs={
|
55 |
+
"before": before,
|
56 |
+
"after": after,
|
57 |
+
"annotations": annotations,
|
58 |
+
},
|
59 |
+
),
|
60 |
+
]
|
61 |
+
|
62 |
+
def _generate_examples(self, before, after, annotations):
|
63 |
+
for idx, (
|
64 |
+
(before_image_path, before_image),
|
65 |
+
(after_image_path, after_image),
|
66 |
+
) in enumerate(zip(before, after)):
|
67 |
+
yield idx, {
|
68 |
+
"id": before_image_path.split("/")[-1].split(".")[0],
|
69 |
+
"image": {"path": before_image_path, "bytes": before_image.read()},
|
70 |
+
"mask": {"path": after_image_path, "bytes": after_image.read()},
|
71 |
+
}
|
after/0.png → data/after.tar.gz
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:514f7fc41e53b9b3e168a840f0b71713667c020608cf94d189aa599f23f6f2b7
|
3 |
+
size 19463056
|
after/1.png → data/before.tar.gz
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b605d85f21d666a7e56b1aef29ebf27b7b2ac22d6b38e1c9310a6ccfc17398a
|
3 |
+
size 19360475
|
botox.csv → data/botox-injections-before-and-after.csv
RENAMED
File without changes
|