nickpai commited on
Commit
00577b5
·
verified ·
1 Parent(s): 2b89c3c

Update README for loading dataset from caption-free branch

Browse files

Updated the README file to include instructions on loading the COCO 2017 Colorization Dataset from the caption-free branch of the repository. Added usage examples for loading both the train and validation splits from the caption-free branch. The README now provides clear guidance on how to choose between the main branch for original captions and the caption-free branch for prompts-free captions when loading the dataset.

Files changed (1) hide show
  1. README.md +33 -0
README.md CHANGED
@@ -91,10 +91,30 @@ unzip train2017.zip
91
  unzip val2017.zip
92
  ```
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  ### Loading the Dataset
95
 
96
  You can load this dataset using the Hugging Face `datasets` library:
97
 
 
98
  ```python
99
  from datasets import load_dataset
100
 
@@ -105,6 +125,19 @@ train_dataset = load_dataset("nickpai/coco2017-colorization", split="train")
105
  val_dataset = load_dataset("nickpai/coco2017-colorization", split="validation")
106
  ```
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  ## Filtering Criteria
109
 
110
  ### 1. Grayscale Images
 
91
  unzip val2017.zip
92
  ```
93
 
94
+ ### Branches
95
+
96
+ - **main:** Provides the original captions sentences.
97
+ - **caption-free:** Provides captions with random prompts selected from the following list:
98
+
99
+ ```python
100
+ sentences = [
101
+ "Add colors to this image",
102
+ "Give realistic colors to this image",
103
+ "Add realistic colors to this image",
104
+ "Colorize this grayscale image",
105
+ "Colorize this image",
106
+ "Restore the original colors of this image",
107
+ "Make this image colorful",
108
+ "Colorize this image as if it was taken with a color camera",
109
+ "Create the original colors of this image"
110
+ ]
111
+ ```
112
+
113
  ### Loading the Dataset
114
 
115
  You can load this dataset using the Hugging Face `datasets` library:
116
 
117
+ #### Main Branch
118
  ```python
119
  from datasets import load_dataset
120
 
 
125
  val_dataset = load_dataset("nickpai/coco2017-colorization", split="validation")
126
  ```
127
 
128
+ #### Caption-Free Branch
129
+ ```python
130
+ from datasets import load_dataset
131
+
132
+ # Load the train split of the colorization dataset from the caption-free branch
133
+ train_dataset = load_dataset("nickpai/coco2017-colorization", split="train", revision="caption-free")
134
+
135
+ # Load the validation split of the colorization dataset from the caption-free branch
136
+ val_dataset = load_dataset("nickpai/coco2017-colorization", split="validation", revision="caption-free")
137
+ ```
138
+
139
+
140
+
141
  ## Filtering Criteria
142
 
143
  ### 1. Grayscale Images