Datasets:

Modalities:
Image
ArXiv:
License:
JeffreyJsam commited on
Commit
7c94a38
·
verified ·
1 Parent(s): bbd3cc5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -4
README.md CHANGED
@@ -26,8 +26,7 @@ A large-scale instance segmentation dataset of nearly 64k annotated spacecraft i
26
  The dataset contains over 63,917 annotated images with instance masks for varied spacecraft. It's structured for YOLO and segmentation applications, and chunked to stay within Hugging Face's per-folder file limits.
27
 
28
 
29
- ## How to Use/Download
30
- ### Directory Structure Note
31
 
32
  Due to Hugging Face Hub's per-directory file limit (10,000 files), this dataset is chunked: each logical split (like `train/labels/`) is subdivided into folders (`000/`, `001/`, ...) containing no more than 5,000 files each.
33
 
@@ -55,8 +54,35 @@ If you're using models/tools like **YOLO** or others that expect a **flat direct
55
  └── imag_99.png
56
 
57
  ```
58
-
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  ### Utility Scripts
61
 
62
  The following scripts help you download this dataset. Due to the large nature of the data and the custom directory structure, it is recommended to use the following scripts to either sample or to download the entire dataset. Note, the scripts are in the utils subdirectory.
@@ -105,7 +131,7 @@ Features:
105
  - Optionally flattens the directory structure by removing the deepest chunk level
106
  - Saves each .png image with its corresponding .txt label
107
 
108
- You can use this script to download the complete dataset for model training or offline access.
109
 
110
  Usage:
111
  # Download all chunks (flattened/ YOLO format)
 
26
  The dataset contains over 63,917 annotated images with instance masks for varied spacecraft. It's structured for YOLO and segmentation applications, and chunked to stay within Hugging Face's per-folder file limits.
27
 
28
 
29
+ ## Directory Structure Note
 
30
 
31
  Due to Hugging Face Hub's per-directory file limit (10,000 files), this dataset is chunked: each logical split (like `train/labels/`) is subdivided into folders (`000/`, `001/`, ...) containing no more than 5,000 files each.
32
 
 
54
  └── imag_99.png
55
 
56
  ```
 
57
 
58
+ ## How to Load
59
+
60
+ You can stream the SWiM-SpacecraftWithMasks dataset directly using the HuggingFace datasets library without downloading it entirely. This is particularly useful when working with limited local storage.
61
+
62
+ Use the following code to load and iterate over the dataset efficiently:
63
+
64
+ ```
65
+
66
+ from datasets import load_dataset
67
+
68
+ dataset = load_dataset(
69
+ "JeffreyJsam/SWiM-SpacecraftWithMasks",
70
+ streaming=True
71
+ )
72
+
73
+ ```
74
+
75
+ Note: The directory/folder structure here obtained from HuggingFace's load_dataset API includes chunks(eg, 000, 001, etc). Hence, it does not support YOLO training. For YOLO training or CIFAR-10 based directory structure, kindly use utils/download_swim.py script.
76
+
77
+ ## How to Download
78
+
79
+ For local use, if you'd like to either sample a small portion or download the entire dataset to your filesystem, we provide two utility scripts under the utils/ folder:
80
+
81
+ - sample_swim.py for quick sampling from a single chunk
82
+ - download_swim.py is used to download the full dataset, optionally flattening the directory structure.
83
+
84
+ These scripts let you work offline or run faster experiments by controlling what and how much data you fetch. Furthermore, the download_swim.py helps download the data in a flattened YOLO/CIFAR-10 supported folder structure.
85
+
86
  ### Utility Scripts
87
 
88
  The following scripts help you download this dataset. Due to the large nature of the data and the custom directory structure, it is recommended to use the following scripts to either sample or to download the entire dataset. Note, the scripts are in the utils subdirectory.
 
131
  - Optionally flattens the directory structure by removing the deepest chunk level
132
  - Saves each .png image with its corresponding .txt label
133
 
134
+ This script can download the complete dataset for model training or offline access.
135
 
136
  Usage:
137
  # Download all chunks (flattened/ YOLO format)