SJY-1995 commited on
Commit
7c1fe91
·
verified ·
1 Parent(s): d696340

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +153 -3
README.md CHANGED
@@ -1,3 +1,153 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ tags:
5
+ - multimodal
6
+ - vision-language
7
+ - code-generation
8
+ - tikz
9
+ - geometric-reasoning
10
+ - computer-vision
11
+ - cvpr2026
12
+ - internvl
13
+ - state-of-the-art
14
+ - large-multimodal-model
15
+ datasets:
16
+ - SJY-1995/GeoTikz-Base
17
+ model-index:
18
+ - name: GeoTikzBridge-Base-38B
19
+ results:
20
+ - task:
21
+ type: image-to-text
22
+ name: High-Precision Image-to-TikZ Code Generation
23
+ dataset:
24
+ name: GeoTikz-Base
25
+ type: SJY-1995/GeoTikz-Base
26
+ metrics:
27
+ - type: CLIP-S
28
+ value: 91.5
29
+ name: CLIP-S
30
+ - type: compilation_accuracy
31
+ value: 95.2
32
+ name: LaTeX Compilation Success Rate
33
+ ---
34
+
35
+ # GeoTikzBridge-Base-38B
36
+
37
+ ## Model Overview
38
+ GeoTikzBridge-Base-38B is the high-capacity flagship model of the GeoTikzBridge series, presented in the **CVPR 2026** accepted paper *GeoTikzBridge: Advancing Multimodal Code Generation for Geometric Perception and Reasoning*. Built on the state-of-the-art InternVL3.5-38B-Instruct multimodal architecture, this model is fully fine-tuned on the 2.5M-scale GeoTikz-Base dataset, delivering industry-leading performance in complex geometric figure perception and high-precision TikZ code generation. With 38 billion parameters, it achieves exceptional accuracy in fine-grained geometric structure restoration, complex multi-component figure parsing, and long-sequence standardized code generation, setting a new baseline for geometric multimodal code generation tasks.
39
+
40
+ ## Model Details
41
+ ### Core Architecture
42
+ - Backbone Foundation: Built on the InternVL3.5-38B-Instruct large multimodal model, leveraging its advanced vision-language alignment capability, long-context understanding, and robust code generation foundation.
43
+ - Parameter Scale: 38 billion parameters, optimized for high-precision geometric perception and complex code generation, with significantly enhanced representation learning ability for geometric spatial relationships and structural logic compared to smaller variants.
44
+ - Targeted Optimization: Specialized pre-training and fine-tuning for ultra-complex planar geometric figures, including multi-layer nested structures, dense annotation systems, multi-formula integration, and composite engineering schematics, with optimized long-sequence code generation stability.
45
+
46
+ ### Core Capabilities
47
+ 1. **Ultra-High Precision Geometric Image-to-TikZ Conversion**: Delivers pixel-level accurate restoration of complex geometric figures, with generated TikZ code achieving near-perfect consistency with the input image after LaTeX rendering.
48
+ 2. **Complex Composite Figure Parsing**: Supports end-to-end parsing and code generation for multi-component nested geometric figures, dense engineering schematics, and academic paper illustrations with complex layouts and annotations.
49
+ 3. **Long-Sequence Stable Code Generation**: Maintains excellent syntactic correctness and structural standardization for long TikZ code sequences, with a near-zero syntax error rate for complex figure generation.
50
+ 4. **Fine-Grained Geometric Detail Restoration**: Accurately captures and reproduces tiny geometric details, including precise angle labels, dimensional tolerances, dashed/dotted line styles, and nested mathematical formula annotations.
51
+ 5. **Strong Cross-Scene Generalization**: Maintains outstanding generation performance across diverse scenarios, from basic geometric teaching materials to high-standard academic journal illustrations and professional planar engineering schematics.
52
+
53
+ ## Intended Use & Limitations
54
+ ### Intended Use Cases
55
+ - Core Scenarios: High-quality geometric illustration generation for top-tier academic journals and conference papers, professional textbook and monograph geometric material production, high-precision planar engineering schematic vectorization, and large-scale high-quality geometric dataset construction.
56
+ - Research Purposes: Serves as the state-of-the-art baseline model for geometric perception, multimodal code generation, and spatial reasoning research, supporting cutting-edge academic exploration in related fields.
57
+ - Industrial Applications: Can be integrated into professional publishing systems, CAD auxiliary tools, and intelligent education platforms to provide enterprise-level geometric figure processing capabilities.
58
+
59
+ ### Out-of-Scope Use Cases
60
+ - Code generation for non-geometric images (e.g., natural images, portraits, complex 3D modeling, unstructured hand-drawn doodles).
61
+ - Generation of 3D mechanical drawings, BIM models, and other complex engineering content beyond the scope of TikZ planar drawing.
62
+ - High-risk industrial production drawings without professional compilation and manual verification.
63
+
64
+ ### Model Limitations
65
+ - The model has higher requirements for deployment hardware, requiring a GPU with sufficient video memory for efficient inference (quantization is supported for deployment on consumer-grade GPUs).
66
+ - While achieving extremely high compilation accuracy, the generated TikZ code for extremely complex engineering schematics still requires professional manual verification and fine-tuning.
67
+ - The model only supports English and mathematical symbol annotation generation, and does not support text annotations in other languages for now.
68
+ - Generation quality may degrade for severely blurred, distorted, or heavily occluded input images.
69
+
70
+ ## Quick Start
71
+ ### Environment Setup
72
+ Install basic dependencies:
73
+ ```bash
74
+ pip install transformers torch pillow accelerate bitsandbytes
75
+ ```
76
+ For full training/inference dependencies, please refer to the official project repository: [GeoTikzBridge GitHub](sslocal://flow/file_open?url=https%3A%2F%2Fgithub.com%2Fsjy-1995%2FGeoTikzBridge%2F&flow_extra=eyJsaW5rX3R5cGUiOiJjb2RlX2ludGVycHJldGVyIn0=)
77
+
78
+ ### Inference
79
+ ```python
80
+ from transformers import AutoProcessor, AutoModelForCausalLM
81
+ import torch
82
+ from PIL import Image
83
+
84
+ # Load model and processor
85
+ model_name = "SJY-1995/GeoTikzBridge-Base-38B"
86
+ processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
87
+ model = AutoModelForCausalLM.from_pretrained(
88
+ model_name,
89
+ torch_dtype=torch.bfloat16,
90
+ trust_remote_code=True,
91
+ device_map="auto"
92
+ )
93
+
94
+ # Load input geometric image
95
+ image = Image.open("your_complex_geometric_figure.png").convert("RGB")
96
+
97
+ # Build inference prompt
98
+ prompt = ""
99
+ inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device)
100
+
101
+ # Generate TikZ code
102
+ with torch.no_grad():
103
+ output = model.generate(
104
+ **inputs,
105
+ max_new_tokens=8192,
106
+ temperature=0.1,
107
+ top_p=0.95,
108
+ do_sample=False
109
+ )
110
+
111
+ # Decode and output the generated result
112
+ tikz_code = processor.decode(output[0], skip_special_tokens=True)
113
+ print("Generated TikZ Code:\n", tikz_code)
114
+ ```
115
+
116
+ ## Training Details
117
+ ### Training Dataset
118
+ The model is fully fine-tuned on the **GeoTikz-Base** dataset, which contains approximately 2.5 million high-quality geometric image-TikZ code paired samples. The dataset covers a wide range of scenarios, from basic planar geometric figures to complex composite illustrations, engineering schematics, and academic paper figures, building a comprehensive and high-precision vision-code aligned training corpus.
119
+
120
+ Dataset Link: [SJY-1995/GeoTikz-Base](sslocal://flow/file_open?url=https%3A%2F%2Fhuggingface.co%2Fdatasets%2FSJY-1995%2FGeoTikz-Base&flow_extra=eyJsaW5rX3R5cGUiOiJjb2RlX2ludGVycHJldGVyIn0=)
121
+
122
+ ### Key Training Hyperparameters
123
+ | Hyperparameter | Configuration |
124
+ |----------------|---------------|
125
+ | Global Batch Size | 64 |
126
+ | Peak Learning Rate | 2e-7 |
127
+ | Training Epochs | 3 |
128
+ | Max Sequence Length | 12800 |
129
+ | Training Precision | BF16 |
130
+
131
+ ### Training Framework & Scripts
132
+ Model training is implemented based on the official InternVL training framework. The core fine-tuning scripts and complete training pipeline can be found in the project repository:
133
+ - Project Repository: [GeoTikzBridge GitHub](sslocal://flow/file_open?url=https%3A%2F%2Fgithub.com%2Fsjy-1995%2FGeoTikzBridge%2F&flow_extra=eyJsaW5rX3R5cGUiOiJjb2RlX2ludGVycHJldGVyIn0=)
134
+
135
+ ## Model Family
136
+ The GeoTikzBridge series includes multiple models with different specifications and capabilities to adapt to various scenario requirements:
137
+ | Model Name | Parameter Size | Core Capability | Model Link |
138
+ |------------|----------------|-----------------|------------|
139
+ | GeoTikzBridge-Base-8B | 8B | Lightweight, efficient basic geometric image-to-TikZ code generation | [🤗 Hugging Face](sslocal://flow/file_open?url=https%3A%2F%2Fhuggingface.co%2FSJY-1995%2FGeoTikzBridge-Base-8B&flow_extra=eyJsaW5rX3R5cGUiOiJjb2RlX2ludGVycHJldGVyIn0=) |
140
+ | GeoTikzBridge-Base-38B | 38B | Flagship high-precision complex geometric figure TikZ code generation | [🤗 Hugging Face](sslocal://flow/file_open?url=https%3A%2F%2Fhuggingface.co%2FSJY-1995%2FGeoTikzBridge-Base-38B&flow_extra=eyJsaW5rX3R5cGUiOiJjb2RlX2ludGVycHJldGVyIn0=) |
141
+ | GeoTikzBridge-Instruct-8B | 8B | Instruction following, auxiliary line generation, interactive geometric reasoning | [🤗 Hugging Face](sslocal://flow/file_open?url=https%3A%2F%2Fhuggingface.co%2FSJY-1995%2FGeoTikzBridge-Instruct-8B&flow_extra=eyJsaW5rX3R5cGUiOiJjb2RlX2ludGVycHJldGVyIn0=) |
142
+
143
+ ## Citation
144
+ If you use this model, related datasets or code in your research or projects, please cite the following paper:
145
+ ```bibtex
146
+ @inproceedings{
147
+ geotikzbridge,
148
+ title={GeoTikzBridge: Advancing Multimodal Code Generation for Geometric Perception and Reasoning},
149
+ author={Jiayin Sun and Caixia Sun and Boyu Yang and Hailin Li and Xiao Chen and Yi Zhang and Errui Ding and Liang Li and Chao Deng and Junlan Feng},
150
+ booktitle={2026 IEEE/CVF Conference on Computer Vision and Pattern Recognition},
151
+ year={2026}
152
+ }
153
+ ```