nikoloside commited on
Commit
6274e8d
Β·
verified Β·
1 Parent(s): b152a33

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +81 -76
README.md CHANGED
@@ -1,108 +1,113 @@
1
- # DeepFracture: A Generative Approach for Predicting Brittle Fractures with Neural Discrete Representation Learning
2
 
3
- This is a collection of pre-trained models for deepfracture: a conditional vq-vae model for predicting fracture pattern from impulse code, trained on the [Break4Models](https://huggingface.co/datasets/nikoloside/break4models) dataset created by [FractureRB](https://github.com/david-hahn/FractureRB).
4
 
 
 
 
 
5
 
6
- πŸ“– **For more details, please visit:**
7
- - [GitHub Repository](https://github.com/nikoloside/TEBP)
8
- - [Project Page](https://nikoloside.graphics/deepfracture/)
9
 
10
- ## Overview
 
 
11
 
12
- These models are designed to predict fracture patterns based on impact conditions. Each model is trained on a specific target shape and can be used for real-time physics simulation and computer graphics applications.
13
 
14
- ## Model Architecture
15
 
16
- The models use an encoder-decoder architecture:
17
- - **Encoder**: Processes input impulse conditions and generates latent representations
18
- - **Decoder**: Reconstructs GS-SDF(Geometrically-Segmented Signed Distance Fields) from latent representations
19
- - **Training**: Supervised learning on physics simulation data
 
20
 
21
- ## Available Models
22
 
23
- ```
24
- pre-trained-v2/
25
- β”œβ”€β”€ base/ # Base object model
26
- β”œβ”€β”€ pot/ # Pot object model
27
- β”œβ”€β”€ squirrel/ # Squirrel object model
28
- β”œβ”€β”€ bunny/ # Bunny object model
29
- β”œβ”€β”€ lion/ # Lion object model
30
- └── README.md # This file
31
- ```
32
 
33
- Each model directory contains:
34
- - `{shape}.obj` - Reference original 3D mesh file
35
- - `{shape}-encoder.pt` - Encoder weights
36
- - `{shape}-decoder.pt` - Decoder weights
37
- - `{shape}-1000-encoder.pt` - Encoder weights (1000 epoch version)
38
- - `{shape}-1000-decoder.pt` - Decoder weights (1000 epoch version)
39
 
40
- ## Usage
41
 
42
- ### Loading Models
43
 
44
- ```python
45
- import torch
46
- from your_model_architecture import Encoder, Decoder
47
 
48
- # Load encoder
49
- encoder = Encoder()
50
- encoder.load_state_dict(torch.load('base/base-encoder.pt'))
51
- encoder.eval()
52
 
53
- # Load decoder
54
- decoder = Decoder()
55
- decoder.load_state_dict(torch.load('base/base-decoder.pt'))
56
- decoder.eval()
57
 
58
- # Load reference mesh
59
- import trimesh
60
- reference_mesh = trimesh.load('base/base.obj')
61
- ```
62
 
63
- ### Inference
64
 
65
- [Example](https://github.com/nikoloside/TEBP/blob/main/04.Run-time/predict-runtime.py)
66
- [Details](https://github.com/nikoloside/TEBP/blob/main/04.Run-time/MorphoImageJ.py#L34)
67
 
68
- ```python
69
- # Prepare input conditions
70
- input_conditions = prepare_impact_conditions(impact_point, velocity, impulse_strength)
 
71
 
72
- # Encode
73
- with torch.no_grad():
74
- latent = encoder(input_conditions)
75
-
76
- # Decode
77
- deformed_geometry = decoder(latent)
78
 
79
- # Apply to reference mesh
80
- result_mesh = processCagedSDFSeg(ri, work_path, obj_path, isBig = False, maxValue = 1.0)
81
- ```
 
 
 
 
82
 
83
- ## Model Performance
84
 
85
- Each model has been trained and validated on the corresponding object category:
86
 
87
- | Model | Training Samples | Validation Accuracy | Inference Time |
88
- |-------|------------------|-------------------|----------------|
89
- | base | 277 | 94.2% | ~5ms |
90
- | pot | 433 | 91.8% | ~6ms |
91
- | squirrel | [TBD] | [TBD] | [TBD] |
92
- | bunny | [TBD] | [TBD] | [TBD] |
93
- | lion | [TBD] | [TBD] | [TBD] |
94
 
95
- ## Training Details
 
 
 
96
 
 
 
 
 
 
 
 
 
97
  - **Dataset**: Break4Model dataset
98
  - **Framework**: PyTorch
99
  - **Optimizer**: Adam
100
  - **Loss Function**: L2 Loss
101
  - **Training Time**: ~24 hours per model on NVIDIA RTX 3090
102
 
103
- ## Citation
 
 
104
 
105
- If you use these models in your research, please cite:
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  ```bibtex
108
  @article{huang2025deepfracture,
@@ -118,10 +123,10 @@ eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/cgf.70002}
118
  }
119
  ```
120
 
121
- ## License
122
 
123
- APACHE 2.0
124
 
125
- ## Contact
126
 
127
- For questions or issues, please open an issue on the Hugging Face model page.
 
1
+ # Model Card for DeepFracture
2
 
3
+ ## Model Description
4
 
5
+ - **Model type**: 3D Fracture Pattern Prediction via impulse-code conditional VQ-VAE models
6
+ - **Language(s)**: Python
7
+ - **License**: Apache-2.0
8
+ - **Finetuned from model**: Custom architecture
9
 
10
+ ### Model Sources
 
 
11
 
12
+ - **Repository**: https://github.com/nikoloside/TEBP
13
+ - **Paper**: https://doi.org/10.1111/cgf.70002
14
+ - **Demo**: [WIP]
15
 
16
+ ## Uses
17
 
18
+ ### Direct Use
19
 
20
+ These models are designed for:
21
+ - Computer graphics applications
22
+ - Game development
23
+ - Virtual reality environments
24
+ - Paper code release
25
 
26
+ ### Out-of-Scope Use
27
 
28
+ - Medical applications
29
+ - Safety-critical systems
30
+ - High-precision engineering simulations
 
 
 
 
 
 
31
 
32
+ ## Bias, Risks, and Limitations
 
 
 
 
 
33
 
34
+ ### Bias
35
 
36
+ The models are trained on synthetic simulation data and may not generalize well to real-world scenarios with different material properties or environmental conditions.
37
 
38
+ ### Risks
 
 
39
 
40
+ - Models may produce unrealistic deformations under extreme conditions
41
+ - Performance may significantly different from training data
42
+ - No guarantees for physical accuracy in safety-critical applications
 
43
 
44
+ ### Limitations
 
 
 
45
 
46
+ - Limited to the specific one target shape and object categories in the training dataset
47
+ - Be able to reach real-time inference in network, but need resconstruction within 2-10 seconds
 
 
48
 
49
+ ## Training Details
50
 
51
+ ### Training Data
 
52
 
53
+ - **Dataset**: Break4Model dataset
54
+ - **Training samples**: Varies by model (277-433 samples per category)
55
+ - **Validation samples**: 20% of training data
56
+ - **Data preprocessing**: Normalized impact conditions and geometry of GS-SDF
57
 
58
+ ### Training Procedure
 
 
 
 
 
59
 
60
+ - **Training regime**: Supervised learning
61
+ - **Optimizer**: Adam
62
+ - **Learning rate**: 1e-3 - 1e-5
63
+ - **Batch size**: 1
64
+ - **Training epochs**: 1000
65
+ - **Hardware**: NVIDIA RTX 3090 GPU
66
+ - **Training time**: ~24 hours per model
67
 
68
+ ### Training Results
69
 
70
+ (metrics and performance)[https://doi.org/10.1111/cgf.70002]
71
 
72
+ ## Evaluation
 
 
 
 
 
 
73
 
74
+ ### Testing Data
75
+
76
+ - **Dataset**: Break4Models
77
+ - **Metrics**: Geometric accuracy, Fragment size, Inference time, Fragment distribution, Surface normals, MPCD (Multiple-Phase Charmfer Distance)
78
 
79
+ ### Results
80
+
81
+ The models achieve high accuracy in predicting fracture patterns while maintaining nearly real-time performance suitable for interactive applications.
82
+
83
+ ## Environmental Impact
84
+
85
+ - **Hardware Type**: GPU
86
+ - **Hours used**: ~24 hours per model
87
  - **Dataset**: Break4Model dataset
88
  - **Framework**: PyTorch
89
  - **Optimizer**: Adam
90
  - **Loss Function**: L2 Loss
91
  - **Training Time**: ~24 hours per model on NVIDIA RTX 3090
92
 
93
+ ## Technical Specifications
94
+
95
+ ### Model Architecture
96
 
97
+ - **Encoder**: SIREN Layer
98
+ - **Decoder**: CNN
99
+ - **Parameters**: ~2M parameters per model
100
+ - **Input**: Impact conditions (position, velocity, impulse strength) from Bullet3
101
+ - **Output**: GS-SDF (Geometrically-Segmented Signed Distance Fields)
102
+
103
+ ### Compute Requirements
104
+
105
+ - **Training**: NVIDIA RTX 3090 or equivalent
106
+ - **Inference**: CPU or GPU
107
+ - **Memory**: 8GB RAM minimum
108
+ - **Storage**: ~200MB per model
109
+
110
+ ## Citation
111
 
112
  ```bibtex
113
  @article{huang2025deepfracture,
 
123
  }
124
  ```
125
 
126
+ ## Data Card Authors
127
 
128
+ Huang Niko(nikoloside), Fang Chaowei(fangsunjian)
129
 
130
+ ## Data Card Contact
131
 
132
+ https://github.com/nikoloside/TEBP