Datasets:
Tasks:
Image Segmentation
Sub-tasks:
semantic-segmentation
Languages:
English
Size:
1K<n<10K
License:
Srushti Hirve commited on
Commit ·
a57b850
1
Parent(s): 7217586
Update dataset configuration and loading script
Browse files- README.md +3 -0
- dataset-card.md +6 -0
- demo.py +3 -3
README.md
CHANGED
|
@@ -44,10 +44,13 @@ To load and preview the dataset:
|
|
| 44 |
```python
|
| 45 |
from datasets import load_dataset
|
| 46 |
|
|
|
|
| 47 |
dataset = load_dataset("shirve13/Demo", trust_remote_code=True)
|
| 48 |
print(dataset["train"][0])
|
| 49 |
```
|
| 50 |
|
|
|
|
|
|
|
| 51 |
## Dataset Loading Script
|
| 52 |
|
| 53 |
The dataset uses a custom loading script (`demo.py`) that:
|
|
|
|
| 44 |
```python
|
| 45 |
from datasets import load_dataset
|
| 46 |
|
| 47 |
+
# Load the dataset with trust_remote_code=True
|
| 48 |
dataset = load_dataset("shirve13/Demo", trust_remote_code=True)
|
| 49 |
print(dataset["train"][0])
|
| 50 |
```
|
| 51 |
|
| 52 |
+
**Note**: Make sure to use `trust_remote_code=True` as this dataset uses a custom loading script.
|
| 53 |
+
|
| 54 |
## Dataset Loading Script
|
| 55 |
|
| 56 |
The dataset uses a custom loading script (`demo.py`) that:
|
dataset-card.md
CHANGED
|
@@ -18,6 +18,12 @@ task_categories:
|
|
| 18 |
task_ids:
|
| 19 |
- semantic-segmentation
|
| 20 |
paperswithcode_id: null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
---
|
| 22 |
|
| 23 |
# Dataset Card for VisionReasoner UI Dataset
|
|
|
|
| 18 |
task_ids:
|
| 19 |
- semantic-segmentation
|
| 20 |
paperswithcode_id: null
|
| 21 |
+
configs:
|
| 22 |
+
- config_name: default
|
| 23 |
+
data_files:
|
| 24 |
+
- split: train
|
| 25 |
+
path: visionreasoner_dataset.parquet
|
| 26 |
+
default: true
|
| 27 |
---
|
| 28 |
|
| 29 |
# Dataset Card for VisionReasoner UI Dataset
|
demo.py
CHANGED
|
@@ -15,14 +15,14 @@ class Demo(datasets.GeneratorBasedBuilder):
|
|
| 15 |
)
|
| 16 |
|
| 17 |
def _split_generators(self, dl_manager):
|
| 18 |
-
# Get the
|
|
|
|
| 19 |
base_path = dl_manager.download_and_extract(".")
|
| 20 |
-
parquet_path = os.path.join(base_path, "visionreasoner_dataset.parquet")
|
| 21 |
|
| 22 |
return [
|
| 23 |
datasets.SplitGenerator(
|
| 24 |
name=datasets.Split.TRAIN,
|
| 25 |
-
gen_kwargs={"filepath":
|
| 26 |
),
|
| 27 |
]
|
| 28 |
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
def _split_generators(self, dl_manager):
|
| 18 |
+
# Get the data files from the config
|
| 19 |
+
data_files = dl_manager.download_and_extract(self.config.data_files)
|
| 20 |
base_path = dl_manager.download_and_extract(".")
|
|
|
|
| 21 |
|
| 22 |
return [
|
| 23 |
datasets.SplitGenerator(
|
| 24 |
name=datasets.Split.TRAIN,
|
| 25 |
+
gen_kwargs={"filepath": data_files["train"], "base_path": base_path}
|
| 26 |
),
|
| 27 |
]
|
| 28 |
|