rvalerio commited on
Commit
c2ac2e7
1 Parent(s): c9732a6

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -56,7 +56,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
56
  # Video files - compressed
57
  *.mp4 filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
59
- 1/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
60
- 1/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
61
- 2/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
62
- 2/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
56
  # Video files - compressed
57
  *.mp4 filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
59
+ data/test/1/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
60
+ data/test/1/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
61
+ data/test/2/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
62
+ data/test/2/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
63
+ data/train/1/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
64
+ data/train/1/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
65
+ data/train/2/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
66
+ data/train/2/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
67
+ data/validation/1/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
68
+ data/validation/1/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
69
+ data/validation/2/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
70
+ data/validation/2/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
data/.gitattributes ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
56
+ # Video files - compressed
57
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
58
+ *.webm filter=lfs diff=lfs merge=lfs -text
59
+ 1/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
60
+ 1/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
61
+ 2/pressure_field_mesh.vtk filter=lfs diff=lfs merge=lfs -text
62
+ 2/streamlines_mesh.ply filter=lfs diff=lfs merge=lfs -text
data/test/1/coeff.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Moment": 0.4432577, "Drag": 0.9018756, "Lift": 0.4542572, "Front Lift": 0.6703862, "Rear Lift": -0.2161291}
data/test/1/input.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id": "kcnn2x2kinv6kvq9s2kbhs16i", "object_file": "image_1.obj", "wind_speed": 44, "rotate_angle": 304, "num_iterations": 300, "resolution": 5, "status_code": 202, "submission_time": "2024-06-20 15:53:41", "current_time": "2024-06-20 15:53:46"}
data/test/1/input_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/test/1/openfoam_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/test/1/pressure_field_mesh.vtk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09fe1381b742b35a271e0b8e0739b5ccbee2c65363fe1adea3623e28149054c
3
+ size 1952403
data/test/1/streamlines_mesh.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03daef8c462ca21682d3dacc92c504cc0fd9047a478f7e0a6c288b197661e047
3
+ size 9397769
data/test/2/coeff.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Moment": 0.4432577, "Drag": 0.9018756, "Lift": 0.4542572, "Front Lift": 0.6703862, "Rear Lift": -0.2161291}
data/test/2/input.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id": "kcnn2x2kinv6kvq9s2kbhs16i", "object_file": "image_1.obj", "wind_speed": 44, "rotate_angle": 304, "num_iterations": 300, "resolution": 5, "status_code": 202, "submission_time": "2024-06-20 15:53:41", "current_time": "2024-06-20 15:53:46"}
data/test/2/input_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/test/2/openfoam_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/test/2/pressure_field_mesh.vtk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09fe1381b742b35a271e0b8e0739b5ccbee2c65363fe1adea3623e28149054c
3
+ size 1952403
data/test/2/streamlines_mesh.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03daef8c462ca21682d3dacc92c504cc0fd9047a478f7e0a6c288b197661e047
3
+ size 9397769
data/train/1/coeff.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Moment": 0.4432577, "Drag": 0.9018756, "Lift": 0.4542572, "Front Lift": 0.6703862, "Rear Lift": -0.2161291}
data/train/1/input.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id": "kcnn2x2kinv6kvq9s2kbhs16i", "object_file": "image_1.obj", "wind_speed": 44, "rotate_angle": 304, "num_iterations": 300, "resolution": 5, "status_code": 202, "submission_time": "2024-06-20 15:53:41", "current_time": "2024-06-20 15:53:46"}
data/train/1/input_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/train/1/openfoam_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/train/1/pressure_field_mesh.vtk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09fe1381b742b35a271e0b8e0739b5ccbee2c65363fe1adea3623e28149054c
3
+ size 1952403
data/train/1/streamlines_mesh.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03daef8c462ca21682d3dacc92c504cc0fd9047a478f7e0a6c288b197661e047
3
+ size 9397769
data/train/2/coeff.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Moment": 0.4432577, "Drag": 0.9018756, "Lift": 0.4542572, "Front Lift": 0.6703862, "Rear Lift": -0.2161291}
data/train/2/input.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id": "kcnn2x2kinv6kvq9s2kbhs16i", "object_file": "image_1.obj", "wind_speed": 44, "rotate_angle": 304, "num_iterations": 300, "resolution": 5, "status_code": 202, "submission_time": "2024-06-20 15:53:41", "current_time": "2024-06-20 15:53:46"}
data/train/2/input_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/train/2/openfoam_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/train/2/pressure_field_mesh.vtk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09fe1381b742b35a271e0b8e0739b5ccbee2c65363fe1adea3623e28149054c
3
+ size 1952403
data/train/2/streamlines_mesh.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03daef8c462ca21682d3dacc92c504cc0fd9047a478f7e0a6c288b197661e047
3
+ size 9397769
data/validation/1/coeff.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Moment": 0.4432577, "Drag": 0.9018756, "Lift": 0.4542572, "Front Lift": 0.6703862, "Rear Lift": -0.2161291}
data/validation/1/input.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id": "kcnn2x2kinv6kvq9s2kbhs16i", "object_file": "image_1.obj", "wind_speed": 44, "rotate_angle": 304, "num_iterations": 300, "resolution": 5, "status_code": 202, "submission_time": "2024-06-20 15:53:41", "current_time": "2024-06-20 15:53:46"}
data/validation/1/input_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/validation/1/openfoam_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/validation/1/pressure_field_mesh.vtk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09fe1381b742b35a271e0b8e0739b5ccbee2c65363fe1adea3623e28149054c
3
+ size 1952403
data/validation/1/streamlines_mesh.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03daef8c462ca21682d3dacc92c504cc0fd9047a478f7e0a6c288b197661e047
3
+ size 9397769
data/validation/2/coeff.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Moment": 0.4432577, "Drag": 0.9018756, "Lift": 0.4542572, "Front Lift": 0.6703862, "Rear Lift": -0.2161291}
data/validation/2/input.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_id": "kcnn2x2kinv6kvq9s2kbhs16i", "object_file": "image_1.obj", "wind_speed": 44, "rotate_angle": 304, "num_iterations": 300, "resolution": 5, "status_code": 202, "submission_time": "2024-06-20 15:53:41", "current_time": "2024-06-20 15:53:46"}
data/validation/2/input_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/validation/2/openfoam_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
data/validation/2/pressure_field_mesh.vtk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09fe1381b742b35a271e0b8e0739b5ccbee2c65363fe1adea3623e28149054c
3
+ size 1952403
data/validation/2/streamlines_mesh.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03daef8c462ca21682d3dacc92c504cc0fd9047a478f7e0a6c288b197661e047
3
+ size 9397769
windtunnel.py CHANGED
@@ -21,73 +21,38 @@ class WindtunnelDataset(datasets.GeneratorBasedBuilder):
21
  ), # VTK file as binary
22
  "streamlines_mesh": datasets.Value("binary"), # PLY file as binary
23
  }
24
- )
 
25
  )
26
 
27
  def _split_generators(self, dl_manager):
28
  """Define the splits for the dataset."""
29
- with open("metadata.json", "r") as f:
30
- metadata = json.load(f)
31
-
32
- # Split the dataset into train, validation, and test
33
- train_ids, val_ids, test_ids = self._train_val_test_split(metadata)
34
-
35
  return [
36
  datasets.SplitGenerator(
37
- name=datasets.Split.TRAIN,
38
- gen_kwargs={"metadata": {id: metadata[id] for id in train_ids}},
39
  ),
40
  datasets.SplitGenerator(
41
  name=datasets.Split.VALIDATION,
42
- gen_kwargs={"metadata": {id: metadata[id] for id in val_ids}},
43
  ),
44
  datasets.SplitGenerator(
45
  name=datasets.Split.TEST,
46
- gen_kwargs={"metadata": {id: metadata[id] for id in test_ids}},
47
  ),
48
  ]
49
 
50
- def _generate_examples(self, metadata):
51
  """Generate examples for each split."""
52
- for sim_id, files in metadata.items():
53
- yield (
54
- sim_id,
55
- {
56
- "coeff": self._load_json(files["coeff"]),
57
- "input": self._load_json(files["input"]),
58
- "input_mesh": self._load_binary(
59
- os.path.join(self.config.data_dir, sim_id, "input_mesh.obj")
60
- ),
61
- "openfoam_mesh": self._load_binary(
62
- os.path.join(self.config.data_dir, sim_id, "openfoam_mesh.obj")
63
- ),
64
- "pressure_field_mesh": self._load_binary(
65
- os.path.join(
66
- self.config.data_dir, sim_id, "pressure_field_mesh.vtk"
67
- )
68
- ),
69
- "streamlines_mesh": self._load_binary(
70
- os.path.join(
71
- self.config.data_dir, sim_id, "streamlines_mesh.ply"
72
- )
73
- ),
74
- },
75
- )
76
-
77
- def _load_json(self, file_path):
78
- """Load a JSON file and return it as a dictionary."""
79
- with open(file_path, "r") as f:
80
- return json.load(f)
81
-
82
- def _load_binary(self, file_path):
83
- """Load a binary file and return its contents."""
84
- with open(file_path, "rb") as f:
85
- return f.read()
86
-
87
- def _train_val_test_split(self, metadata):
88
- """Implement logic for splitting metadata into train, validation, and test sets."""
89
- keys = list(metadata.keys())
90
- train_ids = keys[: int(0.7 * len(keys))]
91
- val_ids = keys[int(0.7 * len(keys)) : int(0.85 * len(keys))]
92
- test_ids = keys[int(0.85 * len(keys)) :]
93
- return train_ids, val_ids, test_ids
 
21
  ), # VTK file as binary
22
  "streamlines_mesh": datasets.Value("binary"), # PLY file as binary
23
  }
24
+ ),
25
+ homepage="https://inductiva.ai",
26
  )
27
 
28
  def _split_generators(self, dl_manager):
29
  """Define the splits for the dataset."""
30
+ train_dir = "train"
31
+ val_dir = "validation"
32
+ test_dir = "test"
 
 
 
33
  return [
34
  datasets.SplitGenerator(
35
+ name=datasets.Split.TRAIN, gen_kwargs={"path": train_dir}
 
36
  ),
37
  datasets.SplitGenerator(
38
  name=datasets.Split.VALIDATION,
39
+ gen_kwargs={"path": val_dir},
40
  ),
41
  datasets.SplitGenerator(
42
  name=datasets.Split.TEST,
43
+ gen_kwargs={"path": test_dir},
44
  ),
45
  ]
46
 
47
+ def _generate_examples(self, path):
48
  """Generate examples for each split."""
49
+ id = 0
50
+ for root, dirs, files in os.walk(path):
51
+ for file in files:
52
+ yield (
53
+ id,
54
+ {
55
+ "label": id,
56
+ },
57
+ )
58
+ id += 1