Datasets:
Dataset Upload commited on
Commit ·
8dc8023
0
Parent(s):
Add Savage X3D Generation Dataset
Browse files- 19,712 training examples
- Derived from 1,232 Savage X3D models
- 16x augmentation with color, scale, rotation variations
- Generated with 32 parallel threads on 64-core system
- Ready for LLM fine-tuning for X3D generation
- .gitattributes +2 -0
- README.md +309 -0
- augmented_data.jsonl +3 -0
- dataset_info.json +3 -0
- training_data.jsonl +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
- text2text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- 3D
|
| 10 |
+
- X3D
|
| 11 |
+
- code-generation
|
| 12 |
+
- structured-data
|
| 13 |
+
- xml
|
| 14 |
+
- computer-graphics
|
| 15 |
+
- synthetic
|
| 16 |
+
- web3d
|
| 17 |
+
- military
|
| 18 |
+
- simulation
|
| 19 |
+
pretty_name: Savage X3D Model Generation Dataset
|
| 20 |
+
size_categories:
|
| 21 |
+
- 10K<n<100K
|
| 22 |
+
dataset_info:
|
| 23 |
+
features:
|
| 24 |
+
- name: instruction
|
| 25 |
+
dtype: string
|
| 26 |
+
- name: input
|
| 27 |
+
dtype: string
|
| 28 |
+
- name: output
|
| 29 |
+
dtype: string
|
| 30 |
+
- name: metadata
|
| 31 |
+
dtype: string
|
| 32 |
+
splits:
|
| 33 |
+
- name: train
|
| 34 |
+
num_bytes: 1785868800
|
| 35 |
+
num_examples: 19712
|
| 36 |
+
download_size: 1785868800
|
| 37 |
+
dataset_size: 1785868800
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
# Savage X3D Model Generation Dataset
|
| 41 |
+
|
| 42 |
+
## Dataset Description
|
| 43 |
+
|
| 44 |
+
### Purpose
|
| 45 |
+
|
| 46 |
+
This dataset enables training of Large Language Models (LLMs) to generate structured 3D models in X3D format from natural language descriptions. It contains **19,712 instruction-following examples** derived from the prestigious **Savage 3D Model Repository** maintained by the Naval Postgraduate School.
|
| 47 |
+
|
| 48 |
+
### Key Statistics
|
| 49 |
+
|
| 50 |
+
| Metric | Value |
|
| 51 |
+
|--------|-------|
|
| 52 |
+
| **Total Training Examples** | 19,712 |
|
| 53 |
+
| **Base X3D Models** | 1,232 |
|
| 54 |
+
| **Augmentation Factor** | 16x |
|
| 55 |
+
| **Dataset Size** | 1.7 GB |
|
| 56 |
+
| **Average Model Size** | ~90 KB |
|
| 57 |
+
| **Total Downloaded Models** | 3,696 |
|
| 58 |
+
| **Processing Time** | ~30 minutes |
|
| 59 |
+
| **Hardware Used** | 64-core, 5x RTX 4090 |
|
| 60 |
+
|
| 61 |
+
## Quick Start
|
| 62 |
+
|
| 63 |
+
```python
|
| 64 |
+
from datasets import load_dataset
|
| 65 |
+
|
| 66 |
+
# Load the dataset
|
| 67 |
+
dataset = load_dataset("stratplans/savage-x3d-generation")
|
| 68 |
+
|
| 69 |
+
# Example usage
|
| 70 |
+
example = dataset['train'][0]
|
| 71 |
+
print(f"Instruction: {example['instruction']}")
|
| 72 |
+
print(f"Input metadata: {example['input']}")
|
| 73 |
+
print(f"Output X3D: {example['output'][:500]}...") # First 500 chars
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## Dataset Structure
|
| 77 |
+
|
| 78 |
+
### Data Fields
|
| 79 |
+
|
| 80 |
+
Each training example contains four fields:
|
| 81 |
+
|
| 82 |
+
1. **`instruction`** (string): Natural language prompt requesting X3D generation
|
| 83 |
+
- Example: *"Create an X3D model of military ground vehicle with 4 shapes using Box, Cylinder geometries"*
|
| 84 |
+
|
| 85 |
+
2. **`input`** (string): JSON-encoded metadata providing context
|
| 86 |
+
```json
|
| 87 |
+
{
|
| 88 |
+
"category": "vehicle",
|
| 89 |
+
"keywords": ["military", "hmmwv", "armored"],
|
| 90 |
+
"complexity": "medium",
|
| 91 |
+
"profile": "Immersive",
|
| 92 |
+
"source_file": "HMMWV"
|
| 93 |
+
}
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
3. **`output`** (string): Complete X3D XML model
|
| 97 |
+
```xml
|
| 98 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 99 |
+
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"
|
| 100 |
+
"https://www.web3d.org/specifications/x3d-3.0.dtd">
|
| 101 |
+
<X3D profile='Immersive' version='3.0'>
|
| 102 |
+
<Scene>
|
| 103 |
+
<Transform>
|
| 104 |
+
<Shape>
|
| 105 |
+
<Appearance>
|
| 106 |
+
<Material diffuseColor='0.5 0.5 0.5'/>
|
| 107 |
+
</Appearance>
|
| 108 |
+
<Box size='2 1 4'/>
|
| 109 |
+
</Shape>
|
| 110 |
+
</Transform>
|
| 111 |
+
</Scene>
|
| 112 |
+
</X3D>
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
4. **`metadata`** (string): JSON-encoded additional information
|
| 116 |
+
- Model complexity metrics (node count, shapes, materials)
|
| 117 |
+
- Viewpoint information
|
| 118 |
+
- Animation details
|
| 119 |
+
- Original model ID
|
| 120 |
+
|
| 121 |
+
### Dataset Categories
|
| 122 |
+
|
| 123 |
+
The dataset covers 9 major categories from the Savage repository:
|
| 124 |
+
|
| 125 |
+
| Category | Description | Example Models |
|
| 126 |
+
|----------|-------------|----------------|
|
| 127 |
+
| **GroundVehicles** | Military ground vehicles | HMMWV, M1A1, Jeep |
|
| 128 |
+
| **AircraftFixedWing** | Fixed-wing aircraft | F-16, F-18, AV8B Harrier |
|
| 129 |
+
| **AircraftRotaryWing** | Helicopters | Apache, BlackHawk, CH-46 |
|
| 130 |
+
| **ShipsMilitary** | Naval vessels | Destroyers, Frigates, Carriers |
|
| 131 |
+
| **ShipsCivilian** | Civilian vessels | Tankers, Ferries, Tugboats |
|
| 132 |
+
| **Buildings** | Structures | Hangars, Houses, Stadiums |
|
| 133 |
+
| **Sensors** | Detection equipment | Radar, Sonar, Satellites |
|
| 134 |
+
| **Weapons** | Military ordnance | Missiles, Bombs |
|
| 135 |
+
| **AmphibiousVehicles** | Amphibious craft | LCAC, AAV |
|
| 136 |
+
|
| 137 |
+
## Dataset Creation Process
|
| 138 |
+
|
| 139 |
+
### 1. Data Collection (Parallel Download)
|
| 140 |
+
|
| 141 |
+
```python
|
| 142 |
+
# Used 32 parallel threads for efficient downloading
|
| 143 |
+
with concurrent.futures.ThreadPoolExecutor(max_workers=32) as executor:
|
| 144 |
+
# Downloaded 3,696 X3D files from savage.nps.edu
|
| 145 |
+
# Crawled 1,439 index pages
|
| 146 |
+
# Total download time: ~10 minutes
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
### 2. Data Processing Pipeline
|
| 150 |
+
|
| 151 |
+
```python
|
| 152 |
+
# Parse X3D files and extract structured information
|
| 153 |
+
for x3d_file in x3d_files:
|
| 154 |
+
metadata = extract_metadata(x3d_file) # Title, creator, keywords
|
| 155 |
+
scene_info = extract_scene_info(x3d_file) # Shapes, materials, transforms
|
| 156 |
+
complexity = calculate_complexity(x3d_file) # Node counts, animations
|
| 157 |
+
description = generate_description(...) # Natural language description
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
### 3. Data Augmentation Techniques
|
| 161 |
+
|
| 162 |
+
Applied 5 augmentation strategies to increase dataset diversity:
|
| 163 |
+
|
| 164 |
+
1. **Color Variations**: Modified HSV values of materials
|
| 165 |
+
2. **Scale Transformations**: Applied 0.5x to 2x scaling
|
| 166 |
+
3. **Rotation Modifications**: Added random rotations on axes
|
| 167 |
+
4. **Viewpoint Adjustments**: Modified camera positions
|
| 168 |
+
5. **Lighting Variations**: Adjusted light intensities and colors
|
| 169 |
+
|
| 170 |
+
### 4. Instruction Generation
|
| 171 |
+
|
| 172 |
+
Created diverse instruction templates:
|
| 173 |
+
|
| 174 |
+
```python
|
| 175 |
+
templates = [
|
| 176 |
+
"Create an X3D model of {description}",
|
| 177 |
+
"Generate a 3D scene showing {description}",
|
| 178 |
+
"Build an X3D representation of {description}",
|
| 179 |
+
"Design an X3D model featuring {description}",
|
| 180 |
+
"Construct a 3D model with {description}"
|
| 181 |
+
]
|
| 182 |
+
```
|
| 183 |
+
|
| 184 |
+
## Recommended Models for Fine-tuning
|
| 185 |
+
|
| 186 |
+
Based on the structured nature of X3D generation:
|
| 187 |
+
|
| 188 |
+
1. **Qwen2.5-Coder-7B-Instruct** (Best Overall)
|
| 189 |
+
- Excellent for code/structured data
|
| 190 |
+
- Strong XML understanding
|
| 191 |
+
|
| 192 |
+
2. **CodeLlama-13B-Instruct**
|
| 193 |
+
- Specialized for code generation
|
| 194 |
+
- Good spatial reasoning
|
| 195 |
+
|
| 196 |
+
3. **Mistral-7B-Instruct-v0.3**
|
| 197 |
+
- Efficient and fast
|
| 198 |
+
- Good instruction following
|
| 199 |
+
|
| 200 |
+
4. **DeepSeek-Coder-7B**
|
| 201 |
+
- Strong at structured output
|
| 202 |
+
- Good for long sequences
|
| 203 |
+
|
| 204 |
+
## Training Configuration Example
|
| 205 |
+
|
| 206 |
+
```python
|
| 207 |
+
from transformers import AutoModelForCausalLM, TrainingArguments
|
| 208 |
+
|
| 209 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B")
|
| 210 |
+
|
| 211 |
+
training_args = TrainingArguments(
|
| 212 |
+
output_dir="./x3d-generator",
|
| 213 |
+
num_train_epochs=3,
|
| 214 |
+
per_device_train_batch_size=4,
|
| 215 |
+
gradient_accumulation_steps=2,
|
| 216 |
+
learning_rate=2e-5,
|
| 217 |
+
bf16=True,
|
| 218 |
+
gradient_checkpointing=True,
|
| 219 |
+
logging_steps=100,
|
| 220 |
+
save_strategy="epoch",
|
| 221 |
+
evaluation_strategy="epoch"
|
| 222 |
+
)
|
| 223 |
+
```
|
| 224 |
+
|
| 225 |
+
## Use Cases
|
| 226 |
+
|
| 227 |
+
1. **3D Content Generation**: Automatically generate 3D models from text descriptions
|
| 228 |
+
2. **Simulation & Training**: Create scenarios for military/defense simulations
|
| 229 |
+
3. **Education**: Teach 3D graphics and X3D standards
|
| 230 |
+
4. **Research**: Benchmark structured data generation in LLMs
|
| 231 |
+
5. **Game Development**: Rapid prototyping of 3D assets
|
| 232 |
+
|
| 233 |
+
## Limitations
|
| 234 |
+
|
| 235 |
+
- **Domain Specific**: Primarily military/defense-oriented models
|
| 236 |
+
- **Format Specific**: Only X3D format (not OBJ, FBX, GLTF)
|
| 237 |
+
- **No Textures**: Models don't include texture image files
|
| 238 |
+
- **Geometric Focus**: Limited artistic/organic shapes
|
| 239 |
+
- **X3D Version**: Mostly X3D 3.0/3.3 (not latest 4.0)
|
| 240 |
+
|
| 241 |
+
## Citation
|
| 242 |
+
|
| 243 |
+
```bibtex
|
| 244 |
+
@dataset{savage_x3d_generation_2024,
|
| 245 |
+
title={Savage X3D Model Generation Dataset},
|
| 246 |
+
author={Web3D Consortium and Naval Postgraduate School},
|
| 247 |
+
year={2024},
|
| 248 |
+
publisher={Hugging Face},
|
| 249 |
+
journal={Hugging Face Datasets},
|
| 250 |
+
howpublished={\url{https://huggingface.co/datasets/stratplans/savage-x3d-generation}}
|
| 251 |
+
}
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
## Acknowledgments
|
| 255 |
+
|
| 256 |
+
- **Naval Postgraduate School** for maintaining the Savage repository
|
| 257 |
+
- **Web3D Consortium** for X3D standards and tools
|
| 258 |
+
- **Don Brutzman** and the Savage development team
|
| 259 |
+
- All original model creators and contributors
|
| 260 |
+
|
| 261 |
+
## License
|
| 262 |
+
|
| 263 |
+
Apache 2.0 - The dataset is provided under Apache 2.0 license. Original Savage models are provided under their respective licenses (see [Savage License](https://savage.nps.edu/Savage/license.html)).
|
| 264 |
+
|
| 265 |
+
## Links
|
| 266 |
+
|
| 267 |
+
- [Savage Repository](https://savage.nps.edu/Savage/)
|
| 268 |
+
- [X3D Specifications](https://www.web3d.org/standards)
|
| 269 |
+
- [Web3D Consortium](https://www.web3d.org/)
|
| 270 |
+
- [Dataset Generation Code](https://github.com/stratplans/x3d-llm-training)
|
| 271 |
+
|
| 272 |
+
## Dataset Samples
|
| 273 |
+
|
| 274 |
+
### Simple Example (Box):
|
| 275 |
+
```xml
|
| 276 |
+
<Shape>
|
| 277 |
+
<Appearance>
|
| 278 |
+
<Material diffuseColor='1 0 0'/>
|
| 279 |
+
</Appearance>
|
| 280 |
+
<Box size='2 2 2'/>
|
| 281 |
+
</Shape>
|
| 282 |
+
```
|
| 283 |
+
|
| 284 |
+
### Complex Example (Vehicle with multiple parts):
|
| 285 |
+
```xml
|
| 286 |
+
<Transform translation='0 0.5 0'>
|
| 287 |
+
<Shape>
|
| 288 |
+
<Appearance>
|
| 289 |
+
<Material diffuseColor='0.3 0.3 0.3'/>
|
| 290 |
+
</Appearance>
|
| 291 |
+
<Box size='4 1 2'/>
|
| 292 |
+
</Shape>
|
| 293 |
+
</Transform>
|
| 294 |
+
<Transform translation='1.5 0 0.8'>
|
| 295 |
+
<Shape>
|
| 296 |
+
<Appearance>
|
| 297 |
+
<Material diffuseColor='0.1 0.1 0.1'/>
|
| 298 |
+
</Appearance>
|
| 299 |
+
<Cylinder radius='0.3' height='0.2'/>
|
| 300 |
+
</Shape>
|
| 301 |
+
</Transform>
|
| 302 |
+
<!-- Additional vehicle components... -->
|
| 303 |
+
```
|
| 304 |
+
|
| 305 |
+
---
|
| 306 |
+
|
| 307 |
+
**Dataset created by**: [Your Name/Organization]
|
| 308 |
+
**Contact**: [Your contact information]
|
| 309 |
+
**Last updated**: August 26, 2024
|
augmented_data.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4c948f1a406f404413764c59b3dc60413d0f7e1443dfecdc0552d307dcd15e2
|
| 3 |
+
size 1773171992
|
dataset_info.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:359c95fa81d291e882ed9342a9071f49fbc9a5740df1bead9be1c6d74e1f0ca1
|
| 3 |
+
size 877
|
training_data.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fea6d0fbb6a4d5027e0f71ee954957e004432933b3d1139069c944eb6ed113a1
|
| 3 |
+
size 110454448
|