Spaces:
Paused
Paused
Update README.md for ZeroGPU (sdk_version 5.12.0)
Browse files
README.md
CHANGED
|
@@ -1,12 +1,83 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 5.
|
| 8 |
-
app_file:
|
| 9 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ObjectAssembler - LEGO 3D Assembly Prediction
|
| 3 |
+
emoji: 🧱
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.12.0
|
| 8 |
+
app_file: code/demo.py
|
| 9 |
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
python_version: 3.10
|
| 12 |
+
preload_from_hub:
|
| 13 |
+
- 0xZohar/object-assembler-models save_shape_cars_whole_p_rot_scratch_4mask_randp.safetensors
|
| 14 |
+
- openai/clip-vit-base-patch32
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# ObjectAssembler: Assemble Your Object with Diverse Components
|
| 18 |
+
|
| 19 |
+
A deep learning-based system for predicting and visualizing LEGO brick assembly sequences using transformer models.
|
| 20 |
+
|
| 21 |
+
## Features
|
| 22 |
+
|
| 23 |
+
- **LDR File Processing**: Upload `.ldr` (LDraw format) files containing LEGO brick assembly instructions
|
| 24 |
+
- **Text-to-LEGO**: Describe your desired design in natural language (e.g., "red sports car")
|
| 25 |
+
- **AI-Powered Prediction**: Uses GPT-based transformer models to predict optimal assembly sequences
|
| 26 |
+
- **3D Rendering**: Generates high-quality 3D visualizations using Blender
|
| 27 |
+
- **Part Visualization**: Displays individual brick components with rendered previews
|
| 28 |
+
- **Interactive UI**: User-friendly Gradio interface for easy interaction
|
| 29 |
+
|
| 30 |
+
## Model Architecture
|
| 31 |
+
|
| 32 |
+
- **GPT Model**: 5-layer transformer with 12 attention heads
|
| 33 |
+
- **Shape Tokenizer**: VQ-VAE autoencoder with 16,384 token vocabulary
|
| 34 |
+
- **CLIP Integration**: Vision-language model for text-to-design retrieval
|
| 35 |
+
- **Model Size**: ~1.6GB total weights
|
| 36 |
+
|
| 37 |
+
## Usage
|
| 38 |
+
|
| 39 |
+
### Option 1: Upload LDR File
|
| 40 |
+
1. Upload an `.ldr` file containing LEGO part names
|
| 41 |
+
2. Click "Load Input" to process and visualize individual parts
|
| 42 |
+
3. Click "Generate New LDR & Render" to predict assembly sequence
|
| 43 |
+
4. Download the generated LDR file or view the 3D rendering
|
| 44 |
+
|
| 45 |
+
### Option 2: Text-to-LEGO
|
| 46 |
+
1. Enter a text description (e.g., "red sports car", "blue police car")
|
| 47 |
+
2. Click "Load Input" to retrieve a similar design
|
| 48 |
+
3. Click "Generate New LDR & Render" to generate assembly sequence
|
| 49 |
+
4. View the AI-generated LEGO model
|
| 50 |
+
|
| 51 |
+
## Hardware Requirements
|
| 52 |
+
|
| 53 |
+
- **GPU**: Runs on HuggingFace ZeroGPU (H200, 70GB VRAM)
|
| 54 |
+
- **Memory**: At least 8GB RAM
|
| 55 |
+
- **Storage**: ~2GB for model weights and dependencies
|
| 56 |
+
|
| 57 |
+
## Technical Stack
|
| 58 |
+
|
| 59 |
+
- PyTorch 2.0+
|
| 60 |
+
- Gradio 5.12.0+
|
| 61 |
+
- Blender 3.6 (for rendering)
|
| 62 |
+
- Transformers (Hugging Face)
|
| 63 |
+
- CLIP (OpenAI)
|
| 64 |
+
- **ZeroGPU** for efficient GPU allocation
|
| 65 |
+
|
| 66 |
+
## Citation
|
| 67 |
+
|
| 68 |
+
If you use this work in your research, please cite:
|
| 69 |
+
|
| 70 |
+
```bibtex
|
| 71 |
+
@article{objectassembler2024,
|
| 72 |
+
title={ObjectAssembler: Assemble Your Object with Diverse Components},
|
| 73 |
+
year={2024}
|
| 74 |
+
}
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## License
|
| 78 |
+
|
| 79 |
+
MIT License
|
| 80 |
+
|
| 81 |
+
## Acknowledgments
|
| 82 |
+
|
| 83 |
+
Built with PyTorch, Gradio, Blender, and HuggingFace ZeroGPU.
|