Datasets:
aegishield
commited on
Commit
•
60ca221
1
Parent(s):
98ce35e
fix dir
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- README.md +9 -0
- a.py +54 -48
- images/train (1).jpg +0 -3
- images/train (10).jpg +0 -3
- images/train (100).jpg +0 -3
- images/train (101).jpg +0 -3
- images/train (102).jpg +0 -3
- images/train (103).jpg +0 -3
- images/train (104).jpg +0 -3
- images/train (105).jpg +0 -3
- images/train (106).jpg +0 -3
- images/train (107).jpg +0 -3
- images/train (108).jpg +0 -3
- images/train (109).jpg +0 -3
- images/train (11).jpg +0 -3
- images/train (110).jpg +0 -3
- images/train (111).jpg +0 -3
- images/train (112).jpg +0 -3
- images/train (113).jpg +0 -3
- images/train (114).jpg +0 -3
- images/train (115).jpg +0 -3
- images/train (116).jpg +0 -3
- images/train (117).jpg +0 -3
- images/train (118).jpg +0 -3
- images/train (119).jpg +0 -3
- images/train (12).jpg +0 -3
- images/train (120).jpg +0 -3
- images/train (121).jpg +0 -3
- images/train (122).jpg +0 -3
- images/train (123).jpg +0 -3
- images/train (124).jpg +0 -3
- images/train (125).jpg +0 -3
- images/train (126).jpg +0 -3
- images/train (127).jpg +0 -3
- images/train (128).jpg +0 -3
- images/train (129).jpg +0 -3
- images/train (13).jpg +0 -3
- images/train (130).jpg +0 -3
- images/train (131).jpg +0 -3
- images/train (132).jpg +0 -3
- images/train (133).jpg +0 -3
- images/train (134).jpg +0 -3
- images/train (135).jpg +0 -3
- images/train (136).jpg +0 -3
- images/train (137).jpg +0 -3
- images/train (138).jpg +0 -3
- images/train (139).jpg +0 -3
- images/train (14).jpg +0 -3
- images/train (140).jpg +0 -3
- images/train (141).jpg +0 -3
README.md
CHANGED
@@ -14,6 +14,15 @@ task_categories:
|
|
14 |
- image-to-text
|
15 |
task_ids:
|
16 |
- multi-label-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
---
|
18 |
|
19 |
# Dataset Card for Balinese Carving Dataset
|
|
|
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
|
a.py
CHANGED
@@ -1,49 +1,55 @@
|
|
1 |
import os
|
2 |
-
import
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
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)
|
images/train (1).jpg
DELETED
Git LFS Details
|
images/train (10).jpg
DELETED
Git LFS Details
|
images/train (100).jpg
DELETED
Git LFS Details
|
images/train (101).jpg
DELETED
Git LFS Details
|
images/train (102).jpg
DELETED
Git LFS Details
|
images/train (103).jpg
DELETED
Git LFS Details
|
images/train (104).jpg
DELETED
Git LFS Details
|
images/train (105).jpg
DELETED
Git LFS Details
|
images/train (106).jpg
DELETED
Git LFS Details
|
images/train (107).jpg
DELETED
Git LFS Details
|
images/train (108).jpg
DELETED
Git LFS Details
|
images/train (109).jpg
DELETED
Git LFS Details
|
images/train (11).jpg
DELETED
Git LFS Details
|
images/train (110).jpg
DELETED
Git LFS Details
|
images/train (111).jpg
DELETED
Git LFS Details
|
images/train (112).jpg
DELETED
Git LFS Details
|
images/train (113).jpg
DELETED
Git LFS Details
|
images/train (114).jpg
DELETED
Git LFS Details
|
images/train (115).jpg
DELETED
Git LFS Details
|
images/train (116).jpg
DELETED
Git LFS Details
|
images/train (117).jpg
DELETED
Git LFS Details
|
images/train (118).jpg
DELETED
Git LFS Details
|
images/train (119).jpg
DELETED
Git LFS Details
|
images/train (12).jpg
DELETED
Git LFS Details
|
images/train (120).jpg
DELETED
Git LFS Details
|
images/train (121).jpg
DELETED
Git LFS Details
|
images/train (122).jpg
DELETED
Git LFS Details
|
images/train (123).jpg
DELETED
Git LFS Details
|
images/train (124).jpg
DELETED
Git LFS Details
|
images/train (125).jpg
DELETED
Git LFS Details
|
images/train (126).jpg
DELETED
Git LFS Details
|
images/train (127).jpg
DELETED
Git LFS Details
|
images/train (128).jpg
DELETED
Git LFS Details
|
images/train (129).jpg
DELETED
Git LFS Details
|
images/train (13).jpg
DELETED
Git LFS Details
|
images/train (130).jpg
DELETED
Git LFS Details
|
images/train (131).jpg
DELETED
Git LFS Details
|
images/train (132).jpg
DELETED
Git LFS Details
|
images/train (133).jpg
DELETED
Git LFS Details
|
images/train (134).jpg
DELETED
Git LFS Details
|
images/train (135).jpg
DELETED
Git LFS Details
|
images/train (136).jpg
DELETED
Git LFS Details
|
images/train (137).jpg
DELETED
Git LFS Details
|
images/train (138).jpg
DELETED
Git LFS Details
|
images/train (139).jpg
DELETED
Git LFS Details
|
images/train (14).jpg
DELETED
Git LFS Details
|
images/train (140).jpg
DELETED
Git LFS Details
|
images/train (141).jpg
DELETED
Git LFS Details
|