Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,33 +1,232 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
num_bytes: 3230593.0
|
| 18 |
-
num_examples: 330
|
| 19 |
-
- name: test
|
| 20 |
-
num_bytes: 3108124.0
|
| 21 |
-
num_examples: 309
|
| 22 |
-
download_size: 40509287
|
| 23 |
-
dataset_size: 40469947.33
|
| 24 |
-
configs:
|
| 25 |
-
- config_name: default
|
| 26 |
-
data_files:
|
| 27 |
-
- split: train
|
| 28 |
-
path: data/train-*
|
| 29 |
-
- split: validation
|
| 30 |
-
path: data/validation-*
|
| 31 |
-
- split: test
|
| 32 |
-
path: data/test-*
|
| 33 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-classification
|
| 5 |
+
- visual-question-answering
|
| 6 |
+
- computer-vision
|
| 7 |
+
- image-to-text
|
| 8 |
+
tags:
|
| 9 |
+
- 3d-printing
|
| 10 |
+
- manufacturing
|
| 11 |
+
- quality-control
|
| 12 |
+
- vision-language
|
| 13 |
+
- flow-rate-estimation
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
| 16 |
+
pretty_name: TL-Caxton - 3D Printing Quality Assessment Dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
+
|
| 19 |
+
# TL-Caxton: 3D Printing Nozzle Images Dataset
|
| 20 |
+
|
| 21 |
+
### Dataset Summary
|
| 22 |
+
|
| 23 |
+
- **Task**: Vision-based flow rate estimation and extrusion quality assessment
|
| 24 |
+
- **Domain**: Additive Manufacturing / 3D Printing
|
| 25 |
+
- **Data Type**: RGB images with numerical annotations
|
| 26 |
+
- **Total Samples**: 4,048 images
|
| 27 |
+
- Training: 3,407 samples
|
| 28 |
+
- Validation: 331 samples
|
| 29 |
+
- Test: 310 samples
|
| 30 |
+
|
| 31 |
+
### Supported Tasks
|
| 32 |
+
|
| 33 |
+
1. **Flow Rate Regression**: Predict the flow rate percentage from camera images of the printing process
|
| 34 |
+
2. **Extrusion Quality Classification**: Classify prints as under-extruded (<90%), good extrusion (90-110%), or over-extruded (>110%)
|
| 35 |
+
3. **Vision-Language Modeling**: Generate natural language descriptions of print quality from images
|
| 36 |
+
4. **Visual Question Answering**: Answer questions about print parameters and quality from images
|
| 37 |
+
|
| 38 |
+
## Dataset Structure
|
| 39 |
+
|
| 40 |
+
### Data Fields
|
| 41 |
+
|
| 42 |
+
Each sample contains:
|
| 43 |
+
|
| 44 |
+
- **`img_path`** (string): Filename of the camera image
|
| 45 |
+
- **`flow_rate`** (float): Flow rate percentage value (ranging from ~39% to ~265%)
|
| 46 |
+
- **`nozzle_tip_x`** (int): X-coordinate of nozzle tip position in pixels
|
| 47 |
+
- **`nozzle_tip_y`** (int): Y-coordinate of nozzle tip position in pixels
|
| 48 |
+
|
| 49 |
+
### Data Splits
|
| 50 |
+
|
| 51 |
+
| Split | Samples | Percentage |
|
| 52 |
+
|-------|---------|------------|
|
| 53 |
+
| Train | 3,407 | 84.2% |
|
| 54 |
+
| Validation | 331 | 8.2% |
|
| 55 |
+
| Test | 310 | 7.6% |
|
| 56 |
+
| **Total** | **4,048** | **100%** |
|
| 57 |
+
|
| 58 |
+
### Data Characteristics
|
| 59 |
+
|
| 60 |
+
- **Flow Rate Range**: 39% to 265%
|
| 61 |
+
- Under-extrusion: < 90%
|
| 62 |
+
- Good extrusion: 90-110%
|
| 63 |
+
- Over-extrusion: > 110%
|
| 64 |
+
- **Image Format**: JPEG
|
| 65 |
+
- **Camera**: Single fixed camera (camera1)
|
| 66 |
+
- **Printer**: CCR20PRO
|
| 67 |
+
- **Print Types**: Various geometries including cylinders, cones, cubes, polygons, hashtag patterns, and more
|
| 68 |
+
|
| 69 |
+
## Dataset Creation
|
| 70 |
+
|
| 71 |
+
### Image Acquisition
|
| 72 |
+
|
| 73 |
+
Images were captured during 3D printing processes using a fixed camera setup. The dataset includes prints of various geometric shapes with different layer heights (1.0mm and 5.0mm) and flow rate settings.
|
| 74 |
+
|
| 75 |
+
### Annotations
|
| 76 |
+
|
| 77 |
+
Each image is annotated with:
|
| 78 |
+
- Ground truth flow rate values used during printing
|
| 79 |
+
- Nozzle tip coordinates for potential attention mechanisms or spatial reasoning tasks
|
| 80 |
+
|
| 81 |
+
### Qualitative Descriptions
|
| 82 |
+
|
| 83 |
+
The dataset includes JSON template files for generating natural language descriptions:
|
| 84 |
+
|
| 85 |
+
- **`general_statements.json`**: General observations about the 3D printing nozzle and process
|
| 86 |
+
- **`qual_good_extrusion.json`**: Descriptions of good extrusion quality (flow rate 90-110%)
|
| 87 |
+
- **`qual_under_extrusion.json`**: Descriptions of under-extrusion issues (flow rate < 90%)
|
| 88 |
+
- **`qual_over_extrusion.json`**: Descriptions of over-extrusion issues (flow rate > 110%)
|
| 89 |
+
- **`quant_templates.json`**: Templates for stating quantitative flow rate values
|
| 90 |
+
|
| 91 |
+
These templates enable synthetic generation of diverse natural language annotations for vision-language training.
|
| 92 |
+
|
| 93 |
+
## Usage
|
| 94 |
+
|
| 95 |
+
### Loading the Dataset
|
| 96 |
+
|
| 97 |
+
```python
|
| 98 |
+
from datasets import load_dataset
|
| 99 |
+
|
| 100 |
+
# Load the full dataset
|
| 101 |
+
dataset = load_dataset("cemag/tl-caxton")
|
| 102 |
+
|
| 103 |
+
# Access individual splits
|
| 104 |
+
train_data = dataset['train']
|
| 105 |
+
val_data = dataset['validation']
|
| 106 |
+
test_data = dataset['test']
|
| 107 |
+
|
| 108 |
+
# Example: Access a sample
|
| 109 |
+
sample = train_data[0]
|
| 110 |
+
print(f"Flow rate: {sample['flow_rate']}%")
|
| 111 |
+
print(f"Nozzle position: ({sample['nozzle_tip_x']}, {sample['nozzle_tip_y']})")
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
### Using with PyTorch
|
| 115 |
+
|
| 116 |
+
```python
|
| 117 |
+
from torch.utils.data import DataLoader
|
| 118 |
+
from PIL import Image
|
| 119 |
+
import os
|
| 120 |
+
|
| 121 |
+
class CIPHERDataset:
|
| 122 |
+
def __init__(self, dataset, image_dir, transform=None):
|
| 123 |
+
self.dataset = dataset
|
| 124 |
+
self.image_dir = image_dir
|
| 125 |
+
self.transform = transform
|
| 126 |
+
|
| 127 |
+
def __len__(self):
|
| 128 |
+
return len(self.dataset)
|
| 129 |
+
|
| 130 |
+
def __getitem__(self, idx):
|
| 131 |
+
sample = self.dataset[idx]
|
| 132 |
+
img_path = os.path.join(self.image_dir, sample['img_path'])
|
| 133 |
+
image = Image.open(img_path).convert('RGB')
|
| 134 |
+
|
| 135 |
+
if self.transform:
|
| 136 |
+
image = self.transform(image)
|
| 137 |
+
|
| 138 |
+
return {
|
| 139 |
+
'image': image,
|
| 140 |
+
'flow_rate': sample['flow_rate'],
|
| 141 |
+
'nozzle_tip': (sample['nozzle_tip_x'], sample['nozzle_tip_y'])
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
# Create dataset and dataloader
|
| 145 |
+
train_dataset = CIPHERDataset(train_data, 'images/', transform=your_transform)
|
| 146 |
+
train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
### Vision-Language Training
|
| 150 |
+
|
| 151 |
+
```python
|
| 152 |
+
from data_utils import synthesize_answer, format_data
|
| 153 |
+
|
| 154 |
+
# Generate a natural language description for a sample
|
| 155 |
+
sample = train_data[0]
|
| 156 |
+
description = synthesize_answer(sample, general=True, quant=True, qual=True)
|
| 157 |
+
print(description)
|
| 158 |
+
|
| 159 |
+
# Example output:
|
| 160 |
+
# "This is the nozzle of a 3D printer. The observed flow rate is approximately
|
| 161 |
+
# 100%. Good extrusion occurs when a 3D printer delivers the exact amount of
|
| 162 |
+
# filament needed, resulting in strong, accurate, and visually appealing prints."
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
## Applications
|
| 166 |
+
|
| 167 |
+
This dataset is suitable for:
|
| 168 |
+
|
| 169 |
+
1. **Automated Quality Control**: Develop models to automatically detect printing defects
|
| 170 |
+
2. **Flow Rate Calibration**: Train systems to recommend optimal flow rate settings
|
| 171 |
+
3. **Vision-Language Models**: Fine-tune multimodal models for manufacturing domain
|
| 172 |
+
4. **Predictive Maintenance**: Identify early signs of printing issues
|
| 173 |
+
5. **Education**: Teaching resource for 3D printing optimization and machine learning
|
| 174 |
+
|
| 175 |
+
## Dataset Statistics
|
| 176 |
+
|
| 177 |
+
### Flow Rate Distribution
|
| 178 |
+
|
| 179 |
+
The dataset contains a diverse range of flow rates to capture various extrusion conditions:
|
| 180 |
+
- Minimum: ~39%
|
| 181 |
+
- Maximum: ~265%
|
| 182 |
+
- Coverage includes under-extrusion, optimal, and over-extrusion scenarios
|
| 183 |
+
|
| 184 |
+
### Geometric Diversity
|
| 185 |
+
|
| 186 |
+
Print geometries include:
|
| 187 |
+
- Cylinders and cones
|
| 188 |
+
- Test cubes
|
| 189 |
+
- Polygons (30x70, 40x70)
|
| 190 |
+
- Hashtag patterns
|
| 191 |
+
- Gears and complex geometries
|
| 192 |
+
- Tetris shapes
|
| 193 |
+
- Custom cuts and patterns
|
| 194 |
+
|
| 195 |
+
### Layer Heights
|
| 196 |
+
|
| 197 |
+
- 1.0mm layer height
|
| 198 |
+
- 5.0mm layer height
|
| 199 |
+
|
| 200 |
+
## Limitations
|
| 201 |
+
|
| 202 |
+
- Single camera angle (camera1 only)
|
| 203 |
+
- Limited to one printer model (CCR20PRO)
|
| 204 |
+
- No temporal sequences (single frames only)
|
| 205 |
+
- Nozzle position annotations are 2D pixel coordinates, not 3D world coordinates
|
| 206 |
+
|
| 207 |
+
## Citation
|
| 208 |
+
|
| 209 |
+
If you use this dataset in your research, please cite:
|
| 210 |
+
|
| 211 |
+
```bibtex
|
| 212 |
+
@dataset{tl_caxton,
|
| 213 |
+
title={tl-Caxton: 3D Printing Quality Assessment Dataset},
|
| 214 |
+
author={cemag},
|
| 215 |
+
year={2025},
|
| 216 |
+
publisher={Hugging Face},
|
| 217 |
+
howpublished={\url{https://huggingface.co/datasets/cemag/tl-caxton}}
|
| 218 |
+
}
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
## License
|
| 222 |
+
|
| 223 |
+
This dataset is released under the MIT License.
|
| 224 |
+
|
| 225 |
+
## Contact
|
| 226 |
+
|
| 227 |
+
For questions or issues regarding this dataset, please open an issue on the dataset repository.
|
| 228 |
+
|
| 229 |
+
## Acknowledgments
|
| 230 |
+
|
| 231 |
+
This dataset was created to advance automated quality control in additive manufacturing through computer vision and machine learning techniques.
|
| 232 |
+
|