danbrown commited on
Commit
c378cfc
1 Parent(s): f2c18a4

testman data

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.DS_Store ADDED
Binary file (6.15 kB). View file
 
__pycache__/config.cpython-310.pyc ADDED
Binary file (255 Bytes). View file
 
__pycache__/config.cpython-311.pyc ADDED
Binary file (273 Bytes). View file
 
config.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ TAR_FILE_IMAGES='./images.tar.gz'
2
+ TAR_FILE_TEXTS='./texts.tar.gz'
create-tar-file.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import tarfile
2
+ from config import TAR_FILE_IMAGES, TAR_FILE_TEXTS
3
+
4
+
5
+ if __name__ == "__main__":
6
+ with tarfile.open( TAR_FILE_IMAGES, 'w:xz') as tar:
7
+ tar.add('./images')
8
+
9
+ with tarfile.open( TAR_FILE_TEXTS, 'w:xz') as tar:
10
+ tar.add('./texts')
image-text-demo.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+
3
+ from config import TAR_FILE_IMAGES, TAR_FILE_TEXTS
4
+
5
+ _CITATION = """\
6
+ @InProceedings{huggingface:dataset,
7
+ title = {Small image-text set},
8
+ author={James Briggs},
9
+ year={2022}
10
+ }
11
+ """
12
+
13
+ _DESCRIPTION = """\
14
+ Demo dataset for testing or showing image-text capabilities.
15
+ """
16
+ _HOMEPAGE = "https://huggingface.co/datasets/jamescalam/image-text-demo"
17
+
18
+ _LICENSE = ""
19
+
20
+ _REPO = "https://huggingface.co/datasets/jamescalam/image-text-demo"
21
+
22
+ class ImageSet(datasets.GeneratorBasedBuilder):
23
+ """Small sample of image-text pairs"""
24
+
25
+ def _info(self):
26
+ return datasets.DatasetInfo(
27
+ description=_DESCRIPTION,
28
+ features=datasets.Features(
29
+ {
30
+ 'text': datasets.Value("string"),
31
+ 'image': datasets.Image(),
32
+ }
33
+ ),
34
+ supervised_keys=None,
35
+ homepage=_HOMEPAGE,
36
+ citation=_CITATION,
37
+ )
38
+
39
+ def _split_generators(self, dl_manager):
40
+ images_archive = dl_manager.download(f"{_REPO}/resolve/main/{TAR_FILE_IMAGES}")
41
+ image_iters = dl_manager.iter_archive(images_archive)
42
+
43
+
44
+ texts_archive = dl_manager.download(f"{_REPO}/resolve/main/{TAR_FILE_TEXTS}")
45
+ text_iters = dl_manager.iter_archive(texts_archive)
46
+
47
+ return [
48
+ datasets.SplitGenerator(
49
+ name=datasets.Split.TRAIN,
50
+ gen_kwargs={
51
+ "images": image_iters,
52
+ "texts": text_iters,
53
+ }
54
+ ),
55
+ ]
56
+
57
+ def _generate_examples(self, images, texts):
58
+ """ This function returns the examples in the raw (text) form."""
59
+
60
+ for idx, (filepath, image) in enumerate(images):
61
+
62
+ # get the corresponding text fime and read it
63
+ description = next(texts)[1].read().decode('utf-8')
64
+
65
+ yield idx, {
66
+ "image": {"path": filepath, "bytes": image.read()},
67
+ "text": description,
68
+ }
69
+
70
+
images.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc56b5d6c394ea1ff463ff9211f4af0cd4c441b8192f91eabbd9224e1120c1e5
3
+ size 7660992
images/1.png ADDED

Git LFS Details

  • SHA256: 140122e56abf93ecef06066163d2be471cb16ec3c4d015ed9c2c24f3a7b5a1f2
  • Pointer size: 131 Bytes
  • Size of remote file: 346 kB
images/10.png ADDED

Git LFS Details

  • SHA256: 5b3b1324bcb3031221253433a9f416af910724763a7c05df09dc09198558d513
  • Pointer size: 131 Bytes
  • Size of remote file: 263 kB
images/11.png ADDED

Git LFS Details

  • SHA256: dca976415f030dedde087e0faeae9d5788a9d3bcea5a881040118fa80b6cb092
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
images/12.png ADDED

Git LFS Details

  • SHA256: b25343cf0fb4c06909a3958ed30824f6c864a252d005b07e31c78d1e1a5c4ac9
  • Pointer size: 131 Bytes
  • Size of remote file: 394 kB
images/13.png ADDED

Git LFS Details

  • SHA256: 22f0cef4c797d76743e7487e59ba7712b13b6ec7d32bd84c4dc3b53aae6a1a68
  • Pointer size: 131 Bytes
  • Size of remote file: 383 kB
images/14.png ADDED

Git LFS Details

  • SHA256: 209a4f071de63722244ed09e7d49bc4e7a8a9bb4324494e68396e30948ada71c
  • Pointer size: 131 Bytes
  • Size of remote file: 362 kB
images/15.png ADDED

Git LFS Details

  • SHA256: dac5fe34ee8304e500dcdbaea38587ec338f8d74192255e9aa9c2adff860543c
  • Pointer size: 131 Bytes
  • Size of remote file: 324 kB
images/16.png ADDED

Git LFS Details

  • SHA256: 46a960c82d05ac7c92fc2fe9665926ee4e60cbf6af620e106bd539ef5b232456
  • Pointer size: 131 Bytes
  • Size of remote file: 270 kB
images/17.png ADDED

Git LFS Details

  • SHA256: 58479962a818da7f26e1fcc2326dfdf170ab9643425b9eed114fbf63f0b33110
  • Pointer size: 131 Bytes
  • Size of remote file: 355 kB
images/18.png ADDED

Git LFS Details

  • SHA256: 0521ad6cdb03938baf389c385f0601118214fa9d92276b1c4146768979e6345f
  • Pointer size: 131 Bytes
  • Size of remote file: 291 kB
images/19.png ADDED

Git LFS Details

  • SHA256: 4e276cf3c489af37a1bb64dc9693d893838910f4022267c5d4fdd9581175823b
  • Pointer size: 131 Bytes
  • Size of remote file: 321 kB
images/2.png ADDED

Git LFS Details

  • SHA256: 0d922a4992c8f51ba3c471ef4f90d35d0105fbec73630b7a00aa43b4037138cd
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB
images/20.png ADDED

Git LFS Details

  • SHA256: af90fc13b81a72b997ca07622570905e697f2c21f24caabbe8d7b6064a2209eb
  • Pointer size: 131 Bytes
  • Size of remote file: 321 kB
images/21.png ADDED

Git LFS Details

  • SHA256: 8ef13dba530f98a3be84a66327b12bc59b1d025fb12aa2c9b8897b8af2716f3a
  • Pointer size: 131 Bytes
  • Size of remote file: 317 kB
images/22.png ADDED

Git LFS Details

  • SHA256: a6e3c8c4bfe705159ea88e489c52eb0e5ec6e9728e42b9e3ad7b34752e0b8f01
  • Pointer size: 131 Bytes
  • Size of remote file: 318 kB
images/23.png ADDED

Git LFS Details

  • SHA256: ea027e660b20b49e424742df524858eb60c1d84e3d46f986b479e2d0b84bc738
  • Pointer size: 131 Bytes
  • Size of remote file: 277 kB
images/24.png ADDED

Git LFS Details

  • SHA256: 30488aef011107a052fd78b8fc310acd0bb3b7f9709416b7a932a0088b154aac
  • Pointer size: 131 Bytes
  • Size of remote file: 260 kB
images/25.png ADDED

Git LFS Details

  • SHA256: c5d0fdfa6cbe3b3e60373de655a837e5c14780ae94ee7dc790fa1420def360f5
  • Pointer size: 131 Bytes
  • Size of remote file: 285 kB
images/3.png ADDED

Git LFS Details

  • SHA256: 2d5c6dc65fa09c0f5aaac9ef28dfcf651591b501ac961881c75964997c36167f
  • Pointer size: 131 Bytes
  • Size of remote file: 306 kB
images/4.png ADDED

Git LFS Details

  • SHA256: 2972cd5fa25d8a2b6c0571cab7d533de2b571e23254fa4c60443bbb8c728969b
  • Pointer size: 131 Bytes
  • Size of remote file: 307 kB
images/5.png ADDED

Git LFS Details

  • SHA256: a9174bdaa8111298b233ebe0bef645bc242783675833ce2e2edd4411630c7be3
  • Pointer size: 131 Bytes
  • Size of remote file: 231 kB
images/6.png ADDED

Git LFS Details

  • SHA256: a0c7e679afcb888b8139c67c371d374c40178108e02c8566a0b821e0fa3db219
  • Pointer size: 131 Bytes
  • Size of remote file: 291 kB
images/7.png ADDED

Git LFS Details

  • SHA256: f28efeaf527b9e596132862232e8800321c0f69cc43cbd507671ac17297317b1
  • Pointer size: 131 Bytes
  • Size of remote file: 280 kB
images/8.png ADDED

Git LFS Details

  • SHA256: 49f600a204bd530e77562121be6e6cadac68e4682e7a70eeeab9d90293f42fe8
  • Pointer size: 131 Bytes
  • Size of remote file: 255 kB
images/9.png ADDED

Git LFS Details

  • SHA256: 52f86b89f74bf8fb964ebe3579696a693c14fb413999341c5a5e0e89d0108f1f
  • Pointer size: 131 Bytes
  • Size of remote file: 323 kB
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ datasets
texts.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de1d8f1146d5e095af2c87cb037df992252887c82e8727f95a5102f7e58545b6
3
+ size 1120
texts/1.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, side view, from side, plain background, gray background
texts/10.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, karate chop pose, karate, from side, plain background, gray background
texts/11.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, thinking, sit pose, crossed legs, plain background, gray background
texts/12.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, combat pose, holding katana, front view, plain background, gray background
texts/13.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, mantis pose, kung fu pose, combat pose, plain background, gray background
texts/14.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, portrait, front view, face portrait, plain background, gray background
texts/15.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, portrait, front view, face portrait, plain background, gray background
texts/16.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, portrait, front view, face portrait, plain background, gray background
texts/17.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, laydown, plain background, gray background
texts/18.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, disapointed, plain background, gray background
texts/19.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, portrait, front view, face portrait, plain background, gray background
texts/2.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, standing, front view, plain background, gray background
texts/20.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, combat pose, martial stance, plain background, gray background
texts/21.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, sit down, looking up, plain background, gray background
texts/22.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, winning pose, victory, happy, plain background, gray background
texts/23.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Testman, teasing, playful, plain background, gray background