Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
1K - 10K
Tags:
art
License:
Commit ·
d109e5d
1
Parent(s): f3f157e
up
Browse files- dataset_ini.py +1 -2
dataset_ini.py
CHANGED
|
@@ -5,7 +5,6 @@ import os
|
|
| 5 |
def load_data(csv_file, images_folder):
|
| 6 |
df = pd.read_csv(csv_file)
|
| 7 |
# Update the image_path column to include the full path
|
| 8 |
-
df['image_path'] = df['image_path'].apply(lambda x: os.path.join(images_folder, x))
|
| 9 |
df['label'] = df['label'].astype(int)
|
| 10 |
dataset = Dataset.from_pandas(df)
|
| 11 |
return dataset
|
|
@@ -47,4 +46,4 @@ def load_dataset():
|
|
| 47 |
if __name__ == "__main__":
|
| 48 |
dataset = load_dataset()
|
| 49 |
print(dataset)
|
| 50 |
-
|
|
|
|
| 5 |
def load_data(csv_file, images_folder):
|
| 6 |
df = pd.read_csv(csv_file)
|
| 7 |
# Update the image_path column to include the full path
|
|
|
|
| 8 |
df['label'] = df['label'].astype(int)
|
| 9 |
dataset = Dataset.from_pandas(df)
|
| 10 |
return dataset
|
|
|
|
| 46 |
if __name__ == "__main__":
|
| 47 |
dataset = load_dataset()
|
| 48 |
print(dataset)
|
| 49 |
+
|