Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -33,27 +33,32 @@ quebec-traffic-signs/
|
|
| 33 |
│ ├── P-010-fr.png
|
| 34 |
│ ├── P-010-en.png
|
| 35 |
│ └── ... (all image files)
|
| 36 |
-
├──
|
| 37 |
└── README.md
|
| 38 |
```
|
| 39 |
|
| 40 |
- **`images/`**: This directory contains all the image files of the traffic signs. These include both pristine digital assets (SVG/PNG renders) and will be augmented with real-world photos captured under various challenging conditions (e.g., blur, low quality, occlusions, snow, vandalism).
|
| 41 |
-
- **`
|
|
|
|
|
|
|
|
|
|
| 42 |
- `reference_id`: A unique identifier for the sign, often corresponding to official Quebec sign codes (e.g., `P-010-fr`, `P-120-10 (left)`).
|
| 43 |
-
- `
|
| 44 |
-
- `
|
| 45 |
-
- `
|
|
|
|
|
|
|
| 46 |
|
| 47 |
## Data Collection and Annotation
|
| 48 |
|
| 49 |
-
The initial phase of data collection focuses on digital assets sourced from Wikimedia Commons, which provides high-quality SVG renders of official Quebec road signs. These digital assets are processed to extract `reference_id` and `
|
|
|
|
|
|
|
| 50 |
|
| 51 |
Future iterations will incorporate:
|
| 52 |
- **Real-world photos:** Images captured in urban environments (e.g., Montreal) under diverse conditions (varying lighting, weather, angles, partial obstructions, wear and tear, graffiti) to reflect real-world challenges.
|
| 53 |
- **Synthetic data generation:** Leveraging multimodal diffusion models (e.g., Stable Diffusion with ControlNet) to augment the dataset with synthetically generated images that simulate challenging real-world conditions, based on the pristine digital assets. This will significantly increase the dataset's robustness for edge cases.
|
| 54 |
|
| 55 |
-
Annotations are currently derived from the `alt` attributes of image tags and will be enriched with detailed explanations (French and English) and structured metadata (e.g., `source`, `real_world_conditions`, `is_synthetic`) in a `metadata.jsonl` file for more advanced use cases.
|
| 56 |
-
|
| 57 |
## Usage
|
| 58 |
|
| 59 |
This dataset is designed to be easily loaded and used with the Hugging Face `datasets` library.
|
|
@@ -65,9 +70,22 @@ from datasets import load_dataset
|
|
| 65 |
dataset = load_dataset("RDLTechworks/quebec-traffic-signs")
|
| 66 |
|
| 67 |
# Example of accessing data
|
| 68 |
-
#
|
| 69 |
-
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
```
|
| 72 |
|
| 73 |
## License
|
|
@@ -78,4 +96,4 @@ This dataset is intended for research and non-commercial use. The images sourced
|
|
| 78 |
|
| 79 |
For questions or contributions, please contact [your-email@example.com] or visit the [RDLTechworks GitHub repository](https://github.com/RDLTechworks/quebec-traffic-signs) (placeholder).
|
| 80 |
|
| 81 |
-
---
|
|
|
|
| 33 |
│ ├── P-010-fr.png
|
| 34 |
│ ├── P-010-en.png
|
| 35 |
│ └── ... (all image files)
|
| 36 |
+
├── metadata.jsonl
|
| 37 |
└── README.md
|
| 38 |
```
|
| 39 |
|
| 40 |
- **`images/`**: This directory contains all the image files of the traffic signs. These include both pristine digital assets (SVG/PNG renders) and will be augmented with real-world photos captured under various challenging conditions (e.g., blur, low quality, occlusions, snow, vandalism).
|
| 41 |
+
- **`metadata.jsonl`**: This JSON Lines file serves as the primary metadata index for the dataset. Each line is a JSON object corresponding to a unique traffic sign image and contains the following fields (aligned with the D1 database schema):
|
| 42 |
+
- `image_id`: A unique identifier for the image.
|
| 43 |
+
- `file_name`: The relative path to the image file within the `images/` directory (e.g., `images/P-010-fr.png`).
|
| 44 |
+
- `source`: Indicates the origin of the image (e.g., `digital_asset`, `real_world_photo`, `synthetic_diffusion`).
|
| 45 |
- `reference_id`: A unique identifier for the sign, often corresponding to official Quebec sign codes (e.g., `P-010-fr`, `P-120-10 (left)`).
|
| 46 |
+
- `explanation_fr`: A detailed explanation of the sign's meaning in French.
|
| 47 |
+
- `explanation_en`: A detailed explanation of the sign's meaning in English.
|
| 48 |
+
- `real_world_conditions`: A JSON array describing any real-world conditions simulated or observed (e.g., `["snow_occlusion", "blur"]`).
|
| 49 |
+
- `is_synthetic`: A boolean indicating if the image is synthetically generated.
|
| 50 |
+
- `original_url`: The original source URL from which the digital asset was downloaded (primarily Wikimedia Commons).
|
| 51 |
|
| 52 |
## Data Collection and Annotation
|
| 53 |
|
| 54 |
+
The initial phase of data collection focuses on digital assets sourced from Wikimedia Commons, which provides high-quality SVG renders of official Quebec road signs. These digital assets are processed to extract `reference_id` and `original_url`, and then downloaded locally.
|
| 55 |
+
|
| 56 |
+
Annotations, including detailed explanations (French and English) and structured metadata (e.g., `source`, `real_world_conditions`, `is_synthetic`), are compiled into the `metadata.jsonl` file.
|
| 57 |
|
| 58 |
Future iterations will incorporate:
|
| 59 |
- **Real-world photos:** Images captured in urban environments (e.g., Montreal) under diverse conditions (varying lighting, weather, angles, partial obstructions, wear and tear, graffiti) to reflect real-world challenges.
|
| 60 |
- **Synthetic data generation:** Leveraging multimodal diffusion models (e.g., Stable Diffusion with ControlNet) to augment the dataset with synthetically generated images that simulate challenging real-world conditions, based on the pristine digital assets. This will significantly increase the dataset's robustness for edge cases.
|
| 61 |
|
|
|
|
|
|
|
| 62 |
## Usage
|
| 63 |
|
| 64 |
This dataset is designed to be easily loaded and used with the Hugging Face `datasets` library.
|
|
|
|
| 70 |
dataset = load_dataset("RDLTechworks/quebec-traffic-signs")
|
| 71 |
|
| 72 |
# Example of accessing data
|
| 73 |
+
# Accessing the first example in the 'train' split
|
| 74 |
+
first_example = dataset["train"][0]
|
| 75 |
+
|
| 76 |
+
print(f"Image ID: {first_example['image_id']}")
|
| 77 |
+
print(f"Reference ID: {first_example['reference_id']}")
|
| 78 |
+
print(f"French Explanation: {first_example['explanation_fr']}")
|
| 79 |
+
print(f"English Explanation: {first_example['explanation_en']}")
|
| 80 |
+
print(f"Source: {first_example['source']}")
|
| 81 |
+
print(f"Real-world Conditions: {first_example['real_world_conditions']}")
|
| 82 |
+
print(f"Is Synthetic: {first_example['is_synthetic']}")
|
| 83 |
+
print(f"Original URL: {first_example['original_url']}")
|
| 84 |
+
|
| 85 |
+
# To display the image (requires Pillow installed: pip install Pillow)
|
| 86 |
+
# from PIL import Image
|
| 87 |
+
# image = first_example['image'] # This will be a PIL Image object
|
| 88 |
+
# image.show()
|
| 89 |
```
|
| 90 |
|
| 91 |
## License
|
|
|
|
| 96 |
|
| 97 |
For questions or contributions, please contact [your-email@example.com] or visit the [RDLTechworks GitHub repository](https://github.com/RDLTechworks/quebec-traffic-signs) (placeholder).
|
| 98 |
|
| 99 |
+
---
|