-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .field import FieldDataset, write_ffcv, load_ffcv | ||
from .geometry import SphericalGeometryDataset, MeshGeometryDataset | ||
from .geometry import write_ffcv | ||
from .motion import KinematicsFieldDataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
train: | ||
n_scenes: 10000 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import yaml | ||
import argparse | ||
import torch | ||
|
||
from cusanus.datasets import write_ffcv, KinematicsFieldDataset | ||
|
||
name = 'motion_field' | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser( | ||
description = 'Generates occupancy field dataset via ffcv', | ||
formatter_class = argparse.ArgumentDefaultsHelpFormatter | ||
) | ||
parser.add_argument('--num_workers', type = int, | ||
help = 'Number of write workers', | ||
default = -1) | ||
args = parser.parse_args() | ||
|
||
|
||
with open(f"/project/scripts/configs/{name}_dataset.yaml", 'r') as file: | ||
config = yaml.safe_load(file) | ||
|
||
d = KinematicsFieldDataset(**config['train']) | ||
dpath = f"/spaths/datasets/{name}_train_dataset.beton" | ||
d.write_ffcv(dpath, num_workers = args.num_workers) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.