Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
100K<n<1M
DOI:
License:
Enhance README.md with Quick Start guide, updated dataset statistics, and citation information
Browse files
README.md
CHANGED
@@ -62,7 +62,6 @@ This dataset is designed for **Few-Shot Learning (FSL)** research in product cla
|
|
62 |
- **Class Numbers**: Non-continuous (some class numbers may be missing)
|
63 |
- **Image Format**: PNG
|
64 |
- **Typical Image Size**: 50-100 KB per image
|
65 |
-
- **Average Images per Class**: 366.6 (279,747 ÷ 763)
|
66 |
- **Compressed Archive Size**: ~9.9 GB (data.tzst)
|
67 |
|
68 |
## Dataset Structure
|
@@ -84,6 +83,38 @@ data.tzst
|
|
84 |
|
85 |
**Note**: Class numbers are not continuous. For example, you might have class_0, class_2, class_5, etc., but not class_1, class_3, class_4. The total number of classes is 763.
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
## Usage
|
88 |
|
89 |
## Installation and Setup
|
@@ -93,7 +124,12 @@ data.tzst
|
|
93 |
```bash
|
94 |
# Create a new virtual environment (recommended)
|
95 |
python -m venv fsl-env
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
# Install core dependencies
|
99 |
pip install datasets tzst pillow
|
@@ -1052,6 +1088,12 @@ for i, (support_data, query_data) in enumerate(dataloader):
|
|
1052 |
3. **Use data augmentation**: Improve few-shot performance with transforms
|
1053 |
4. **Cache preprocessed data**: Save processed episodes to disk for faster iteration
|
1054 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1055 |
## License
|
1056 |
|
1057 |
This dataset is released under the MIT License. See the [LICENSE file](LICENSE) for details.
|
|
|
62 |
- **Class Numbers**: Non-continuous (some class numbers may be missing)
|
63 |
- **Image Format**: PNG
|
64 |
- **Typical Image Size**: 50-100 KB per image
|
|
|
65 |
- **Compressed Archive Size**: ~9.9 GB (data.tzst)
|
66 |
|
67 |
## Dataset Structure
|
|
|
83 |
|
84 |
**Note**: Class numbers are not continuous. For example, you might have class_0, class_2, class_5, etc., but not class_1, class_3, class_4. The total number of classes is 763.
|
85 |
|
86 |
+
## Quick Start
|
87 |
+
|
88 |
+
Get started with the FSL Product Classification dataset in just a few steps:
|
89 |
+
|
90 |
+
```python
|
91 |
+
from datasets import Dataset
|
92 |
+
import os
|
93 |
+
from tzst import extract_archive
|
94 |
+
|
95 |
+
# 1. Extract the dataset
|
96 |
+
extract_archive("data.tzst", "extracted_data/")
|
97 |
+
|
98 |
+
# 2. Load a few samples
|
99 |
+
data_dir = "extracted_data"
|
100 |
+
samples = []
|
101 |
+
for class_dir in sorted(os.listdir(data_dir))[:3]: # First 3 classes
|
102 |
+
if class_dir.startswith("class_"):
|
103 |
+
class_path = os.path.join(data_dir, class_dir)
|
104 |
+
for img_file in os.listdir(class_path)[:5]: # First 5 images
|
105 |
+
if img_file.endswith('.png'):
|
106 |
+
samples.append({
|
107 |
+
'image': os.path.join(class_path, img_file),
|
108 |
+
'label': int(class_dir.split("_")[1]),
|
109 |
+
'class_name': class_dir,
|
110 |
+
'image_id': img_file.replace('.png', '')
|
111 |
+
})
|
112 |
+
|
113 |
+
print(f"Loaded {len(samples)} sample images from 3 classes")
|
114 |
+
```
|
115 |
+
|
116 |
+
For complete setup and advanced usage, see the sections below.
|
117 |
+
|
118 |
## Usage
|
119 |
|
120 |
## Installation and Setup
|
|
|
124 |
```bash
|
125 |
# Create a new virtual environment (recommended)
|
126 |
python -m venv fsl-env
|
127 |
+
|
128 |
+
# Activate virtual environment
|
129 |
+
# On Windows:
|
130 |
+
fsl-env\Scripts\activate
|
131 |
+
# On macOS/Linux:
|
132 |
+
# source fsl-env/bin/activate
|
133 |
|
134 |
# Install core dependencies
|
135 |
pip install datasets tzst pillow
|
|
|
1088 |
3. **Use data augmentation**: Improve few-shot performance with transforms
|
1089 |
4. **Cache preprocessed data**: Save processed episodes to disk for faster iteration
|
1090 |
|
1091 |
+
## Citation
|
1092 |
+
|
1093 |
+
If you use this dataset in your research, please cite it as shown on the Hugging Face dataset page:
|
1094 |
+
|
1095 |
+
<https://huggingface.co/datasets/xixu-me/fsl-product-classification?doi=true>
|
1096 |
+
|
1097 |
## License
|
1098 |
|
1099 |
This dataset is released under the MIT License. See the [LICENSE file](LICENSE) for details.
|