eliphatfs commited on
Commit
3fbe09c
1 Parent(s): cd542fa
Files changed (32) hide show
  1. fetch_sample_images.py +53 -0
  2. samples/caption/283c845f2c2c4567971d42dc46831372.jpg +0 -0
  3. samples/caption/4b27adcf92f644bdabf8ecc6c5bef399.jpg +0 -0
  4. samples/caption/d3c0e3495b5d40d087a7f82d1690b9cb.jpg +0 -0
  5. samples/caption/f8c13a19e84343e7b644c19f7b9488d3.jpg +0 -0
  6. samples/caption/fa17099f18804409bc6d9e8e397b4681.jpg +0 -0
  7. samples/caption/fc655111af5b49bf84722affc3ddba00.jpg +0 -0
  8. samples/classification/4e6d591f6e50493aa5e31355084fc4e8.jpg +0 -0
  9. samples/classification/569a71ccf4d94c1585c9573521fb998f.jpg +0 -0
  10. samples/classification/a784af0713a643b19ffcf65194bc0fbf.jpg +0 -0
  11. samples/retrieval-img/img1.jpg +0 -0
  12. samples/retrieval-img/img2.jpg +0 -0
  13. samples/retrieval-img/img3.jpg +0 -0
  14. samples/retrieval-img/img4.jpg +0 -0
  15. samples/retrieval-img/img5.jpg +0 -0
  16. samples/retrieval-img/img6.jpg +0 -0
  17. samples/retrieval-img/img7.jpg +0 -0
  18. samples/retrieval-img/img8.jpg +0 -0
  19. samples/retrieval-pc/9c97e41b7e4345ecb3796500e036eae7.jpg +0 -0
  20. samples/retrieval-pc/aab131e254f24e2abefef68ba774688a.jpg +0 -0
  21. samples/retrieval-pc/ac0eaf563bd2405e93a152554211294e.jpg +0 -0
  22. samples/retrieval-pc/dec45a28e6f346648c3d6585426157b8.jpg +0 -0
  23. samples/retrieval-pc/f033545bb7d94595ac010d132f8761af.jpg +0 -0
  24. samples/retrieval-pc/f19745ffe8ad4527a6f5f8332d7ecdec.jpg +0 -0
  25. samples/retrieval-text.txt +16 -0
  26. samples/sd-text.txt +3 -0
  27. samples/sd/b464ff8d732d44fab00b903652c8274e.jpg +0 -0
  28. samples/sd/b8db8dc5caad4fa5842a9ed6dbd2e9d6.jpg +0 -0
  29. samples/sd/efae586a477b49cea1a0777487cc2df3.jpg +0 -0
  30. samples/sd/f8272460c67d476a8af29e1f2e344bc0.jpg +0 -0
  31. samples/sd/ff2875fb1a5b4771805a5fd35c8fe7bb.jpg +0 -0
  32. samples/sd/tpvzmLUXAURQ7ZxccJIBZvcIDlr.jpg +0 -0
fetch_sample_images.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import io
2
+ import os
3
+ import cv2
4
+ import tqdm
5
+ import numpy
6
+ import requests
7
+
8
+
9
+ def get_bytes(x: str):
10
+ return numpy.frombuffer(requests.get(x).content, numpy.uint8)
11
+
12
+
13
+ def get_image(x):
14
+ return cv2.imdecode(get_bytes(x), cv2.IMREAD_COLOR)
15
+
16
+
17
+ os.chdir(os.path.dirname(os.path.abspath(__file__)))
18
+ # classification
19
+ # uids = """
20
+ # a784af0713a643b19ffcf65194bc0fbf
21
+ # 569a71ccf4d94c1585c9573521fb998f
22
+ # 4e6d591f6e50493aa5e31355084fc4e8
23
+ # """.split()
24
+
25
+ # caption
26
+ # uids = """
27
+ # 283c845f2c2c4567971d42dc46831372
28
+ # fc655111af5b49bf84722affc3ddba00
29
+ # fa17099f18804409bc6d9e8e397b4681
30
+ # d3c0e3495b5d40d087a7f82d1690b9cb
31
+ # 4b27adcf92f644bdabf8ecc6c5bef399
32
+ # f8c13a19e84343e7b644c19f7b9488d3
33
+ # """.split()
34
+
35
+ # sd
36
+ uids = """
37
+ b464ff8d732d44fab00b903652c8274e
38
+ efae586a477b49cea1a0777487cc2df3
39
+ f8272460c67d476a8af29e1f2e344bc0
40
+ ff2875fb1a5b4771805a5fd35c8fe7bb
41
+ b8db8dc5caad4fa5842a9ed6dbd2e9d6
42
+ tpvzmLUXAURQ7ZxccJIBZvcIDlr
43
+ """.split()
44
+
45
+
46
+ uri_fmt = 'https://objaverse-thumbnail-images.s3.us-west-2.amazonaws.com/{}.jpg'
47
+ for u in tqdm.tqdm(uids):
48
+ img = get_image(uri_fmt.format(u))
49
+ max_edge = max(img.shape)
50
+ if max_edge > 512:
51
+ s = 512 / max_edge
52
+ img = cv2.resize(img, [0, 0], fx=s, fy=s, interpolation=cv2.INTER_CUBIC)
53
+ cv2.imwrite("samples/sd/%s.jpg" % u, img)
samples/caption/283c845f2c2c4567971d42dc46831372.jpg ADDED
samples/caption/4b27adcf92f644bdabf8ecc6c5bef399.jpg ADDED
samples/caption/d3c0e3495b5d40d087a7f82d1690b9cb.jpg ADDED
samples/caption/f8c13a19e84343e7b644c19f7b9488d3.jpg ADDED
samples/caption/fa17099f18804409bc6d9e8e397b4681.jpg ADDED
samples/caption/fc655111af5b49bf84722affc3ddba00.jpg ADDED
samples/classification/4e6d591f6e50493aa5e31355084fc4e8.jpg ADDED
samples/classification/569a71ccf4d94c1585c9573521fb998f.jpg ADDED
samples/classification/a784af0713a643b19ffcf65194bc0fbf.jpg ADDED
samples/retrieval-img/img1.jpg ADDED
samples/retrieval-img/img2.jpg ADDED
samples/retrieval-img/img3.jpg ADDED
samples/retrieval-img/img4.jpg ADDED
samples/retrieval-img/img5.jpg ADDED
samples/retrieval-img/img6.jpg ADDED
samples/retrieval-img/img7.jpg ADDED
samples/retrieval-img/img8.jpg ADDED
samples/retrieval-pc/9c97e41b7e4345ecb3796500e036eae7.jpg ADDED
samples/retrieval-pc/aab131e254f24e2abefef68ba774688a.jpg ADDED
samples/retrieval-pc/ac0eaf563bd2405e93a152554211294e.jpg ADDED
samples/retrieval-pc/dec45a28e6f346648c3d6585426157b8.jpg ADDED
samples/retrieval-pc/f033545bb7d94595ac010d132f8761af.jpg ADDED
samples/retrieval-pc/f19745ffe8ad4527a6f5f8332d7ecdec.jpg ADDED
samples/retrieval-text.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ shark
2
+ swordfish
3
+ dolphin
4
+ goldfish
5
+ high heels
6
+ boots
7
+ slippers
8
+ sneakers
9
+ tiki mug
10
+ viking mug
11
+ animal-shaped mug
12
+ travel mug
13
+ white conical mug
14
+ green cubic mug
15
+ blue spherical mug
16
+ orange cylinder mug
samples/sd-text.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ b8db8dc5caad4fa5842a9ed6dbd2e9d6,falcon
2
+ ff2875fb1a5b4771805a5fd35c8fe7bb,in the woods
3
+ tpvzmLUXAURQ7ZxccJIBZvcIDlr,above the fields
samples/sd/b464ff8d732d44fab00b903652c8274e.jpg ADDED
samples/sd/b8db8dc5caad4fa5842a9ed6dbd2e9d6.jpg ADDED
samples/sd/efae586a477b49cea1a0777487cc2df3.jpg ADDED
samples/sd/f8272460c67d476a8af29e1f2e344bc0.jpg ADDED
samples/sd/ff2875fb1a5b4771805a5fd35c8fe7bb.jpg ADDED
samples/sd/tpvzmLUXAURQ7ZxccJIBZvcIDlr.jpg ADDED