Alexandre Lordelo commited on
Commit
f4901ba
·
1 Parent(s): 8db004b

Upload dataset and images to CG2RealDataset3

Browse files
.DS_Store ADDED
Binary file (6.15 kB). View file
 
CG2RealDataset.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ input_image_path;conditioning_image_path;image_caption
2
+ input_image/image1.jpg;conditioning_image/image1.jpg;Woman with white shirt
3
+ input_image/image2.jpg;conditioning_image/image2.jpg;Woman with white shirt
CG2RealDataset/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1/csv-train.arrow ADDED
Binary file (1.06 kB). View file
 
CG2RealDataset/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1/dataset_info.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"description": "", "citation": "", "homepage": "", "license": "", "features": {"input_image": {"dtype": "string", "_type": "Value"}, "conditioning_image": {"dtype": "float64", "_type": "Value"}, "image_caption": {"dtype": "float64", "_type": "Value"}}, "builder_name": "csv", "config_name": "default", "version": {"version_str": "0.0.0", "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 266, "num_examples": 3, "dataset_name": "csv"}}, "download_checksums": {"/Users/alexandrelordelo/CG2RealDataset2/CG2RealDataset.csv": {"num_bytes": 208, "checksum": null}}, "download_size": 208, "dataset_size": 266, "size_in_bytes": 474}
CG2RealDataset/data-00000-of-00001.arrow ADDED
Binary file (992 Bytes). View file
 
CG2RealDataset/dataset_info.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "citation": "",
3
+ "description": "",
4
+ "features": {
5
+ "train": {
6
+ "conditioning_image": {
7
+ "dtype": "null",
8
+ "_type": "Value"
9
+ },
10
+ "image_caption": {
11
+ "dtype": "null",
12
+ "_type": "Value"
13
+ },
14
+ "input_image": {
15
+ "dtype": "string",
16
+ "_type": "Value"
17
+ }
18
+ }
19
+ },
20
+ "homepage": "",
21
+ "license": ""
22
+ }
CG2RealDataset/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "f5f5b0d9c9ff429d",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": null
13
+ }
conditioning_image/image1.jpeg ADDED
input_image/image1.jpeg ADDED
load.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datasets import Dataset, DatasetDict
2
+
3
+ def load_dataset():
4
+ data = {
5
+ "train": {
6
+ "input_image": ["input_image/image1.jpeg"],
7
+ "conditioning_image": ["conditioning_image/image1.jpeg"],
8
+ "image_caption": ["Example caption"],
9
+ },
10
+ # Add more samples here
11
+ }
12
+ dataset_dict = DatasetDict({split: Dataset.from_dict(samples) for split, samples in data.items()})
13
+ return dataset_dict
load_and_check_dataset.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from load import load_dataset
2
+
3
+ dataset = load_dataset()
4
+
5
+ print("Column names: ", dataset["train"].column_names)
6
+ print("Sample data: ", dataset["train"][0])
load_dataset.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datasets import load_dataset, Dataset
2
+
3
+ data_files = ['/Users/alexandrelordelo/CG2RealDataset2/CG2RealDataset.csv']
4
+ dataset = load_dataset(
5
+ 'csv',
6
+ data_files=data_files,
7
+ column_names=["input_image", "conditioning_image", "image_caption"],
8
+ delimiter=',',
9
+ quotechar='"',
10
+ quoting=0,
11
+ )
12
+
13
+ dataset = Dataset.from_dict(dataset) # Convert the dataset to a Hugging Face Dataset object
14
+ dataset.save_to_disk('/Users/alexandrelordelo/CG2RealDataset2/CG2RealDataset') # Save the dataset to a folder