aegishield commited on
Commit
65891bf
1 Parent(s): 60ca221
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +0 -9
  2. a.py +44 -46
  3. images/test/train (107).jpg +3 -0
  4. images/test/train (115).jpg +3 -0
  5. images/test/train (126).jpg +3 -0
  6. images/test/train (141).jpg +3 -0
  7. images/test/train (157).jpg +3 -0
  8. images/test/train (172).jpg +3 -0
  9. images/test/train (173).jpg +3 -0
  10. images/test/train (180).jpg +3 -0
  11. images/test/train (197).jpg +3 -0
  12. images/test/train (201).jpg +3 -0
  13. images/test/train (21).jpg +3 -0
  14. images/test/train (221).jpg +3 -0
  15. images/test/train (227).jpg +3 -0
  16. images/test/train (229).jpg +3 -0
  17. images/test/train (244).jpg +3 -0
  18. images/test/train (245).jpg +3 -0
  19. images/test/train (25).jpg +3 -0
  20. images/test/train (251).jpg +3 -0
  21. images/test/train (258).jpg +3 -0
  22. images/test/train (266).jpg +3 -0
  23. images/test/train (269).jpg +3 -0
  24. images/test/train (280).jpg +3 -0
  25. images/test/train (283).jpg +3 -0
  26. images/test/train (287).jpg +3 -0
  27. images/test/train (289).jpg +3 -0
  28. images/test/train (29).jpg +3 -0
  29. images/test/train (290).jpg +3 -0
  30. images/test/train (292).jpg +3 -0
  31. images/test/train (306).jpg +3 -0
  32. images/test/train (336).jpg +3 -0
  33. images/test/train (345).jpg +3 -0
  34. images/test/train (355).jpg +3 -0
  35. images/test/train (362).jpg +3 -0
  36. images/test/train (366).jpg +3 -0
  37. images/test/train (369).jpg +3 -0
  38. images/test/train (37).jpg +3 -0
  39. images/test/train (399).jpg +3 -0
  40. images/test/train (402).jpg +3 -0
  41. images/test/train (410).jpg +3 -0
  42. images/test/train (53).jpg +3 -0
  43. images/test/train (59).jpg +3 -0
  44. images/test/train (66).jpg +3 -0
  45. images/test/train (93).jpg +3 -0
  46. images/train/train (1).jpg +3 -0
  47. images/train/train (10).jpg +3 -0
  48. images/train/train (100).jpg +3 -0
  49. images/train/train (102).jpg +3 -0
  50. images/train/train (103).jpg +3 -0
README.md CHANGED
@@ -14,15 +14,6 @@ task_categories:
14
  - image-to-text
15
  task_ids:
16
  - multi-label-classification
17
- configs:
18
- - config_name: default
19
- data_files:
20
- - split: train
21
- path: "train.csv"
22
- - split: test
23
- path: "test.csv"
24
- - split: validation
25
- path: "validation.csv"
26
  ---
27
 
28
  # Dataset Card for Balinese Carving Dataset
 
14
  - image-to-text
15
  task_ids:
16
  - multi-label-classification
 
 
 
 
 
 
 
 
 
17
  ---
18
 
19
  # Dataset Card for Balinese Carving Dataset
a.py CHANGED
@@ -2,54 +2,52 @@ import os
2
  import shutil
3
  import pandas as pd
4
 
5
- # # Define the image folder and CSV files
6
- # image_folder = "images/"
7
- # train_csv = 'train.csv'
8
- # val_csv = 'validation.csv'
9
- # test_csv = 'test.csv'
10
-
11
- # # Load the CSV files
12
- # train_df = pd.read_csv(train_csv)
13
- # val_df = pd.read_csv(val_csv)
14
- # test_df = pd.read_csv(test_csv)
15
-
16
- # # Create directories for train, test, validation images
17
- # train_dir = 'images/train/'
18
- # val_dir = 'images/validation/'
19
- # test_dir = 'images/test/'
20
-
21
- # os.makedirs(train_dir, exist_ok=True)
22
- # os.makedirs(val_dir, exist_ok=True)
23
- # os.makedirs(test_dir, exist_ok=True)
24
-
25
- # # Define a function to copy images to the respective folder
26
- # def copy_images(df, destination_folder):
27
- # for file_name in df['file_name']:
28
- # # Construct the full path for the image
29
- # src_path = os.path.join(image_folder, file_name)
30
- # # Construct the destination path
31
- # dest_path = os.path.join(destination_folder, os.path.basename(file_name))
32
- # # Copy the image
33
- # if os.path.exists(src_path):
34
- # shutil.copy(src_path, dest_path)
35
-
36
- # # Copy the images based on the CSVs
37
- # copy_images(train_df, train_dir)
38
- # copy_images(val_df, val_dir)
39
- # copy_images(test_df, test_dir)
40
 
41
  # Load the CSV files
42
- train_df = pd.read_csv('train.csv')
43
- val_df = pd.read_csv('validation.csv')
44
- test_df = pd.read_csv('test.csv')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- # Update file_name with respective image directories
47
- train_df['file_name'] = 'images/train/' + train_df['file_name'].apply(os.path.basename)
48
- val_df['file_name'] = 'images/validation/' + val_df['file_name'].apply(os.path.basename)
49
- test_df['file_name'] = 'images/test/' + test_df['file_name'].apply(os.path.basename)
 
 
 
 
 
50
 
51
- # Combine all three datasets
52
- combined_df = pd.concat([train_df, val_df, test_df], ignore_index=True)
53
 
54
- # Save the combined dataset
55
- combined_df.to_csv('metadata.csv', index=False)
 
2
  import shutil
3
  import pandas as pd
4
 
5
+ # Define the image folder and CSV files
6
+ image_folder = "images/"
7
+ train_csv = 'train_caption.csv'
8
+ val_csv = 'validation_caption.csv'
9
+ test_csv = 'test_caption.csv'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  # Load the CSV files
12
+ train_df = pd.read_csv(train_csv)
13
+ val_df = pd.read_csv(val_csv)
14
+ test_df = pd.read_csv(test_csv)
15
+
16
+ # Create directories for train, test, validation images
17
+ train_dir = 'images/train/'
18
+ val_dir = 'images/validation/'
19
+ test_dir = 'images/test/'
20
+
21
+ os.makedirs(train_dir, exist_ok=True)
22
+ os.makedirs(val_dir, exist_ok=True)
23
+ os.makedirs(test_dir, exist_ok=True)
24
+
25
+ # Define a function to copy images to the respective folder
26
+ def copy_images(df, destination_folder):
27
+ for file_name in df['file_name']:
28
+ # Construct the destination path
29
+ dest_path = os.path.join(destination_folder, os.path.basename(file_name))
30
+ # Copy the image
31
+ if os.path.exists(file_name):
32
+ shutil.copy(file_name, dest_path)
33
+
34
+ # Copy the images based on the CSVs
35
+ copy_images(train_df, train_dir)
36
+ copy_images(val_df, val_dir)
37
+ copy_images(test_df, test_dir)
38
 
39
+ # Load the CSV files
40
+ # train_df = pd.read_csv('train.csv')
41
+ # val_df = pd.read_csv('validation.csv')
42
+ # test_df = pd.read_csv('test.csv')
43
+
44
+ # # Update file_name with respective image directories
45
+ # train_df['file_name'] = 'images/train/' + train_df['file_name'].apply(os.path.basename)
46
+ # val_df['file_name'] = 'images/validation/' + val_df['file_name'].apply(os.path.basename)
47
+ # test_df['file_name'] = 'images/test/' + test_df['file_name'].apply(os.path.basename)
48
 
49
+ # # Combine all three datasets
50
+ # combined_df = pd.concat([train_df, val_df, test_df], ignore_index=True)
51
 
52
+ # # Save the combined dataset
53
+ # combined_df.to_csv('metadata.csv', index=False)
images/test/train (107).jpg ADDED

Git LFS Details

  • SHA256: 795952ad985dab8b8a96c6e7cf55ac91f2ef0ccc457ea9dc6c43acd31d6cf9f8
  • Pointer size: 131 Bytes
  • Size of remote file: 222 kB
images/test/train (115).jpg ADDED

Git LFS Details

  • SHA256: 477e64558bb8452cd6ccb29a36ba36487535e8e3e8e03acac69db7551d0ec8f2
  • Pointer size: 131 Bytes
  • Size of remote file: 220 kB
images/test/train (126).jpg ADDED

Git LFS Details

  • SHA256: 87d0c8b862738f1a572a9b08f6a43d875d1b4d65d20899de1cc52081303c697e
  • Pointer size: 131 Bytes
  • Size of remote file: 221 kB
images/test/train (141).jpg ADDED

Git LFS Details

  • SHA256: efa02359e0952900de4dd0f36d61c6a6a5c8914e4eab131e8594c4ca8a335a81
  • Pointer size: 131 Bytes
  • Size of remote file: 341 kB
images/test/train (157).jpg ADDED

Git LFS Details

  • SHA256: ca385d60e1a064b41440172490c4413453ad330dd732b51335c17dc81a37f9ca
  • Pointer size: 131 Bytes
  • Size of remote file: 331 kB
images/test/train (172).jpg ADDED

Git LFS Details

  • SHA256: 0fd8803eb8fc9fe3bed0f2b46edc33319b64102ddc16a4b360d32db95da01221
  • Pointer size: 131 Bytes
  • Size of remote file: 334 kB
images/test/train (173).jpg ADDED

Git LFS Details

  • SHA256: 9b6534872e2c6b447d7996df8bf4a2453cd36744ebe0001f4a253742db5f59c5
  • Pointer size: 131 Bytes
  • Size of remote file: 337 kB
images/test/train (180).jpg ADDED

Git LFS Details

  • SHA256: ead4c2009990032a179e80599183834e90a6a26772e342bde533986385ccf7e4
  • Pointer size: 131 Bytes
  • Size of remote file: 333 kB
images/test/train (197).jpg ADDED

Git LFS Details

  • SHA256: 3c3702f4d45ffc34150b5d5b7ccfb0aa7ce0c668c9665ab5a7f9fce99528afb8
  • Pointer size: 131 Bytes
  • Size of remote file: 337 kB
images/test/train (201).jpg ADDED

Git LFS Details

  • SHA256: a647bbea87ee2c6cc5d46862df777d4e7c008c37aecf1d0df22a1e2d86157f84
  • Pointer size: 131 Bytes
  • Size of remote file: 336 kB
images/test/train (21).jpg ADDED

Git LFS Details

  • SHA256: 2d776d99fe869bfb3a6327c9ba6da89c33ea867ed61e0c3ba8e1e87c6fc9b204
  • Pointer size: 131 Bytes
  • Size of remote file: 338 kB
images/test/train (221).jpg ADDED

Git LFS Details

  • SHA256: 5e8f2a6de87a71b9213f7471cc3c7e735ce6981200a01e23fc5c56acede404c3
  • Pointer size: 131 Bytes
  • Size of remote file: 360 kB
images/test/train (227).jpg ADDED

Git LFS Details

  • SHA256: 261d8137ac3afecf5bfd0383d3c290caa59524f1ebe3b1316f6b751cb9295b51
  • Pointer size: 131 Bytes
  • Size of remote file: 352 kB
images/test/train (229).jpg ADDED

Git LFS Details

  • SHA256: be17f15f3e49101f9dfd638cfb01d7c97c40573a3765add2f55c73dcded5d589
  • Pointer size: 131 Bytes
  • Size of remote file: 347 kB
images/test/train (244).jpg ADDED

Git LFS Details

  • SHA256: 51a2ee98a25fd8414f2a9e7df52441f8c652189bca5c4dffd52248a6a4c411df
  • Pointer size: 131 Bytes
  • Size of remote file: 328 kB
images/test/train (245).jpg ADDED

Git LFS Details

  • SHA256: e4eb9ce2bee0dd687c0949daecfadd3dbbd656aeed192722870a33770fdd859a
  • Pointer size: 131 Bytes
  • Size of remote file: 322 kB
images/test/train (25).jpg ADDED

Git LFS Details

  • SHA256: 62288d77a3b3d1e1917a6809a29c401ec455d4b1096b5f21b88d46a29d3b3514
  • Pointer size: 131 Bytes
  • Size of remote file: 328 kB
images/test/train (251).jpg ADDED

Git LFS Details

  • SHA256: 7b55529c7a9a59fc8877d25defca2238481fabc8562cfc1fe76a106a09f8dd66
  • Pointer size: 131 Bytes
  • Size of remote file: 305 kB
images/test/train (258).jpg ADDED

Git LFS Details

  • SHA256: 8b0f90b514739a8b04b000b3e95d6a2745f2d26b49f931870e66c0f3049da434
  • Pointer size: 131 Bytes
  • Size of remote file: 303 kB
images/test/train (266).jpg ADDED

Git LFS Details

  • SHA256: c37c5d0464a53e6aef8bba835f474228d16b516124dd5555db6fdc88afea83fd
  • Pointer size: 131 Bytes
  • Size of remote file: 266 kB
images/test/train (269).jpg ADDED

Git LFS Details

  • SHA256: 1b207b58e284fbb16f33f1d8eb9189e74153426834e07c255234a07a83dde19f
  • Pointer size: 131 Bytes
  • Size of remote file: 257 kB
images/test/train (280).jpg ADDED

Git LFS Details

  • SHA256: 477caa43dd76836fc53326f04894370945e86e0416846e82caeb7bcdcba95aa5
  • Pointer size: 131 Bytes
  • Size of remote file: 240 kB
images/test/train (283).jpg ADDED

Git LFS Details

  • SHA256: c9c5d55a48f44f6d4ec2317ff41379cf69837f440db0a472adc46dd062cc765e
  • Pointer size: 131 Bytes
  • Size of remote file: 240 kB
images/test/train (287).jpg ADDED

Git LFS Details

  • SHA256: f61a7ee3679339dc2fe8a78e33513b82f218691a1398127476a06f3fd7b95c03
  • Pointer size: 131 Bytes
  • Size of remote file: 235 kB
images/test/train (289).jpg ADDED

Git LFS Details

  • SHA256: 11832f7b6de9f5dd9ef155298ec395b3558b6f9ba4be4443558bd09a359081a0
  • Pointer size: 131 Bytes
  • Size of remote file: 234 kB
images/test/train (29).jpg ADDED

Git LFS Details

  • SHA256: 40da1988efa4ab09423d10af83cf6b648ecf568225d16f6feaad816efc51c935
  • Pointer size: 131 Bytes
  • Size of remote file: 323 kB
images/test/train (290).jpg ADDED

Git LFS Details

  • SHA256: d128736b27abf01d2ddd06415f67826bde6d3c26ca39b81fcc5f560e17fa2fc5
  • Pointer size: 131 Bytes
  • Size of remote file: 237 kB
images/test/train (292).jpg ADDED

Git LFS Details

  • SHA256: f2b5326d93444002e48d256fad031f39d6320ccb37e04b737f47dbaefaaae5f5
  • Pointer size: 131 Bytes
  • Size of remote file: 232 kB
images/test/train (306).jpg ADDED

Git LFS Details

  • SHA256: ede85bb087fb48afe07f8948901bc088f5a24aa29ecc86e22d0dd5c03560aae3
  • Pointer size: 131 Bytes
  • Size of remote file: 227 kB
images/test/train (336).jpg ADDED

Git LFS Details

  • SHA256: 283c03c2eba3295a189745fddbc1dc547a0b1ea15b5a6f8e059283beb144bdb1
  • Pointer size: 131 Bytes
  • Size of remote file: 344 kB
images/test/train (345).jpg ADDED

Git LFS Details

  • SHA256: a651bcf0c18a5fa2773cfbbd33ede97423cffd93653dbc6528d624b3ab325ed4
  • Pointer size: 131 Bytes
  • Size of remote file: 339 kB
images/test/train (355).jpg ADDED

Git LFS Details

  • SHA256: 758cc18994324df020d7a8be29e9a7fefa3a37429cadf6cac2129450013c8174
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB
images/test/train (362).jpg ADDED

Git LFS Details

  • SHA256: b01241a76135ab1552dd79b86b3089ef6e49608db47a01898ba1ccf4243a96a2
  • Pointer size: 131 Bytes
  • Size of remote file: 351 kB
images/test/train (366).jpg ADDED

Git LFS Details

  • SHA256: 68138f67ba61bad57192240848135ab29ef406249805d8f46729337393df0ea5
  • Pointer size: 131 Bytes
  • Size of remote file: 344 kB
images/test/train (369).jpg ADDED

Git LFS Details

  • SHA256: 551eb259bd94c0f2e9617b04aa75a9f4ac8d8d5a3fa0e28bfcafe69e8c85abf7
  • Pointer size: 131 Bytes
  • Size of remote file: 342 kB
images/test/train (37).jpg ADDED

Git LFS Details

  • SHA256: b4e3708ca2a4072cf2ae624f39189a2ce7bec0d18780828972af5c6e81de78c1
  • Pointer size: 131 Bytes
  • Size of remote file: 300 kB
images/test/train (399).jpg ADDED

Git LFS Details

  • SHA256: 87bd26d104b797d5406247586b7591d94d0424490c1bf73b2d3e468a9f36512e
  • Pointer size: 131 Bytes
  • Size of remote file: 383 kB
images/test/train (402).jpg ADDED

Git LFS Details

  • SHA256: 65c5045681c0339470dffd83eb3965e21366ede2e6f633803c29678e1f58e61f
  • Pointer size: 131 Bytes
  • Size of remote file: 389 kB
images/test/train (410).jpg ADDED

Git LFS Details

  • SHA256: 53721ec268b9bdfb64ae25a8557d55506a1c756333a261377310c40850ced76c
  • Pointer size: 131 Bytes
  • Size of remote file: 362 kB
images/test/train (53).jpg ADDED

Git LFS Details

  • SHA256: 4605004115540d2fc2fd4273517abea6f28177c83c763172eb4a52866caebc35
  • Pointer size: 131 Bytes
  • Size of remote file: 253 kB
images/test/train (59).jpg ADDED

Git LFS Details

  • SHA256: b5b37c4068b7b0b82b214af03ecd13224de5d4aed6dec78900c1c5ac02308619
  • Pointer size: 131 Bytes
  • Size of remote file: 238 kB
images/test/train (66).jpg ADDED

Git LFS Details

  • SHA256: f50fb45bf337961c355f3e3b44ad498ac7802e9a706ae2701df820439d3ae988
  • Pointer size: 131 Bytes
  • Size of remote file: 273 kB
images/test/train (93).jpg ADDED

Git LFS Details

  • SHA256: 395dd0cb0c1f6a92aee332057f6e41716f9de3406700aa067d23358b66e1fb3f
  • Pointer size: 131 Bytes
  • Size of remote file: 226 kB
images/train/train (1).jpg ADDED

Git LFS Details

  • SHA256: 009b6e52712cbf144e275d35a055231b49a271afad6a4714b01b7db33e626bf8
  • Pointer size: 131 Bytes
  • Size of remote file: 326 kB
images/train/train (10).jpg ADDED

Git LFS Details

  • SHA256: 34e682e5d6e5b648f6f24a71f34fa025e92bcc7d5df96efe7779597549f93026
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
images/train/train (100).jpg ADDED

Git LFS Details

  • SHA256: 93b0039df4cba33aefb69e8029c551e95aad6c42b5818a1ae285cd37f9653d22
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB
images/train/train (102).jpg ADDED

Git LFS Details

  • SHA256: b164e882d2211d17557f54a625a8914c403df383288ae97cfedac2802cc0af96
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB
images/train/train (103).jpg ADDED

Git LFS Details

  • SHA256: a471f439f0457ea2fb151005f03d135d6a15b93422b2afdfd8b46768e3452fd6
  • Pointer size: 131 Bytes
  • Size of remote file: 227 kB