Datasets:
Tasks:
Object Detection
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
1K - 10K
ArXiv:
License:
Add full dataset card
Browse files
README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
---
|
| 2 |
-
annotations_creators:
|
|
|
|
| 3 |
language: en
|
| 4 |
license: cc-by-nc-3.0
|
| 5 |
size_categories:
|
| 6 |
- 1K<n<10K
|
| 7 |
-
task_categories:
|
|
|
|
| 8 |
task_ids: []
|
| 9 |
-
pretty_name:
|
| 10 |
tags:
|
| 11 |
- active-learning
|
| 12 |
- data-curation
|
|
@@ -16,15 +18,15 @@ tags:
|
|
| 16 |
- power-line-inspection
|
| 17 |
- uav
|
| 18 |
- unlabeled
|
| 19 |
-
description:
|
| 20 |
imagery), built for a hands-on FiftyOne workshop on rare-class data curation. No
|
| 21 |
label fields are attached by design -- this is a genuine cold-start pool for practicing
|
| 22 |
compression, embedding, seeded similarity mining, and annotation prioritization
|
| 23 |
before ever touching a model. A deterministic 4-tier stratified sample (seed=51)
|
| 24 |
-
drawn from the full 10,561-image InsPLAD-det
|
| 25 |
-
rare mining target), 562 images from 14 intact drone-flight sequences (a real
|
| 26 |
-
wall), 1,210 images across `polymer insulator` / `glass insulator`
|
| 27 |
-
embedding clusters), and 213 long-tail images for texture.
|
| 28 |
dataset_summary: '
|
| 29 |
|
| 30 |
|
|
@@ -72,13 +74,7 @@ dataset_summary: '
|
|
| 72 |
'
|
| 73 |
---
|
| 74 |
|
| 75 |
-
# Dataset Card for
|
| 76 |
-
|
| 77 |
-
<!-- Provide a quick summary of the dataset. -->
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
|
| 83 |
This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 2227 samples.
|
| 84 |
|
|
@@ -104,135 +100,340 @@ dataset = load_from_hub("harpreetsahota/InsPLAD-workshop-pool")
|
|
| 104 |
session = fo.launch_app(dataset)
|
| 105 |
```
|
| 106 |
|
| 107 |
-
|
| 108 |
## Dataset Details
|
| 109 |
|
| 110 |
### Dataset Description
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
#
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
- **
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
## Uses
|
| 131 |
|
| 132 |
-
<!-- Address questions around how the dataset is intended to be used. -->
|
| 133 |
-
|
| 134 |
### Direct Use
|
| 135 |
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
### Out-of-Scope Use
|
| 141 |
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
## Dataset Structure
|
| 147 |
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
-
|
| 151 |
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
-
###
|
| 155 |
-
|
| 156 |
-
<!-- Motivation for the creation of this dataset. -->
|
| 157 |
-
|
| 158 |
-
[More Information Needed]
|
| 159 |
-
|
| 160 |
-
### Source Data
|
| 161 |
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
|
| 166 |
-
|
| 167 |
|
| 168 |
-
|
| 169 |
|
| 170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
|
| 172 |
-
|
|
|
|
| 173 |
|
| 174 |
-
|
| 175 |
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
|
| 180 |
-
|
|
|
|
|
|
|
| 181 |
|
| 182 |
-
|
| 183 |
|
| 184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
-
|
| 187 |
|
| 188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
| 191 |
|
| 192 |
-
###
|
| 193 |
-
|
| 194 |
-
<!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
|
| 195 |
|
| 196 |
-
|
| 197 |
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
-
|
| 201 |
|
| 202 |
-
|
|
|
|
|
|
|
| 203 |
|
| 204 |
-
###
|
| 205 |
|
| 206 |
-
|
|
|
|
|
|
|
|
|
|
| 207 |
|
| 208 |
-
|
| 209 |
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
| 211 |
|
| 212 |
-
|
| 213 |
|
| 214 |
**BibTeX:**
|
| 215 |
|
| 216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
**APA:**
|
| 219 |
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
## Glossary [optional]
|
| 223 |
-
|
| 224 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
|
| 225 |
-
|
| 226 |
-
[More Information Needed]
|
| 227 |
|
| 228 |
-
## More Information
|
| 229 |
|
| 230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
|
| 232 |
-
## Dataset Card Authors
|
| 233 |
|
| 234 |
-
|
| 235 |
|
| 236 |
## Dataset Card Contact
|
| 237 |
|
| 238 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- no-annotation
|
| 4 |
language: en
|
| 5 |
license: cc-by-nc-3.0
|
| 6 |
size_categories:
|
| 7 |
- 1K<n<10K
|
| 8 |
+
task_categories:
|
| 9 |
+
- object-detection
|
| 10 |
task_ids: []
|
| 11 |
+
pretty_name: InsPLAD Workshop Pool
|
| 12 |
tags:
|
| 13 |
- active-learning
|
| 14 |
- data-curation
|
|
|
|
| 18 |
- power-line-inspection
|
| 19 |
- uav
|
| 20 |
- unlabeled
|
| 21 |
+
description: A 2,227-image, media-only sample of InsPLAD-det (UAV power line inspection
|
| 22 |
imagery), built for a hands-on FiftyOne workshop on rare-class data curation. No
|
| 23 |
label fields are attached by design -- this is a genuine cold-start pool for practicing
|
| 24 |
compression, embedding, seeded similarity mining, and annotation prioritization
|
| 25 |
before ever touching a model. A deterministic 4-tier stratified sample (seed=51)
|
| 26 |
+
drawn from the full 10,561-image InsPLAD-det -- all 242 `tower id plate` images
|
| 27 |
+
(the rare mining target), 562 images from 14 intact drone-flight sequences (a real
|
| 28 |
+
near-duplicate wall), 1,210 images across `polymer insulator` / `glass insulator`
|
| 29 |
+
/ `yoke` (clean embedding clusters), and 213 long-tail images for texture.
|
| 30 |
dataset_summary: '
|
| 31 |
|
| 32 |
|
|
|
|
| 74 |
'
|
| 75 |
---
|
| 76 |
|
| 77 |
+
# Dataset Card for InsPLAD Workshop Pool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 2227 samples.
|
| 80 |
|
|
|
|
| 100 |
session = fo.launch_app(dataset)
|
| 101 |
```
|
| 102 |
|
|
|
|
| 103 |
## Dataset Details
|
| 104 |
|
| 105 |
### Dataset Description
|
| 106 |
|
| 107 |
+
InsPLAD Workshop Pool is a 2,227-image, **media-only** sample of
|
| 108 |
+
[InsPLAD-det](https://huggingface.co/datasets/harpreetsahota/InsPLAD), built to
|
| 109 |
+
teach a rare-class data curation workflow in FiftyOne: compress a raw image pool,
|
| 110 |
+
embed it, mine a rare class from a handful of seed examples, prioritize the rest
|
| 111 |
+
for annotation, fine-tune a detector, and correct its mistakes. This dataset ships
|
| 112 |
+
with **zero label fields by design** -- the point of the exercise is deciding which
|
| 113 |
+
images deserve human attention before any labels exist. The images sampled into
|
| 114 |
+
this pool were deliberately stratified (not randomly subsampled) so that every
|
| 115 |
+
step of that workflow has something real to find: a genuine rare class, genuine
|
| 116 |
+
near-duplicate sequences, and genuine common-class clusters. See
|
| 117 |
+
[Curation Rationale](#curation-rationale) below for exactly how, and the original
|
| 118 |
+
scripts under `workshop-notebook/` in the
|
| 119 |
+
[source repository](https://github.com/andreluizbvs/InsPLAD) companion materials
|
| 120 |
+
for the full, runnable pipeline.
|
| 121 |
+
|
| 122 |
+
- **Curated by:** Harpreet Sahota (Voxel51), sampled from InsPLAD (see Dataset
|
| 123 |
+
Sources for the original dataset's curators)
|
| 124 |
+
- **Funded by:** N/A (derivative sample; see original InsPLAD for its funding)
|
| 125 |
+
- **Shared by:** Harpreet Sahota, via Hugging Face Hub
|
| 126 |
+
- **Language(s):** en (asset class names in the source data; not an NLP dataset)
|
| 127 |
+
- **License:** cc-by-nc-3.0 (inherited from InsPLAD; non-commercial use only)
|
| 128 |
+
|
| 129 |
+
### Dataset Sources
|
| 130 |
+
|
| 131 |
+
- **Repository:** https://github.com/andreluizbvs/InsPLAD
|
| 132 |
+
- **Paper:** InsPLAD: A Dataset and Benchmark for Power Line Asset Inspection in
|
| 133 |
+
UAV Images, International Journal of Remote Sensing (2023),
|
| 134 |
+
https://arxiv.org/abs/2311.01619
|
| 135 |
+
- **Original data download:** https://data.mendeley.com/datasets/5n3fjgvfyz/1
|
| 136 |
+
- **Full FiftyOne build (all 3 InsPLAD sub-datasets, with labels):**
|
| 137 |
+
https://huggingface.co/datasets/harpreetsahota/InsPLAD
|
| 138 |
|
| 139 |
## Uses
|
| 140 |
|
|
|
|
|
|
|
| 141 |
### Direct Use
|
| 142 |
|
| 143 |
+
Practicing (or teaching) a rare-class data curation loop end to end: near-duplicate
|
| 144 |
+
compression, embedding-based visual exploration, seeded similarity search for a
|
| 145 |
+
rare class, uniqueness/representativeness-based annotation prioritization,
|
| 146 |
+
detector fine-tuning on the curated subset, and model-assisted correction. Also
|
| 147 |
+
useful as a small, realistic stand-in for InsPLAD-det when testing FiftyOne
|
| 148 |
+
workflows without downloading the full 10,561-image, 4.2 GB source dataset.
|
| 149 |
|
| 150 |
### Out-of-Scope Use
|
| 151 |
|
| 152 |
+
Not intended as a benchmark dataset for reporting detection accuracy -- it is a
|
| 153 |
+
deliberately non-random, stratified sample built for a specific teaching workflow,
|
| 154 |
+
not an i.i.d. sample of InsPLAD-det. Any commercial use is out of scope; the
|
| 155 |
+
source license (CC BY-NC 3.0) is non-commercial only. Not suitable for identifying
|
| 156 |
+
individuals; it contains no personal or sensitive data by design (aerial images of
|
| 157 |
+
power line hardware only).
|
| 158 |
|
| 159 |
## Dataset Structure
|
| 160 |
|
| 161 |
+
This is a flat image dataset (`media_type = "image"`), not grouped or video, with
|
| 162 |
+
**2,227 samples** and no splits or saved views. Every sample carries only
|
| 163 |
+
FiftyOne's default fields -- there is no `ground_truth`, no per-sample split tag,
|
| 164 |
+
and no per-sample sampling-tier label. This is intentional: the dataset is meant
|
| 165 |
+
to be loaded and explored exactly as if no prior work had been done on it.
|
| 166 |
|
| 167 |
+
### Fields
|
| 168 |
|
| 169 |
+
| Field | FiftyOne type | Description |
|
| 170 |
+
|-------|---------------|-------------|
|
| 171 |
+
| `filepath` | `StringField` | Path to the image file |
|
| 172 |
+
| `tags` | list of `str` | Empty for every sample -- no split or tier tags are shipped |
|
| 173 |
+
| `metadata` | `ImageMetadata` | Not populated (`None`) until `dataset.compute_metadata()` is run |
|
| 174 |
|
| 175 |
+
### `dataset.info`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
|
| 177 |
+
```python
|
| 178 |
+
{
|
| 179 |
+
"source": "https://github.com/andreluizbvs/InsPLAD",
|
| 180 |
+
"note": (
|
| 181 |
+
"Media-only workshop pool sampled from InsPLAD-det. No labels "
|
| 182 |
+
"attached by design -- see 02_build_workshop_pool.py for the "
|
| 183 |
+
"sampling manifest and heldout_ground_truth.json for the real "
|
| 184 |
+
"boxes, held out until the 'close the loop' act."
|
| 185 |
+
),
|
| 186 |
+
}
|
| 187 |
+
```
|
| 188 |
|
| 189 |
+
### Parsing decisions
|
| 190 |
+
|
| 191 |
+
- **Media-only import, on purpose.** The staging step that builds this pool does
|
| 192 |
+
compute real bounding boxes for every sampled image (converted from InsPLAD's
|
| 193 |
+
COCO format to FiftyOne's relative `[x, y, w, h]`), but those boxes are written
|
| 194 |
+
to a separate `heldout_ground_truth.json` file and never attached to the
|
| 195 |
+
FiftyOne dataset. This dataset is the "before" half of a before/after teaching
|
| 196 |
+
exercise.
|
| 197 |
+
- **No tier or split metadata shipped.** Which sampling tier (rare target,
|
| 198 |
+
duplicate-wall, common-class, long-tail) or original InsPLAD split (`train`/
|
| 199 |
+
`val`) each image came from is recorded in `workshop_pool_manifest.json` at
|
| 200 |
+
build time, not carried into the FiftyOne dataset's fields -- again, so the
|
| 201 |
+
pool looks like a genuine unlabeled pool, not a labeled one with fields hidden.
|
| 202 |
+
- **Whole scenes only, no crops.** Unlike the full InsPLAD-fault sub-datasets
|
| 203 |
+
(cropped, near-square asset images), every image in this pool is a full UAV
|
| 204 |
+
scene from InsPLAD-det. A bounding-box task only makes sense on full scenes,
|
| 205 |
+
and every act of the target workflow (including fine-tuning and correcting a
|
| 206 |
+
detector) depends on that.
|
| 207 |
|
| 208 |
+
## Dataset Creation
|
| 209 |
|
| 210 |
+
### Curation Rationale
|
| 211 |
|
| 212 |
+
A naive random subsample of InsPLAD-det's 10,561 images breaks the workflow this
|
| 213 |
+
dataset is meant to teach: dedupe before subsampling and there's no duplicate wall
|
| 214 |
+
left for the "compress" step to find; subsample before checking rare-class
|
| 215 |
+
coverage and a 242-image class can nearly vanish from a random slice. Instead,
|
| 216 |
+
this pool uses a **deterministic, 4-tier stratified sample** (seed=`51`, same
|
| 217 |
+
result every run) that guarantees every step of the workflow has something real
|
| 218 |
+
to work with, at roughly a fifth of the source data's size.
|
| 219 |
|
| 220 |
+
Two scripts build this pool from the original InsPLAD-det source; both are
|
| 221 |
+
included verbatim below for full reproducibility.
|
| 222 |
|
| 223 |
+
#### Step 1 -- Download InsPLAD-det from source
|
| 224 |
|
| 225 |
+
InsPLAD ships as a single Mendeley Data record containing three inner zips
|
| 226 |
+
(`InsPLAD-det.zip`, `supervised_fault_classification.zip`,
|
| 227 |
+
`unsupervised_anomaly_detection.zip`). This workshop only uses whole UAV scene
|
| 228 |
+
images, so only `InsPLAD-det.zip` is extracted; the other two stay zipped and
|
| 229 |
+
untouched.
|
| 230 |
|
| 231 |
+
```python
|
| 232 |
+
"""Step 1: Download InsPLAD from source and extract only the detection
|
| 233 |
+
(InsPLAD-det) sub-dataset -- full UAV scene images, no cropped fault/anomaly
|
| 234 |
+
images. This workshop uses whole images only.
|
| 235 |
+
|
| 236 |
+
Source: Mendeley Data, https://data.mendeley.com/datasets/5n3fjgvfyz/1
|
| 237 |
+
The Mendeley record ships one outer zip containing three inner zips
|
| 238 |
+
(InsPLAD-det.zip, supervised_fault_classification.zip,
|
| 239 |
+
unsupervised_anomaly_detection.zip). We download the outer zip (it's a
|
| 240 |
+
single file on Mendeley, can't be split at the API level), but only extract
|
| 241 |
+
InsPLAD-det.zip from it -- the other two are left zipped and untouched.
|
| 242 |
+
"""
|
| 243 |
+
import zipfile
|
| 244 |
+
from pathlib import Path
|
| 245 |
+
|
| 246 |
+
import requests
|
| 247 |
+
|
| 248 |
+
MENDELEY_DATASET_ID = "5n3fjgvfyz"
|
| 249 |
+
WORK_DIR = Path(__file__).parent / "data"
|
| 250 |
+
OUTER_ZIP = WORK_DIR / "InsPLAD_Dataset.zip"
|
| 251 |
+
DET_DIR = WORK_DIR / "InsPLAD-det"
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
def get_download_url():
|
| 255 |
+
"""Query the Mendeley public API for the current file download URL
|
| 256 |
+
(avoids hardcoding a URL that may rotate)."""
|
| 257 |
+
resp = requests.get(
|
| 258 |
+
f"https://data.mendeley.com/public-api/datasets/{MENDELEY_DATASET_ID}"
|
| 259 |
+
"/files?folder_id=root&version=1"
|
| 260 |
+
)
|
| 261 |
+
resp.raise_for_status()
|
| 262 |
+
files = resp.json()
|
| 263 |
+
assert len(files) == 1, f"expected 1 file, got {len(files)}"
|
| 264 |
+
return files[0]["content_details"]["download_url"], files[0]["size"]
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
def extract_det_only(outer_zip, det_dir):
|
| 268 |
+
with zipfile.ZipFile(outer_zip) as outer:
|
| 269 |
+
names = outer.namelist()
|
| 270 |
+
det_zip_name = next(n for n in names if n.endswith("InsPLAD-det.zip"))
|
| 271 |
+
outer.extract(det_zip_name, WORK_DIR)
|
| 272 |
+
|
| 273 |
+
inner_zip_path = WORK_DIR / det_zip_name
|
| 274 |
+
with zipfile.ZipFile(inner_zip_path) as inner:
|
| 275 |
+
inner.extractall(det_dir)
|
| 276 |
+
inner_zip_path.unlink() # don't need the intermediate inner zip anymore
|
| 277 |
+
```
|
| 278 |
|
| 279 |
+
Result: `data/InsPLAD-det/{train,val}/*.jpg` plus COCO annotation JSONs -- 10,561
|
| 280 |
+
unique images (46 duplicate COCO `image_id` entries for the same file are a known
|
| 281 |
+
quirk of the source data, resolved during staging).
|
| 282 |
|
| 283 |
+
#### Step 2 -- Build the 4-tier stratified sample
|
| 284 |
|
| 285 |
+
```python
|
| 286 |
+
"""Step 2: Build the reproducible, stratified workshop pool manifest from
|
| 287 |
+
InsPLAD-det's raw images. Whole scene images only, no labels attached to
|
| 288 |
+
the resulting pool -- ground truth for the sampled images is saved
|
| 289 |
+
separately in step 3, held out for the "close the loop" act.
|
| 290 |
+
|
| 291 |
+
Tiers:
|
| 292 |
+
1. Rare target: ALL images containing `tower id plate` (kept 100%).
|
| 293 |
+
~1% of images, ~99% of them the dominant subject in frame.
|
| 294 |
+
2. Duplicate-wall flights: N whole flights kept 100% intact, giving the
|
| 295 |
+
"compress" act a real wall of near-identical drone frames to find
|
| 296 |
+
(not simulated -- these are actual contiguous DJI frame sequences).
|
| 297 |
+
3. Common-class coverage: capped per-flight samples of `polymer insulator`,
|
| 298 |
+
`glass insulator`, `yoke` -- enough for clean embedding clusters
|
| 299 |
+
without needing thousands of images per class.
|
| 300 |
+
4. Long-tail texture: one image per remaining flight, so the embedding
|
| 301 |
+
plot's messy middle still looks like a messy middle.
|
| 302 |
+
|
| 303 |
+
Deterministic given SEED -- same manifest every run, same code whether
|
| 304 |
+
this runs live at the workshop or at home.
|
| 305 |
+
"""
|
| 306 |
+
import random
|
| 307 |
+
import re
|
| 308 |
+
from collections import defaultdict
|
| 309 |
+
|
| 310 |
+
SEED = 51
|
| 311 |
+
N_DUP_WALL_FLIGHTS = 14
|
| 312 |
+
COMMON_CLASS_QUOTA = 450
|
| 313 |
+
COMMON_CLASS_PER_FLIGHT_CAP = 4
|
| 314 |
+
COMMON_CLASSES = ["polymer insulator", "glass insulator", "yoke"]
|
| 315 |
+
|
| 316 |
+
FLIGHT_PATTERN = re.compile(r"^(.+?)_DJI_(\d+)\.jpg$", re.IGNORECASE)
|
| 317 |
+
rng = random.Random(SEED)
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
def flight_of(filename):
|
| 321 |
+
"""Images are named `<flight_id>_DJI_<frame>.jpg`; grouping by
|
| 322 |
+
flight_id recovers each drone's actual, contiguous flight sequence."""
|
| 323 |
+
m = FLIGHT_PATTERN.match(filename)
|
| 324 |
+
return m.group(1) if m else None
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
# Tier 1: every image containing the rare target, kept 100%
|
| 328 |
+
tier1 = {fn for fn, lbls in fn_labels.items() if "tower id plate" in lbls}
|
| 329 |
+
|
| 330 |
+
# Tier 2: N_DUP_WALL_FLIGHTS whole flights, every frame kept
|
| 331 |
+
flight_ids_sorted = sorted(flights.keys())
|
| 332 |
+
dup_wall_flights = rng.sample(flight_ids_sorted, N_DUP_WALL_FLIGHTS)
|
| 333 |
+
|
| 334 |
+
# Tier 3: per-flight-capped samples of each common class
|
| 335 |
+
for cls in COMMON_CLASSES:
|
| 336 |
+
candidates = [fn for fn, lbls in fn_labels.items() if cls in lbls and fn not in selected]
|
| 337 |
+
rng.shuffle(candidates)
|
| 338 |
+
per_flight_count = defaultdict(int)
|
| 339 |
+
picked = []
|
| 340 |
+
for fn in candidates:
|
| 341 |
+
fid = flight_of(fn)
|
| 342 |
+
if per_flight_count[fid] < COMMON_CLASS_PER_FLIGHT_CAP and len(picked) < COMMON_CLASS_QUOTA:
|
| 343 |
+
picked.append(fn)
|
| 344 |
+
per_flight_count[fid] += 1
|
| 345 |
+
|
| 346 |
+
# Tier 4: one remaining image per flight, for long-tail texture
|
| 347 |
+
for fid, fns in flights.items():
|
| 348 |
+
remaining = [fn for fn in fns if fn not in selected]
|
| 349 |
+
if remaining:
|
| 350 |
+
pick = rng.choice(remaining)
|
| 351 |
+
```
|
| 352 |
|
| 353 |
+
Result, with `seed=51`:
|
| 354 |
|
| 355 |
+
| Tier | What it keeps | Images |
|
| 356 |
+
|---|---|---|
|
| 357 |
+
| 1 -- Rare target (`tower id plate`, 100%) | every image containing the rare class | 242 |
|
| 358 |
+
| 2 -- Duplicate-wall flights (14 flights, 100% intact) | real contiguous drone-frame sequences | 562 |
|
| 359 |
+
| 3 -- Common-class coverage (capped per flight) | `polymer insulator` (450), `yoke` (450), `glass insulator` (310) | 1,210 |
|
| 360 |
+
| 4 -- Long-tail texture (1/remaining flight) | everything else, thinly | 213 |
|
| 361 |
+
| **Total** | | **2,227** |
|
| 362 |
|
| 363 |
+
A later staging step copies these 2,227 images into a lean pool directory and
|
| 364 |
+
converts their real COCO boxes to FiftyOne's relative `[x, y, w, h]` format --
|
| 365 |
+
but writes them to `heldout_ground_truth.json` rather than into the FiftyOne
|
| 366 |
+
dataset, which is imported strictly media-only.
|
| 367 |
|
| 368 |
+
### Source Data
|
|
|
|
|
|
|
| 369 |
|
| 370 |
+
#### Data Collection and Processing
|
| 371 |
|
| 372 |
+
The underlying images were captured by UAV (drone) during real-world inspections
|
| 373 |
+
of operating power lines, at 1920x1080 resolution, under varied environmental
|
| 374 |
+
conditions, orientations, and distances -- see the original
|
| 375 |
+
[InsPLAD dataset card](https://huggingface.co/datasets/harpreetsahota/InsPLAD)
|
| 376 |
+
for the full collection and annotation process. This derivative pool applies no
|
| 377 |
+
further transformation to the images themselves; it only selects which 2,227 of
|
| 378 |
+
the 10,561 to include, per the stratified sampling above.
|
| 379 |
|
| 380 |
+
#### Who are the source data producers?
|
| 381 |
|
| 382 |
+
UAV inspection imagery of real, operating power lines, collected by the Voxar
|
| 383 |
+
Labs group at Universidade Federal de Pernambuco (see the original InsPLAD paper
|
| 384 |
+
and dataset card).
|
| 385 |
|
| 386 |
+
### Annotations
|
| 387 |
|
| 388 |
+
This dataset ships with no annotations. The real bounding boxes for these same
|
| 389 |
+
2,227 images exist (extracted from InsPLAD-det's COCO annotations during
|
| 390 |
+
staging) but are deliberately withheld from this Hub dataset, distributed
|
| 391 |
+
alongside the workshop's companion code as `heldout_ground_truth.json` instead.
|
| 392 |
|
| 393 |
+
#### Personal and Sensitive Information
|
| 394 |
|
| 395 |
+
Not addressed explicitly in the source paper. Images are aerial captures of
|
| 396 |
+
power line hardware and surrounding infrastructure; there is no statement in the
|
| 397 |
+
source material regarding incidental capture of people or other personal data.
|
| 398 |
+
`[More Information Needed]`
|
| 399 |
|
| 400 |
+
## Citation
|
| 401 |
|
| 402 |
**BibTeX:**
|
| 403 |
|
| 404 |
+
```
|
| 405 |
+
@article{doi:10.1080/01431161.2023.2283900,
|
| 406 |
+
author = {André Luiz Buarque Vieira e Silva, Heitor de Castro Felix, Franscisco Paulo Magalhães Simões, Veronica Teichrieb, Michel dos Santos, Hemir Santiago, Virginia Sgotti and Henrique Lott Neto},
|
| 407 |
+
title = {InsPLAD: A Dataset and Benchmark for Power Line Asset Inspection in UAV Images},
|
| 408 |
+
journal = {International Journal of Remote Sensing},
|
| 409 |
+
volume = {44},
|
| 410 |
+
number = {23},
|
| 411 |
+
pages = {1-27},
|
| 412 |
+
year = {2023},
|
| 413 |
+
publisher = {Taylor & Francis},
|
| 414 |
+
doi = {10.1080/01431161.2023.2283900},
|
| 415 |
+
URL = {https://doi.org/10.1080/01431161.2023.2283900},
|
| 416 |
+
eprint = {https://doi.org/10.1080/01431161.2023.2283900},
|
| 417 |
+
}
|
| 418 |
+
```
|
| 419 |
|
| 420 |
**APA:**
|
| 421 |
|
| 422 |
+
Vieira-e-Silva, A. L. B., de Castro Felix, H., Simões, F. P. M., Teichrieb, V., dos Santos, M., Santiago, H., Sgotti, V., & Lott Neto, H. (2023). InsPLAD: A Dataset and Benchmark for Power Line Asset Inspection in UAV Images. *International Journal of Remote Sensing*, 44(23), 1-27.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 423 |
|
| 424 |
+
## More Information
|
| 425 |
|
| 426 |
+
This is a derivative sampling of InsPLAD-det for the "Cold Pool to Hot Queue"
|
| 427 |
+
FiftyOne workshop. The full pipeline that builds this pool from scratch (source
|
| 428 |
+
download through media-only import) lives in the `workshop-notebook/` directory
|
| 429 |
+
of the workshop's companion materials, as five numbered, reproducible scripts.
|
| 430 |
+
For the full, labeled InsPLAD dataset (all three official sub-tasks, 49,706
|
| 431 |
+
samples), see https://huggingface.co/datasets/harpreetsahota/InsPLAD.
|
| 432 |
|
| 433 |
+
## Dataset Card Authors
|
| 434 |
|
| 435 |
+
Harpreet Sahota (FiftyOne / Voxel51 sampling and card)
|
| 436 |
|
| 437 |
## Dataset Card Contact
|
| 438 |
|
| 439 |
+
harpreetsahota
|