haor commited on
Commit
8d9ee48
·
verified ·
1 Parent(s): a79d2e6

Upload complete dataset

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. get_image.py +91 -0
  2. hard_flash.json +0 -0
  3. images/00096722-9928-4464-bf91-e989fba184a2.jpg +3 -0
  4. images/0009b94d-c56e-4fdf-9110-8dd49afe239e.jpg +3 -0
  5. images/0009d7d9-9722-48ac-83af-7b51cca243ef.jpg +3 -0
  6. images/0016051c-36d8-4a82-8388-df1346407d0e.jpg +3 -0
  7. images/0016322b-4c3a-43bb-8b63-f78d572e79c0.jpg +3 -0
  8. images/001efd1e-2507-4c67-aef1-0f1760857c19.jpg +3 -0
  9. images/0020e78c-6252-4332-8909-881091b0f947.jpg +3 -0
  10. images/00246953-a41b-43d1-979e-237b39c858c0.jpg +3 -0
  11. images/002630b8-d960-45d5-8080-265693de902e.jpg +3 -0
  12. images/002688d3-c1d5-478f-b0cb-a406c4e4dd2b.jpg +3 -0
  13. images/0033adbb-7e22-4077-84b8-52058eaabfa2.jpg +3 -0
  14. images/004d4ef1-fac7-465d-bb59-14b6058a5f64.jpg +3 -0
  15. images/00530d4d-ce24-43db-9f1e-9ad40b9b01d4.jpg +3 -0
  16. images/00650dce-966a-4517-9c13-ed8e56f88fc8.jpg +3 -0
  17. images/006b779f-2e23-4eed-a3a4-69ad19619f7d.jpg +3 -0
  18. images/006fe9d7-0756-43b5-9d83-ecee666f1c9e.jpg +3 -0
  19. images/0076730b-de39-4e99-ae65-ee0114f1eb22.jpg +3 -0
  20. images/0079fa55-8fc1-46cb-a18a-18f7d92bede8.jpg +3 -0
  21. images/009684a8-e0d2-4626-985e-b4367ad10cd9.jpg +3 -0
  22. images/00a9df7a-0798-4b98-ab73-f79fabddc31b.jpg +3 -0
  23. images/00ae5b93-bde2-466a-ab63-8e1f116a462b.jpg +3 -0
  24. images/00c0bf2b-3fdd-4e53-9cdd-9459215d1a3d.jpg +3 -0
  25. images/00c6caa9-7d84-4317-bc27-149243cf8b33.jpg +3 -0
  26. images/00c96628-d4b9-4891-8d37-22028b37d2e4.jpg +3 -0
  27. images/00cf9930-9120-4c10-998c-e6f5b1fc403a.jpg +3 -0
  28. images/00cfc440-1b93-4cc3-84f4-37a70062cadc.jpg +3 -0
  29. images/00cfd72a-1ffb-43c8-b9aa-6d68f72c4dc7.jpg +3 -0
  30. images/00d1ab8c-e45e-481a-b6a9-6decf00b4348.jpg +3 -0
  31. images/00d1c5f7-5336-4ae8-bc32-523ba9511b28.jpg +3 -0
  32. images/00d21410-cfd5-41d6-ab12-b9226ffa54e0.jpg +3 -0
  33. images/00d36271-46c2-48bf-a525-ff68987f6771.jpg +3 -0
  34. images/00e8aeee-79e1-4eca-a348-e96f3ff78c0f.jpg +3 -0
  35. images/00f19b37-155c-4357-89d0-ac1f9e44f19f.jpg +3 -0
  36. images/010530d2-42b4-4036-911c-7127e12df916.jpg +3 -0
  37. images/010803cc-ceee-44e0-a4ae-afc0600609d7.jpg +3 -0
  38. images/010937f8-3309-4358-a7d5-0084527f8022.jpg +3 -0
  39. images/0110f7d4-2fc0-428e-baea-62c97abd485c.jpg +3 -0
  40. images/011c9cdf-4f82-48e1-8037-cecfce1debfd.jpg +3 -0
  41. images/012694cf-371f-44fa-aebc-0835d122d332.jpg +3 -0
  42. images/0131fc2f-f1a3-4864-bf08-80654e11779b.jpg +3 -0
  43. images/0133f3be-e07a-402a-8538-491df872ae23.jpg +3 -0
  44. images/0140a2bb-bfcc-4fb8-93a5-227b66bfbc1d.jpg +3 -0
  45. images/01431594-ddfd-44f6-bc83-0f31fd70e6c0.jpg +3 -0
  46. images/01462308-8fc4-4763-b665-d46cbae64edd.jpg +3 -0
  47. images/0148539a-6704-4bc8-b606-b9c57cd0f4f8.jpg +3 -0
  48. images/014c3c74-aba4-4e03-952e-05fdeccdeca5.jpg +3 -0
  49. images/014f9ca0-d7fe-47c6-ae40-2a61524c960e.jpg +3 -0
  50. images/01536db2-852a-42db-86eb-30a24fd1389c.jpg +3 -0
get_image.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import requests
3
+ import os
4
+ from concurrent.futures import ThreadPoolExecutor
5
+ from pathlib import Path
6
+ import time
7
+ from tqdm import tqdm
8
+ import logging
9
+
10
+ logging.basicConfig(
11
+ level=logging.INFO,
12
+ format='%(asctime)s - %(levelname)s - %(message)s'
13
+ )
14
+ logger = logging.getLogger(__name__)
15
+
16
+ def download_image(item):
17
+ image_id = item['image_id']
18
+ prompt = item['prompt']
19
+ url = f"https://api.recraft.ai/image/{image_id}"
20
+
21
+ output_dir = Path("downloaded_images")
22
+ output_dir.mkdir(exist_ok=True)
23
+
24
+ image_path = output_dir / f"{image_id}.jpg"
25
+ prompt_path = output_dir / f"{image_id}.txt"
26
+
27
+ try:
28
+ if image_path.exists() and prompt_path.exists():
29
+ logger.info(f"File exists, skipping: {image_id}")
30
+ return True
31
+
32
+ response = requests.get(url)
33
+ response.raise_for_status()
34
+
35
+ with open(image_path, 'wb') as f:
36
+ f.write(response.content)
37
+
38
+ with open(prompt_path, 'w', encoding='utf-8') as f:
39
+ f.write(prompt)
40
+
41
+ logger.debug(f"Successfully downloaded: {image_id}")
42
+ return True
43
+ except Exception as e:
44
+ logger.error(f"Download failed {image_id}: {str(e)}")
45
+ return False
46
+
47
+ def main():
48
+ print("=== Recraft Image Downloader ===")
49
+
50
+ if not Path('merged.json').exists():
51
+ logger.error("merged.json file not found!")
52
+ return
53
+
54
+ try:
55
+ with open('merged.json', 'r', encoding='utf-8') as f:
56
+ data = json.load(f)
57
+ except Exception as e:
58
+ logger.error(f"Failed to read JSON file: {str(e)}")
59
+ return
60
+
61
+ total_images = len(data['recraft_images'])
62
+ print(f"\nFound {total_images} images")
63
+
64
+ user_input = input("\nStart downloading? (y/n): ")
65
+ if user_input.lower() != 'y':
66
+ print("Download cancelled")
67
+ return
68
+
69
+ success_count = 0
70
+ start_time = time.time()
71
+
72
+ print("\nStarting download...")
73
+ with ThreadPoolExecutor(max_workers=10) as executor:
74
+ results = list(tqdm(
75
+ executor.map(download_image, data['recraft_images']),
76
+ total=total_images,
77
+ desc="Download Progress",
78
+ unit="images"
79
+ ))
80
+ success_count = sum(results)
81
+
82
+ end_time = time.time()
83
+
84
+ print("\n=== Download Complete! ===")
85
+ print(f"Success: {success_count} images")
86
+ print(f"Failed: {total_images - success_count} images")
87
+ print(f"Total time: {end_time - start_time:.2f} seconds")
88
+ print(f"Average speed: {total_images / (end_time - start_time):.2f} images/sec")
89
+
90
+ if __name__ == "__main__":
91
+ main()
hard_flash.json ADDED
The diff for this file is too large to render. See raw diff
 
images/00096722-9928-4464-bf91-e989fba184a2.jpg ADDED

Git LFS Details

  • SHA256: 52dc4742ac2fe300ae15a62a36ef8ffbe861f8592bd67bfc7ef50d527335bb4d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.48 MB
images/0009b94d-c56e-4fdf-9110-8dd49afe239e.jpg ADDED

Git LFS Details

  • SHA256: c312c12daf63010c7323ac4e50043f198ff401570cb8cdb50ff80ba72337e25a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.73 MB
images/0009d7d9-9722-48ac-83af-7b51cca243ef.jpg ADDED

Git LFS Details

  • SHA256: 182de8c5cf7d090a48bfebf55bf27a8aa995fbb15324ac5bbf721d9b7864bb32
  • Pointer size: 132 Bytes
  • Size of remote file: 1.6 MB
images/0016051c-36d8-4a82-8388-df1346407d0e.jpg ADDED

Git LFS Details

  • SHA256: 55a43dc2f90d3c5f8a65fb4dbe835966ddc6d6cea12d8d20443dd08cceedc1b7
  • Pointer size: 132 Bytes
  • Size of remote file: 2.45 MB
images/0016322b-4c3a-43bb-8b63-f78d572e79c0.jpg ADDED

Git LFS Details

  • SHA256: 2905dddde78d01d4f2fb6d1355c634a5366f53f340e2da79cde851ae057e3c58
  • Pointer size: 132 Bytes
  • Size of remote file: 1.81 MB
images/001efd1e-2507-4c67-aef1-0f1760857c19.jpg ADDED

Git LFS Details

  • SHA256: 235aa00a158317c65e22404077df91320b011c6a48f1c1303efaa2be5bf972b3
  • Pointer size: 132 Bytes
  • Size of remote file: 2.67 MB
images/0020e78c-6252-4332-8909-881091b0f947.jpg ADDED

Git LFS Details

  • SHA256: dcf35b00edbe6f855a2e53594aaea5245c2c660b4bbc62c5af7c4c8f50b319eb
  • Pointer size: 132 Bytes
  • Size of remote file: 1.37 MB
images/00246953-a41b-43d1-979e-237b39c858c0.jpg ADDED

Git LFS Details

  • SHA256: cb7f4fdca615e98d5b7251a4455681d186608c10562f99de870b17e721645a3b
  • Pointer size: 132 Bytes
  • Size of remote file: 2.1 MB
images/002630b8-d960-45d5-8080-265693de902e.jpg ADDED

Git LFS Details

  • SHA256: e2609927c2bde5c34ea900819cfffc4f880fed66e7b5e95ed7a4ddf25ab4783f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.58 MB
images/002688d3-c1d5-478f-b0cb-a406c4e4dd2b.jpg ADDED

Git LFS Details

  • SHA256: 015f5fabeaea2f843d4e3afebb262f9a916e345d7eaed9a472660cc430c3e943
  • Pointer size: 132 Bytes
  • Size of remote file: 1.57 MB
images/0033adbb-7e22-4077-84b8-52058eaabfa2.jpg ADDED

Git LFS Details

  • SHA256: 3900a65a52ac60a0557af81e5821c464d5742c5f45caf310ecafc852bb82fd2c
  • Pointer size: 132 Bytes
  • Size of remote file: 1.63 MB
images/004d4ef1-fac7-465d-bb59-14b6058a5f64.jpg ADDED

Git LFS Details

  • SHA256: 4a1d5001c35ef330c5a0ab40e854f97d8289acf87bee1b0f5f720a740acfcaf3
  • Pointer size: 132 Bytes
  • Size of remote file: 1.35 MB
images/00530d4d-ce24-43db-9f1e-9ad40b9b01d4.jpg ADDED

Git LFS Details

  • SHA256: 9162dc86ec41263fe9f1464389acaacb900c10287f7c27befe98490d0179cc76
  • Pointer size: 132 Bytes
  • Size of remote file: 1.74 MB
images/00650dce-966a-4517-9c13-ed8e56f88fc8.jpg ADDED

Git LFS Details

  • SHA256: 58fb65f4f8fb46562be0d8b2648c3a9881b09cc0f5a53fe008be89f03f58c8b2
  • Pointer size: 132 Bytes
  • Size of remote file: 1.48 MB
images/006b779f-2e23-4eed-a3a4-69ad19619f7d.jpg ADDED

Git LFS Details

  • SHA256: 875191020b81c017c2568802bdd60e6b5927cf81ac90c2a252f896b3db61ec1f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.41 MB
images/006fe9d7-0756-43b5-9d83-ecee666f1c9e.jpg ADDED

Git LFS Details

  • SHA256: 2d98a67b468abc1bb025f630f86cfe356af15937a0241b07555090cd12862c40
  • Pointer size: 132 Bytes
  • Size of remote file: 1.82 MB
images/0076730b-de39-4e99-ae65-ee0114f1eb22.jpg ADDED

Git LFS Details

  • SHA256: 98a4386729dabcfa2b7dc251d14cbafcbb0c4c5caa32c2415df99ad61c9f2cc1
  • Pointer size: 132 Bytes
  • Size of remote file: 1.35 MB
images/0079fa55-8fc1-46cb-a18a-18f7d92bede8.jpg ADDED

Git LFS Details

  • SHA256: 848103aa731b41a9719fbe67050ea12e4147e7f2db09bdb0655133fae0a7e541
  • Pointer size: 132 Bytes
  • Size of remote file: 1.83 MB
images/009684a8-e0d2-4626-985e-b4367ad10cd9.jpg ADDED

Git LFS Details

  • SHA256: 4230bcfa916cd15609d75f06fb7cecad3d3b5d83fc4316a08fa944c514fb2bf7
  • Pointer size: 132 Bytes
  • Size of remote file: 2.1 MB
images/00a9df7a-0798-4b98-ab73-f79fabddc31b.jpg ADDED

Git LFS Details

  • SHA256: b13004f55600b7c586e8a82f7a195c8eed594d750586fe8826ad5e243a6a4666
  • Pointer size: 132 Bytes
  • Size of remote file: 1.4 MB
images/00ae5b93-bde2-466a-ab63-8e1f116a462b.jpg ADDED

Git LFS Details

  • SHA256: 64830f190d3a86cf5fba3405c6ccf82f11396b1c06caca8ba218d78a348ed871
  • Pointer size: 132 Bytes
  • Size of remote file: 1.64 MB
images/00c0bf2b-3fdd-4e53-9cdd-9459215d1a3d.jpg ADDED

Git LFS Details

  • SHA256: 4a89bfc156ff9a7c92eea1e23e733e1579fe2a79d54e9b7eede26e9d5b76362c
  • Pointer size: 132 Bytes
  • Size of remote file: 1.45 MB
images/00c6caa9-7d84-4317-bc27-149243cf8b33.jpg ADDED

Git LFS Details

  • SHA256: c94d922fc520e46688f1591b08098ada0590d1ba41dc0570071f90b765ade802
  • Pointer size: 132 Bytes
  • Size of remote file: 1.94 MB
images/00c96628-d4b9-4891-8d37-22028b37d2e4.jpg ADDED

Git LFS Details

  • SHA256: 2cdd5b0e212d9d391a848745890a3ef23a1eaddffc47af013206d80fc87344b0
  • Pointer size: 132 Bytes
  • Size of remote file: 3.18 MB
images/00cf9930-9120-4c10-998c-e6f5b1fc403a.jpg ADDED

Git LFS Details

  • SHA256: 1463ceb9255cfaf0e0a66b9cfde22f1ee7fa4dea29d17649f5b7a71f20ef7a1f
  • Pointer size: 132 Bytes
  • Size of remote file: 2.38 MB
images/00cfc440-1b93-4cc3-84f4-37a70062cadc.jpg ADDED

Git LFS Details

  • SHA256: 3901df4c03d0b702a8af79ede6350c94a86d6d3aa4aed51865190ac372ebbb80
  • Pointer size: 132 Bytes
  • Size of remote file: 1.76 MB
images/00cfd72a-1ffb-43c8-b9aa-6d68f72c4dc7.jpg ADDED

Git LFS Details

  • SHA256: 28dffa8085ecb7d0e7961a5069a45f2b6e1d2f0e9f66233dbafbd20c2a1e6ba7
  • Pointer size: 132 Bytes
  • Size of remote file: 1.47 MB
images/00d1ab8c-e45e-481a-b6a9-6decf00b4348.jpg ADDED

Git LFS Details

  • SHA256: 023d417a9cd1a67d3d61528b63a8a635a4b26a85d022de9be09fc00fe900d46a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.41 MB
images/00d1c5f7-5336-4ae8-bc32-523ba9511b28.jpg ADDED

Git LFS Details

  • SHA256: 2e6b057e3a60f3ad5f065e6973567416242cbf1d4d2b8972190faa9792ceda55
  • Pointer size: 132 Bytes
  • Size of remote file: 1.8 MB
images/00d21410-cfd5-41d6-ab12-b9226ffa54e0.jpg ADDED

Git LFS Details

  • SHA256: 7511d0c38d2cd412ce5ff8eb80eb22811acfd457fcd76a4da71be6ce499451fa
  • Pointer size: 132 Bytes
  • Size of remote file: 2.02 MB
images/00d36271-46c2-48bf-a525-ff68987f6771.jpg ADDED

Git LFS Details

  • SHA256: 327429c37427a68d0af4467c36ba5a9e7cc2fb94127c427a9cb586e74e33cea0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.49 MB
images/00e8aeee-79e1-4eca-a348-e96f3ff78c0f.jpg ADDED

Git LFS Details

  • SHA256: 31b8a0d7c2f6bacc765df4c46613d9d5c5217270cef14ec4e0664d6e5a1cc9b2
  • Pointer size: 132 Bytes
  • Size of remote file: 1.5 MB
images/00f19b37-155c-4357-89d0-ac1f9e44f19f.jpg ADDED

Git LFS Details

  • SHA256: 7dfd92bbed3c410dab339d7cdf18feaf1567de9351bd0cd059eb68e0ca2ff54a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.37 MB
images/010530d2-42b4-4036-911c-7127e12df916.jpg ADDED

Git LFS Details

  • SHA256: 03bf0612fb2c1a30c044bc10624b087f611d36dff0d709be72899a361fdebcc4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.94 MB
images/010803cc-ceee-44e0-a4ae-afc0600609d7.jpg ADDED

Git LFS Details

  • SHA256: 1542dc4c74413257dad7c404a66095cfbaea91637192c6d45e8a0624d4c4bb08
  • Pointer size: 132 Bytes
  • Size of remote file: 1.88 MB
images/010937f8-3309-4358-a7d5-0084527f8022.jpg ADDED

Git LFS Details

  • SHA256: 9458dc3c83eb5b7feba97084b37a4fe0eee278c2115a471a02764fdef78a7d14
  • Pointer size: 132 Bytes
  • Size of remote file: 1.62 MB
images/0110f7d4-2fc0-428e-baea-62c97abd485c.jpg ADDED

Git LFS Details

  • SHA256: e187a8ff55be73f4b9802415ded5403fd7862961e2f1c2465c49305c16440ff2
  • Pointer size: 132 Bytes
  • Size of remote file: 2.48 MB
images/011c9cdf-4f82-48e1-8037-cecfce1debfd.jpg ADDED

Git LFS Details

  • SHA256: aa836aa99e97647f6741e44999952fd1dc993159f3c3df0d4c089202b5604990
  • Pointer size: 132 Bytes
  • Size of remote file: 1.53 MB
images/012694cf-371f-44fa-aebc-0835d122d332.jpg ADDED

Git LFS Details

  • SHA256: 41dd9d57e5fd440a1d68227b7bbaa5c6bf2fce55165d3ec14ed96a94a5a24695
  • Pointer size: 132 Bytes
  • Size of remote file: 2.94 MB
images/0131fc2f-f1a3-4864-bf08-80654e11779b.jpg ADDED

Git LFS Details

  • SHA256: 23b317fe6cfdaf856315d8614a96fb863a876bb020371bcec045d9d43c7149e4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.63 MB
images/0133f3be-e07a-402a-8538-491df872ae23.jpg ADDED

Git LFS Details

  • SHA256: 266ee96d5eea0c6bfb3d9cc1d188946b08976fdef9f8cfce5409a5dd67b4442a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.52 MB
images/0140a2bb-bfcc-4fb8-93a5-227b66bfbc1d.jpg ADDED

Git LFS Details

  • SHA256: f60927d9b61157c6d1e8bb3e9c6bb00a13f2ea0053f31ed03d7fbb7a416964df
  • Pointer size: 132 Bytes
  • Size of remote file: 1.8 MB
images/01431594-ddfd-44f6-bc83-0f31fd70e6c0.jpg ADDED

Git LFS Details

  • SHA256: b919af480dbdbaa8960690413482cbf8b88381623dc1a910dbb159f8fd523811
  • Pointer size: 132 Bytes
  • Size of remote file: 2.17 MB
images/01462308-8fc4-4763-b665-d46cbae64edd.jpg ADDED

Git LFS Details

  • SHA256: 177f5a9d6a560ad3409c168e679f1b58d6586528149b33b2060361a6e2a4d654
  • Pointer size: 132 Bytes
  • Size of remote file: 1.47 MB
images/0148539a-6704-4bc8-b606-b9c57cd0f4f8.jpg ADDED

Git LFS Details

  • SHA256: 72d82fed9159669328424c2b209f0924d8073f4f5470d608659a6171a6000f52
  • Pointer size: 132 Bytes
  • Size of remote file: 1.67 MB
images/014c3c74-aba4-4e03-952e-05fdeccdeca5.jpg ADDED

Git LFS Details

  • SHA256: f8a302ea381c85b00997cfd7af4d27f8e5d770638e5b4aadab5a3757adb1232e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.51 MB
images/014f9ca0-d7fe-47c6-ae40-2a61524c960e.jpg ADDED

Git LFS Details

  • SHA256: f8a5a89563ac85cee2e5ab0ab73747e53787bbcb449a93127d05d4e24fbaf261
  • Pointer size: 132 Bytes
  • Size of remote file: 2.37 MB
images/01536db2-852a-42db-86eb-30a24fd1389c.jpg ADDED

Git LFS Details

  • SHA256: a610cad93f736d9208b4cf7f1773716602dbc6d98ac9d853909f9c33512dad0b
  • Pointer size: 132 Bytes
  • Size of remote file: 2.5 MB