ddacs 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ddacs-2.0.0/LICENSE +21 -0
- ddacs-2.0.0/PKG-INFO +275 -0
- ddacs-2.0.0/README.md +200 -0
- ddacs-2.0.0/ddacs/__init__.py +65 -0
- ddacs-2.0.0/ddacs/cli.py +462 -0
- ddacs-2.0.0/ddacs/generators.py +256 -0
- ddacs-2.0.0/ddacs/pytorch.py +212 -0
- ddacs-2.0.0/ddacs/utils.py +441 -0
- ddacs-2.0.0/ddacs.egg-info/PKG-INFO +275 -0
- ddacs-2.0.0/ddacs.egg-info/SOURCES.txt +22 -0
- ddacs-2.0.0/ddacs.egg-info/dependency_links.txt +1 -0
- ddacs-2.0.0/ddacs.egg-info/entry_points.txt +2 -0
- ddacs-2.0.0/ddacs.egg-info/requires.txt +33 -0
- ddacs-2.0.0/ddacs.egg-info/top_level.txt +1 -0
- ddacs-2.0.0/examples/quick_start.py +69 -0
- ddacs-2.0.0/pyproject.toml +120 -0
- ddacs-2.0.0/setup.cfg +4 -0
- ddacs-2.0.0/tests/__init__.py +1 -0
- ddacs-2.0.0/tests/conftest.py +18 -0
- ddacs-2.0.0/tests/test_degenerate_triangles.py +99 -0
- ddacs-2.0.0/tests/test_generators.py +135 -0
- ddacs-2.0.0/tests/test_installation.py +56 -0
- ddacs-2.0.0/tests/test_point_cloud_extraction.py +237 -0
- ddacs-2.0.0/tests/test_pytorch.py +149 -0
ddacs-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sebastian Baum
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ddacs-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ddacs
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Deep Drawing and Cutting Simulations (DDACS) Dataset - Python interface
|
|
5
|
+
Author-email: Sebastian Baum <Baum.Sebastian@protonmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 Sebastian Baum
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Repository, https://github.com/BaumSebastian/DDACS
|
|
29
|
+
Project-URL: Documentation, https://ddacs.readthedocs.io
|
|
30
|
+
Project-URL: Dataset, https://darus.uni-stuttgart.de/dataset.xhtml?persistentId=doi:10.18419/DARUS-4801
|
|
31
|
+
Project-URL: Paper, https://www.matec-conferences.org/articles/matecconf/abs/2025/02/matecconf_iddrg2025_01090/matecconf_iddrg2025_01090.html
|
|
32
|
+
Keywords: machine-learning,dataset,simulation,fem,sheet-metal-forming,deep-drawing,hdf5,materials-science
|
|
33
|
+
Classifier: Development Status :: 4 - Beta
|
|
34
|
+
Classifier: Intended Audience :: Science/Research
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
37
|
+
Classifier: Programming Language :: Python :: 3
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Requires-Python: >=3.10
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
Requires-Dist: h5py>=3.8.0
|
|
46
|
+
Requires-Dist: numpy>=1.21.0
|
|
47
|
+
Requires-Dist: pandas>=1.3.0
|
|
48
|
+
Requires-Dist: requests>=2.28.0
|
|
49
|
+
Requires-Dist: humanfriendly>=10.0
|
|
50
|
+
Requires-Dist: rich>=13.0.0
|
|
51
|
+
Provides-Extra: torch
|
|
52
|
+
Requires-Dist: torch>=2.0.0; extra == "torch"
|
|
53
|
+
Provides-Extra: examples
|
|
54
|
+
Requires-Dist: torch>=2.0.0; extra == "examples"
|
|
55
|
+
Requires-Dist: jupyter>=1.0.0; extra == "examples"
|
|
56
|
+
Requires-Dist: matplotlib>=3.5.0; extra == "examples"
|
|
57
|
+
Requires-Dist: seaborn>=0.11.0; extra == "examples"
|
|
58
|
+
Requires-Dist: plotly>=5.0.0; extra == "examples"
|
|
59
|
+
Requires-Dist: pyvista>=0.46.5; extra == "examples"
|
|
60
|
+
Requires-Dist: imageio>=2.37.2; extra == "examples"
|
|
61
|
+
Requires-Dist: kaleido>=1.2.0; extra == "examples"
|
|
62
|
+
Requires-Dist: open3d>=0.19.0; extra == "examples"
|
|
63
|
+
Provides-Extra: dev
|
|
64
|
+
Requires-Dist: torch>=2.0.0; extra == "dev"
|
|
65
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
66
|
+
Requires-Dist: black>=24.0.0; extra == "dev"
|
|
67
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
68
|
+
Requires-Dist: bumpver>=2023.1129; extra == "dev"
|
|
69
|
+
Requires-Dist: pre-commit>=3.6.0; extra == "dev"
|
|
70
|
+
Provides-Extra: docs
|
|
71
|
+
Requires-Dist: mkdocs>=1.5.0; extra == "docs"
|
|
72
|
+
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
|
|
73
|
+
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
|
|
74
|
+
Dynamic: license-file
|
|
75
|
+
|
|
76
|
+
<div align="center">
|
|
77
|
+
<img src="https://raw.githubusercontent.com/BaumSebastian/DDACS/main/docs/images/icon/DDACS_small.png" width="150"/>
|
|
78
|
+
<h1>Deep Drawing and Cutting Simulations (DDACS) Dataset</h1>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
[](https://opensource.org/licenses/MIT)
|
|
82
|
+
[](https://www.python.org/downloads/)
|
|
83
|
+
[](https://darus.uni-stuttgart.de/dataset.xhtml?persistentId=doi:10.18419/DARUS-4801)
|
|
84
|
+
[](https://doi.org/10.18419/DARUS-4801)
|
|
85
|
+
[](https://www.matec-conferences.org/articles/matecconf/abs/2025/02/matecconf_iddrg2025_01090/matecconf_iddrg2025_01090.html)
|
|
86
|
+
|
|
87
|
+
A Python package for accessing and processing the [Deep Drawing and Cutting Simulations (DDACS) Dataset](https://darus.uni-stuttgart.de/dataset.xhtml?persistentId=doi:10.18419/DARUS-4801).
|
|
88
|
+
It includes a CLI for downloading datasets from DaRUS and a Python API for accessing simulation data with metadata.
|
|
89
|
+
|
|
90
|
+
<div align="center">
|
|
91
|
+
|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
*Simulation with the tool geometries and various additional information like sheet metal thinning, stress and strain. The gif has been interpolated for a more fluid display (the simulation contains 3 to 4 timesteps).*
|
|
95
|
+
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
## Table of Contents
|
|
99
|
+
|
|
100
|
+
- [Table of Contents](#table-of-contents)
|
|
101
|
+
- [Installation](#installation)
|
|
102
|
+
- [Core Installation](#core-installation)
|
|
103
|
+
- [PyTorch Installation](#pytorch-installation)
|
|
104
|
+
- [Examples Installation](#examples-installation)
|
|
105
|
+
- [Download Dataset](#download-dataset)
|
|
106
|
+
- [Versioning](#versioning)
|
|
107
|
+
- [Basic Usage](#basic-usage)
|
|
108
|
+
- [Core Usage](#core-usage)
|
|
109
|
+
- [PyTorch Usage](#pytorch-usage)
|
|
110
|
+
- [Citation](#citation)
|
|
111
|
+
- [Dataset Citation](#dataset-citation)
|
|
112
|
+
- [Paper Citation](#paper-citation)
|
|
113
|
+
- [Development Installation](#development-installation)
|
|
114
|
+
|
|
115
|
+
## Installation
|
|
116
|
+
|
|
117
|
+
**Note:** I recommend using [uv](https://docs.astral.sh/uv/) as a fast Python package installer and resolver. Simply replace `pip` with `uv pip` in the commands below.
|
|
118
|
+
|
|
119
|
+
### Core Installation
|
|
120
|
+
|
|
121
|
+
For basic dataset access without high weight module dependencies:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pip install git+https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### PyTorch Installation
|
|
128
|
+
|
|
129
|
+
For PyTorch integration without visualization dependencies:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pip install "git+https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git[torch]"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Examples Installation
|
|
136
|
+
|
|
137
|
+
For examples with PyTorch, Jupyter, and visualization capabilities:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pip install "git+https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git[examples]"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Download Dataset
|
|
144
|
+
|
|
145
|
+
Download the dataset using the `ddacs` CLI:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Download full dataset (requires ~1TB storage)
|
|
149
|
+
ddacs download
|
|
150
|
+
|
|
151
|
+
# Download small test set for quick demos (requires ~50GB storage)
|
|
152
|
+
ddacs download --small
|
|
153
|
+
|
|
154
|
+
# Show dataset info and available versions
|
|
155
|
+
ddacs info
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Important:** The full dataset is approximately 1TB in size. Ensure you have sufficient storage space. The download may take several hours depending on your internet connection.
|
|
159
|
+
|
|
160
|
+
**Options:**
|
|
161
|
+
| Flag | Description |
|
|
162
|
+
| ------ | ------------- |
|
|
163
|
+
| `--small` | Download small test set for demos |
|
|
164
|
+
| `--out ./path` | Custom output directory (default: `./data`) |
|
|
165
|
+
| `--no-extract` | Skip extraction of zip files |
|
|
166
|
+
| `--keep-zip` | Keep zip files after extraction |
|
|
167
|
+
| `-y, --yes` | Skip confirmation prompt |
|
|
168
|
+
|
|
169
|
+
### Versioning
|
|
170
|
+
|
|
171
|
+
The package version aligns with the dataset version on DaRUS. Running `ddacs download` will download dataset version 2.0 by default.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Check available versions
|
|
175
|
+
ddacs info
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Basic Usage
|
|
179
|
+
|
|
180
|
+
### Core Usage
|
|
181
|
+
|
|
182
|
+
For basic dataset iteration:
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
import h5py
|
|
186
|
+
import numpy as np
|
|
187
|
+
from ddacs import iter_ddacs, count_available_simulations
|
|
188
|
+
|
|
189
|
+
# Count available simulations
|
|
190
|
+
count = count_available_simulations("./data")
|
|
191
|
+
print(f"Available simulations: {count}")
|
|
192
|
+
|
|
193
|
+
# Iterate over first few samples
|
|
194
|
+
for i, (sim_id, metadata, h5_file_path) in enumerate(iter_ddacs("./data")):
|
|
195
|
+
print(f"Sample {i+1}: ID={sim_id}, Path={h5_file_path}")
|
|
196
|
+
|
|
197
|
+
# Access simulation data
|
|
198
|
+
with h5py.File(h5_file_path, "r") as f:
|
|
199
|
+
data = np.array(f["OP10"]["blank"]["node_displacement"])
|
|
200
|
+
print(f"Data shape: {data.shape}")
|
|
201
|
+
|
|
202
|
+
if i >= 2: # Show first 3 samples
|
|
203
|
+
break
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### PyTorch Usage
|
|
207
|
+
|
|
208
|
+
For PyTorch-compatible dataset with DataLoader support:
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
from ddacs.pytorch import DDACSDataset
|
|
212
|
+
from torch.utils.data import DataLoader
|
|
213
|
+
|
|
214
|
+
# Create dataset
|
|
215
|
+
dataset = DDACSDataset("./data")
|
|
216
|
+
dataloader = DataLoader(dataset, batch_size=4, shuffle=True)
|
|
217
|
+
|
|
218
|
+
# Use in training loop
|
|
219
|
+
for batch_idx, (sim_ids, metadata_batch, h5_paths) in enumerate(dataloader):
|
|
220
|
+
print(f"Batch {batch_idx}: {len(sim_ids)} samples")
|
|
221
|
+
# Your training code here
|
|
222
|
+
if batch_idx >= 2: # Show first 3 batches
|
|
223
|
+
break
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
See [`examples/dataset_demo.ipynb`](./examples/dataset_demo.ipynb) for a comprehensive tutorial including visualization and advanced usage patterns.
|
|
227
|
+
|
|
228
|
+
## Citation
|
|
229
|
+
|
|
230
|
+
If you use this dataset or code in your research, please cite both the dataset and the paper:
|
|
231
|
+
|
|
232
|
+
### Dataset Citation
|
|
233
|
+
|
|
234
|
+
```bibtex
|
|
235
|
+
@dataset{baum2025ddacs,
|
|
236
|
+
title={Deep Drawing and Cutting Simulations Dataset},
|
|
237
|
+
subtitle={FEM Simulations of a deep drawn and cut dual phase steel part},
|
|
238
|
+
author={Baum, Sebastian and Heinzelmann, Pascal},
|
|
239
|
+
year={2025},
|
|
240
|
+
version={1.0},
|
|
241
|
+
publisher={DaRUS},
|
|
242
|
+
doi={10.18419/DARUS-4801},
|
|
243
|
+
license={CC BY 4.0},
|
|
244
|
+
url={https://doi.org/10.18419/DARUS-4801}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Paper Citation
|
|
249
|
+
|
|
250
|
+
```bibtex
|
|
251
|
+
@article{heinzelmann2025benchmark,
|
|
252
|
+
title={A Comprehensive Benchmark Dataset for Sheet Metal Forming: Advancing Machine Learning and Surrogate Modelling in Process Simulations},
|
|
253
|
+
author={Heinzelmann, Pascal and Baum, Sebastian and Riedmüller, Kim Rouven and Liewald, Mathias and Weyrich, Michael},
|
|
254
|
+
journal={MATEC Web of Conferences},
|
|
255
|
+
volume={408},
|
|
256
|
+
year={2025},
|
|
257
|
+
pages={01090},
|
|
258
|
+
doi={10.1051/matecconf/202540801090},
|
|
259
|
+
url={https://www.matec-conferences.org/articles/matecconf/abs/2025/02/matecconf_iddrg2025_01090/matecconf_iddrg2025_01090.html}
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Development Installation
|
|
264
|
+
|
|
265
|
+
For developers who want to contribute to this project:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
git clone https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git DDACS
|
|
269
|
+
cd DDACS
|
|
270
|
+
|
|
271
|
+
# Install in editable mode with development dependencies
|
|
272
|
+
pip install -e ".[dev]"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
This installs the package with the `ddacs` CLI command and all development tools.
|
ddacs-2.0.0/README.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/BaumSebastian/DDACS/main/docs/images/icon/DDACS_small.png" width="150"/>
|
|
3
|
+
<h1>Deep Drawing and Cutting Simulations (DDACS) Dataset</h1>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
[](https://darus.uni-stuttgart.de/dataset.xhtml?persistentId=doi:10.18419/DARUS-4801)
|
|
9
|
+
[](https://doi.org/10.18419/DARUS-4801)
|
|
10
|
+
[](https://www.matec-conferences.org/articles/matecconf/abs/2025/02/matecconf_iddrg2025_01090/matecconf_iddrg2025_01090.html)
|
|
11
|
+
|
|
12
|
+
A Python package for accessing and processing the [Deep Drawing and Cutting Simulations (DDACS) Dataset](https://darus.uni-stuttgart.de/dataset.xhtml?persistentId=doi:10.18419/DARUS-4801).
|
|
13
|
+
It includes a CLI for downloading datasets from DaRUS and a Python API for accessing simulation data with metadata.
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
*Simulation with the tool geometries and various additional information like sheet metal thinning, stress and strain. The gif has been interpolated for a more fluid display (the simulation contains 3 to 4 timesteps).*
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
## Table of Contents
|
|
24
|
+
|
|
25
|
+
- [Table of Contents](#table-of-contents)
|
|
26
|
+
- [Installation](#installation)
|
|
27
|
+
- [Core Installation](#core-installation)
|
|
28
|
+
- [PyTorch Installation](#pytorch-installation)
|
|
29
|
+
- [Examples Installation](#examples-installation)
|
|
30
|
+
- [Download Dataset](#download-dataset)
|
|
31
|
+
- [Versioning](#versioning)
|
|
32
|
+
- [Basic Usage](#basic-usage)
|
|
33
|
+
- [Core Usage](#core-usage)
|
|
34
|
+
- [PyTorch Usage](#pytorch-usage)
|
|
35
|
+
- [Citation](#citation)
|
|
36
|
+
- [Dataset Citation](#dataset-citation)
|
|
37
|
+
- [Paper Citation](#paper-citation)
|
|
38
|
+
- [Development Installation](#development-installation)
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
**Note:** I recommend using [uv](https://docs.astral.sh/uv/) as a fast Python package installer and resolver. Simply replace `pip` with `uv pip` in the commands below.
|
|
43
|
+
|
|
44
|
+
### Core Installation
|
|
45
|
+
|
|
46
|
+
For basic dataset access without high weight module dependencies:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install git+https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### PyTorch Installation
|
|
53
|
+
|
|
54
|
+
For PyTorch integration without visualization dependencies:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install "git+https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git[torch]"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Examples Installation
|
|
61
|
+
|
|
62
|
+
For examples with PyTorch, Jupyter, and visualization capabilities:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install "git+https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git[examples]"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Download Dataset
|
|
69
|
+
|
|
70
|
+
Download the dataset using the `ddacs` CLI:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Download full dataset (requires ~1TB storage)
|
|
74
|
+
ddacs download
|
|
75
|
+
|
|
76
|
+
# Download small test set for quick demos (requires ~50GB storage)
|
|
77
|
+
ddacs download --small
|
|
78
|
+
|
|
79
|
+
# Show dataset info and available versions
|
|
80
|
+
ddacs info
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Important:** The full dataset is approximately 1TB in size. Ensure you have sufficient storage space. The download may take several hours depending on your internet connection.
|
|
84
|
+
|
|
85
|
+
**Options:**
|
|
86
|
+
| Flag | Description |
|
|
87
|
+
| ------ | ------------- |
|
|
88
|
+
| `--small` | Download small test set for demos |
|
|
89
|
+
| `--out ./path` | Custom output directory (default: `./data`) |
|
|
90
|
+
| `--no-extract` | Skip extraction of zip files |
|
|
91
|
+
| `--keep-zip` | Keep zip files after extraction |
|
|
92
|
+
| `-y, --yes` | Skip confirmation prompt |
|
|
93
|
+
|
|
94
|
+
### Versioning
|
|
95
|
+
|
|
96
|
+
The package version aligns with the dataset version on DaRUS. Running `ddacs download` will download dataset version 2.0 by default.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Check available versions
|
|
100
|
+
ddacs info
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Basic Usage
|
|
104
|
+
|
|
105
|
+
### Core Usage
|
|
106
|
+
|
|
107
|
+
For basic dataset iteration:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
import h5py
|
|
111
|
+
import numpy as np
|
|
112
|
+
from ddacs import iter_ddacs, count_available_simulations
|
|
113
|
+
|
|
114
|
+
# Count available simulations
|
|
115
|
+
count = count_available_simulations("./data")
|
|
116
|
+
print(f"Available simulations: {count}")
|
|
117
|
+
|
|
118
|
+
# Iterate over first few samples
|
|
119
|
+
for i, (sim_id, metadata, h5_file_path) in enumerate(iter_ddacs("./data")):
|
|
120
|
+
print(f"Sample {i+1}: ID={sim_id}, Path={h5_file_path}")
|
|
121
|
+
|
|
122
|
+
# Access simulation data
|
|
123
|
+
with h5py.File(h5_file_path, "r") as f:
|
|
124
|
+
data = np.array(f["OP10"]["blank"]["node_displacement"])
|
|
125
|
+
print(f"Data shape: {data.shape}")
|
|
126
|
+
|
|
127
|
+
if i >= 2: # Show first 3 samples
|
|
128
|
+
break
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### PyTorch Usage
|
|
132
|
+
|
|
133
|
+
For PyTorch-compatible dataset with DataLoader support:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from ddacs.pytorch import DDACSDataset
|
|
137
|
+
from torch.utils.data import DataLoader
|
|
138
|
+
|
|
139
|
+
# Create dataset
|
|
140
|
+
dataset = DDACSDataset("./data")
|
|
141
|
+
dataloader = DataLoader(dataset, batch_size=4, shuffle=True)
|
|
142
|
+
|
|
143
|
+
# Use in training loop
|
|
144
|
+
for batch_idx, (sim_ids, metadata_batch, h5_paths) in enumerate(dataloader):
|
|
145
|
+
print(f"Batch {batch_idx}: {len(sim_ids)} samples")
|
|
146
|
+
# Your training code here
|
|
147
|
+
if batch_idx >= 2: # Show first 3 batches
|
|
148
|
+
break
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
See [`examples/dataset_demo.ipynb`](./examples/dataset_demo.ipynb) for a comprehensive tutorial including visualization and advanced usage patterns.
|
|
152
|
+
|
|
153
|
+
## Citation
|
|
154
|
+
|
|
155
|
+
If you use this dataset or code in your research, please cite both the dataset and the paper:
|
|
156
|
+
|
|
157
|
+
### Dataset Citation
|
|
158
|
+
|
|
159
|
+
```bibtex
|
|
160
|
+
@dataset{baum2025ddacs,
|
|
161
|
+
title={Deep Drawing and Cutting Simulations Dataset},
|
|
162
|
+
subtitle={FEM Simulations of a deep drawn and cut dual phase steel part},
|
|
163
|
+
author={Baum, Sebastian and Heinzelmann, Pascal},
|
|
164
|
+
year={2025},
|
|
165
|
+
version={1.0},
|
|
166
|
+
publisher={DaRUS},
|
|
167
|
+
doi={10.18419/DARUS-4801},
|
|
168
|
+
license={CC BY 4.0},
|
|
169
|
+
url={https://doi.org/10.18419/DARUS-4801}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Paper Citation
|
|
174
|
+
|
|
175
|
+
```bibtex
|
|
176
|
+
@article{heinzelmann2025benchmark,
|
|
177
|
+
title={A Comprehensive Benchmark Dataset for Sheet Metal Forming: Advancing Machine Learning and Surrogate Modelling in Process Simulations},
|
|
178
|
+
author={Heinzelmann, Pascal and Baum, Sebastian and Riedmüller, Kim Rouven and Liewald, Mathias and Weyrich, Michael},
|
|
179
|
+
journal={MATEC Web of Conferences},
|
|
180
|
+
volume={408},
|
|
181
|
+
year={2025},
|
|
182
|
+
pages={01090},
|
|
183
|
+
doi={10.1051/matecconf/202540801090},
|
|
184
|
+
url={https://www.matec-conferences.org/articles/matecconf/abs/2025/02/matecconf_iddrg2025_01090/matecconf_iddrg2025_01090.html}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Development Installation
|
|
189
|
+
|
|
190
|
+
For developers who want to contribute to this project:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
git clone https://github.com/BaumSebastian/Deep-Drawing-and-Cutting-Simulations-Dataset.git DDACS
|
|
194
|
+
cd DDACS
|
|
195
|
+
|
|
196
|
+
# Install in editable mode with development dependencies
|
|
197
|
+
pip install -e ".[dev]"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
This installs the package with the `ddacs` CLI command and all development tools.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DDACS - Deep Drawing and Cutting Simulations Dataset.
|
|
3
|
+
|
|
4
|
+
A Python package for accessing and processing the DDACS dataset containing
|
|
5
|
+
FEM simulations of sheet metal forming processes.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
>>> from ddacs import iter_ddacs, count_available_simulations
|
|
9
|
+
>>> count = count_available_simulations('./data')
|
|
10
|
+
>>> for sim_id, metadata, h5_path in iter_ddacs('./data'):
|
|
11
|
+
... print(f"Simulation {sim_id}")
|
|
12
|
+
|
|
13
|
+
>>> from ddacs.utils import extract_mesh, extract_element_thickness
|
|
14
|
+
>>> vertices, triangles = extract_mesh('simulation.h5', 'blank')
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
__version__ = "2.0.0"
|
|
18
|
+
|
|
19
|
+
from .generators import (
|
|
20
|
+
count_available_simulations,
|
|
21
|
+
get_simulation_by_id,
|
|
22
|
+
iter_ddacs,
|
|
23
|
+
iter_h5_files,
|
|
24
|
+
sample_simulations,
|
|
25
|
+
)
|
|
26
|
+
from .utils import (
|
|
27
|
+
compute_von_mises,
|
|
28
|
+
display_structure,
|
|
29
|
+
extract_element_strain,
|
|
30
|
+
extract_element_stress,
|
|
31
|
+
extract_element_thickness,
|
|
32
|
+
extract_mesh,
|
|
33
|
+
extract_point_cloud,
|
|
34
|
+
extract_point_springback,
|
|
35
|
+
non_degenerate_mask,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Optional PyTorch dataset (only if PyTorch is available)
|
|
39
|
+
try:
|
|
40
|
+
from .pytorch import DDACSDataset
|
|
41
|
+
except ImportError:
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
__all__ = [
|
|
45
|
+
# Version
|
|
46
|
+
"__version__",
|
|
47
|
+
# Generators
|
|
48
|
+
"iter_ddacs",
|
|
49
|
+
"iter_h5_files",
|
|
50
|
+
"get_simulation_by_id",
|
|
51
|
+
"sample_simulations",
|
|
52
|
+
"count_available_simulations",
|
|
53
|
+
# Utils
|
|
54
|
+
"extract_point_cloud",
|
|
55
|
+
"extract_mesh",
|
|
56
|
+
"extract_element_thickness",
|
|
57
|
+
"extract_element_stress",
|
|
58
|
+
"extract_element_strain",
|
|
59
|
+
"extract_point_springback",
|
|
60
|
+
"compute_von_mises",
|
|
61
|
+
"non_degenerate_mask",
|
|
62
|
+
"display_structure",
|
|
63
|
+
# PyTorch (optional)
|
|
64
|
+
"DDACSDataset",
|
|
65
|
+
]
|