BlenderLLM  by FreedomIntelligence

LLM for generating CAD scripts

Created 1 year ago
253 stars

Top 99.4% on SourcePulse

GitHubView on GitHub
Project Summary

BlenderLLM is an open-source large language model specifically designed to generate Computer-Aided Design (CAD) scripts from user instructions. It aims to simplify CAD workflows, making them more accessible by translating natural language commands into executable Blender Python (bpy) scripts, thereby lowering the entry barrier for CAD applications. The project provides a specialized dataset, a fine-tuned LLM, and a benchmark for evaluating CAD-oriented LLMs.

How It Works

BlenderLLM is built upon the Qwen2.5-Coder-7B-Instruct model, fine-tuned on a custom dataset named BlendNet. BlendNet contains 12,000 pairs of <instruction, CAD script> samples, curated through a combination of manual annotation and GPT-4o generation. The model takes user instructions as input and outputs bpy scripts, which are then executed within Blender to render 3D models. This approach bridges the gap between user intent and complex CAD operations by leveraging LLM's natural language understanding capabilities.

Quick Start & Requirements

  • Installation: Install required packages using pip install -r requirements.txt.
  • Prerequisites: Blender must be installed and accessible via system paths. Test with blender --version.
  • Running:
    • For chat-only interaction: python chat.py --model_name "$MODEL_NAME" --prompt "$PROMPT"
    • For script execution and rendering: python modeling.py --model_name "$MODEL_NAME" --prompt "$PROMPT" --obj_name "$OBJ_NAME" --output_folder "$OUTPUT_FOLDER" --blender_executable "$BLENDER_EXECUTABLE" --brightness "$BRIGHTNESS"
  • Documentation: The project's technical report is available at https://arxiv.org/abs/2412.14203.

Highlighted Details

  • BlendNet Dataset: A high-quality dataset comprising 12,000 <instruction, CAD script> pairs, designed for diversity in object types, instruction tones, and complexity.
  • CADBench Benchmark: A comprehensive evaluation suite for CAD-oriented LLMs, including simulated and real-world data samples.
  • Model Performance: BlenderLLM demonstrates superior performance on CADBench compared to other models, particularly in generating accurate and functional CAD scripts.
  • Open Source Release: The project has released the BlendNet dataset, BlenderLLM model weights (based on Qwen2.5-Coder-7B-Instruct), and the CADBench benchmark.

Maintenance & Community

No specific details regarding maintenance, active contributors, community channels (like Discord or Slack), or a public roadmap are provided in the README.

Licensing & Compatibility

The README does not explicitly state the license for BlenderLLM, BlendNet, or CADBench. The base model, Qwen2.5-Coder-7B-Instruct, is available under the Apache-2.0 license. Compatibility for commercial use or linking with closed-source projects is not specified and would require checking the licenses of all components.

Limitations & Caveats

BlenderLLM currently focuses on basic CAD modeling tasks and does not support advanced features such as material properties or internal structural details. It accepts text instructions only and does not support direct CAD model creation or multimodal inputs. Furthermore, the model lacks multi-turn dialogue capabilities, limiting its use for iterative or collaborative design processes.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
7 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.