
Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError Exception: TypeError Message: Couldn't cast array of type struct<id: string, description: string, complexity: struct<total_nodes: int64, shape_count: int64, transform_count: int64, material_count: int64, animation_count: int64, viewpoint_count: int64, texture_count: int64, light_count: int64>, viewpoints: list<item: struct<description: string, position: string, orientation: string>>> to string Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise return get_rows( File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator return func(*args, **kwargs) File "/src/services/worker/src/worker/utils.py", line 77, in get_rows rows_plus_one = list(itertools.islice(ds, rows_max_number + 1)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 2361, in __iter__ for key, example in ex_iterable: File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1882, in __iter__ for key, pa_table in self._iter_arrow(): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1914, in _iter_arrow pa_table = cast_table_to_features(pa_table, self.features) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2197, in cast_table_to_features arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2197, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1795, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1795, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2086, in cast_array_to_feature return array_cast( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1797, in wrapper return func(array, *args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1950, in array_cast raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}") TypeError: Couldn't cast array of type struct<id: string, description: string, complexity: struct<total_nodes: int64, shape_count: int64, transform_count: int64, material_count: int64, animation_count: int64, viewpoint_count: int64, texture_count: int64, light_count: int64>, viewpoints: list<item: struct<description: string, position: string, orientation: string>>> to string
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Savage X3D Model Generation Dataset
Dataset Description
Purpose
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 Savage 3D Model Repository maintained by the Naval Postgraduate School.
Key Statistics
Metric | Value |
---|---|
Total Training Examples | 19,712 |
Base X3D Models | 1,232 |
Augmentation Factor | 16x |
Dataset Size | 1.7 GB |
Average Model Size | ~90 KB |
Total Downloaded Models | 3,696 |
Processing Time | ~30 minutes |
Hardware Used | 64-core, 5x RTX 4090 |
Quick Start
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("stratplans/savage-x3d-generation")
# Example usage
example = dataset['train'][0]
print(f"Instruction: {example['instruction']}")
print(f"Input metadata: {example['input']}")
print(f"Output X3D: {example['output'][:500]}...") # First 500 chars
Dataset Structure
Data Fields
Each training example contains four fields:
instruction
(string): Natural language prompt requesting X3D generation- Example: "Create an X3D model of military ground vehicle with 4 shapes using Box, Cylinder geometries"
input
(string): JSON-encoded metadata providing context{ "category": "vehicle", "keywords": ["military", "hmmwv", "armored"], "complexity": "medium", "profile": "Immersive", "source_file": "HMMWV" }
output
(string): Complete X3D XML model<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd"> <X3D profile='Immersive' version='3.0'> <Scene> <Transform> <Shape> <Appearance> <Material diffuseColor='0.5 0.5 0.5'/> </Appearance> <Box size='2 1 4'/> </Shape> </Transform> </Scene> </X3D>
metadata
(string): JSON-encoded additional information- Model complexity metrics (node count, shapes, materials)
- Viewpoint information
- Animation details
- Original model ID
Dataset Categories
The dataset covers 9 major categories from the Savage repository:
Category | Description | Example Models |
---|---|---|
GroundVehicles | Military ground vehicles | HMMWV, M1A1, Jeep |
AircraftFixedWing | Fixed-wing aircraft | F-16, F-18, AV8B Harrier |
AircraftRotaryWing | Helicopters | Apache, BlackHawk, CH-46 |
ShipsMilitary | Naval vessels | Destroyers, Frigates, Carriers |
ShipsCivilian | Civilian vessels | Tankers, Ferries, Tugboats |
Buildings | Structures | Hangars, Houses, Stadiums |
Sensors | Detection equipment | Radar, Sonar, Satellites |
Weapons | Military ordnance | Missiles, Bombs |
AmphibiousVehicles | Amphibious craft | LCAC, AAV |
Dataset Creation Process
1. Data Collection (Parallel Download)
# Used 32 parallel threads for efficient downloading
with concurrent.futures.ThreadPoolExecutor(max_workers=32) as executor:
# Downloaded 3,696 X3D files from savage.nps.edu
# Crawled 1,439 index pages
# Total download time: ~10 minutes
2. Data Processing Pipeline
# Parse X3D files and extract structured information
for x3d_file in x3d_files:
metadata = extract_metadata(x3d_file) # Title, creator, keywords
scene_info = extract_scene_info(x3d_file) # Shapes, materials, transforms
complexity = calculate_complexity(x3d_file) # Node counts, animations
description = generate_description(...) # Natural language description
3. Data Augmentation Techniques
Applied 5 augmentation strategies to increase dataset diversity:
- Color Variations: Modified HSV values of materials
- Scale Transformations: Applied 0.5x to 2x scaling
- Rotation Modifications: Added random rotations on axes
- Viewpoint Adjustments: Modified camera positions
- Lighting Variations: Adjusted light intensities and colors
4. Instruction Generation
Created diverse instruction templates:
templates = [
"Create an X3D model of {description}",
"Generate a 3D scene showing {description}",
"Build an X3D representation of {description}",
"Design an X3D model featuring {description}",
"Construct a 3D model with {description}"
]
Training Configuration Example
from transformers import AutoModelForCausalLM, TrainingArguments
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B")
training_args = TrainingArguments(
output_dir="./x3d-generator",
num_train_epochs=3,
per_device_train_batch_size=4,
gradient_accumulation_steps=2,
learning_rate=2e-5,
bf16=True,
gradient_checkpointing=True,
logging_steps=100,
save_strategy="epoch",
evaluation_strategy="epoch"
)
Use Cases
- 3D Content Generation: Automatically generate 3D models from text descriptions
- Simulation & Training: Create scenarios for military/defense simulations
- Education: Teach 3D graphics and X3D standards
- Research: Benchmark structured data generation in LLMs
- Game Development: Rapid prototyping of 3D assets
Limitations
- Domain Specific: Primarily military/defense-oriented models
- Format Specific: Only X3D format (not OBJ, FBX, GLTF)
- No Textures: Models don't include texture image files
- Geometric Focus: Limited artistic/organic shapes
- X3D Version: Mostly X3D 3.0/3.3 (not latest 4.0)
Citation
@dataset{savage_x3d_generation_2024,
title={Savage X3D Model Generation Dataset},
author={Web3D Consortium and Naval Postgraduate School},
year={2024},
publisher={Hugging Face},
journal={Hugging Face Datasets},
howpublished={\url{https://huggingface.co/datasets/stratplans/savage-x3d-generation}}
}
Acknowledgments
- Naval Postgraduate School for maintaining the Savage repository
- Web3D Consortium for X3D standards and tools
- Don Brutzman and the Savage development team
- All original model creators and contributors
License
Apache 2.0 - The dataset is provided under Apache 2.0 license. Original Savage models are provided under their respective licenses (see Savage License).
Links
Dataset Samples
Simple Example (Box):
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Box size='2 2 2'/>
</Shape>
Complex Example (Vehicle with multiple parts):
<Transform translation='0 0.5 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.3 0.3 0.3'/>
</Appearance>
<Box size='4 1 2'/>
</Shape>
</Transform>
<Transform translation='1.5 0 0.8'>
<Shape>
<Appearance>
<Material diffuseColor='0.1 0.1 0.1'/>
</Appearance>
<Cylinder radius='0.3' height='0.2'/>
</Shape>
</Transform>
<!-- Additional vehicle components... -->
- Downloads last month
- 78
Models trained or fine-tuned on stratplans/savage-x3d-generation
