jmercat commited on
Commit
6f9cd0d
·
1 Parent(s): a98e362

Upload risk_biased_dataset.py

Browse files
Files changed (1) hide show
  1. risk_biased_dataset.py +63 -0
risk_biased_dataset.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+
3
+ _DESCRIPTION = """\
4
+ Dataset of pre-processed samples from a small portion of the \
5
+ Waymo Open Motion Data for our risk-biased prediction task.
6
+ """
7
+
8
+ _CITATION = """\
9
+ @InProceedings{NiMe:2022,
10
+ author = {Haruki Nishimura, Jean Mercat, Blake Wulfe, Rowan McAllister},
11
+ title = {RAP: Risk-Aware Prediction for Robust Planning},
12
+ booktitle = {Proceedings of the 2022 IEEE International Conference on Robot Learning (CoRL)},
13
+ month = {December},
14
+ year = {2022},
15
+ address = {Grafton Road, Auckland CBD, Auckland 1010},
16
+ url = {},
17
+ }
18
+ """
19
+
20
+
21
+ class RAPConfig(datasets.BuilderConfig):
22
+ """BuilderConfig for RiskBiasedDataset."""
23
+
24
+ def __init__(self, **kwargs):
25
+ """BuilderConfig for RiskBiasedDataset.
26
+ Args:
27
+ **kwargs: keyword arguments forwarded to super.
28
+ """
29
+ super(RAPConfig, self).__init__(version=datasets.Version("0.0.0", ""), **kwargs)
30
+
31
+
32
+
33
+ class RiskBiasedDataset(datasets.Dataset):
34
+ """Dataset of pre-processed samples from a portion of the
35
+ Waymo Open Motion Data for the risk-biased prediction task."""
36
+
37
+ BUILDER_CONFIGS = [
38
+ RAPConfig(
39
+ name="json_lists",
40
+ description="JSON lists sample format"
41
+ )
42
+ ]
43
+
44
+ def _info(self):
45
+ return datasets.DatasetInfo(
46
+ description= _DESCRIPTION,
47
+ features=datasets.Features(
48
+ {"x": datasets.Sequence(datasets.Value("float32")),
49
+ "mask_x": datasets.Sequence(datasets.Value("bool")),
50
+ "y": datasets.Sequence(datasets.Value("float32")),
51
+ "mask_y": datasets.Sequence(datasets.Value("bool")),
52
+ "mask_loss": datasets.Sequence(datasets.Value("bool")),
53
+ "map_data": datasets.Sequence(datasets.Value("float32")),
54
+ "mask_map": datasets.Sequence(datasets.Value("bool")),
55
+ "offset": datasets.Sequence(datasets.Value("float32")),
56
+ "x_ego": datasets.Sequence(datasets.Value("float32")),
57
+ "y_ego": datasets.Sequence(datasets.Value("float32")),
58
+ }
59
+ ),
60
+ supervised_keys=None,
61
+ homepage="https://sites.google.com/d/1cwohIm9fzTZEPAo7b_Di4h9iNgMiKHRo/p/1nPdTBSee6E40dmUXNyqxzUtb4_NnkI_6/edit",
62
+ citation=_CITATION,
63
+ )