mindspore/docs/api/api_python/dataset/mindspore.dataset.Argoverse...

51 lines
3.1 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.ArgoverseDataset
==================================
.. py:class:: mindspore.dataset.ArgoverseDataset(data_dir, column_names="graph", shuffle=None, num_parallel_workers=1, python_multiprocessing=True, perf_mode=True)
加载argoverse数据集并进行图Graph初始化。
Argoverse数据集是自动驾驶领域的公共数据集当前实现的 `ArgoverseDataset` 主要用于加载argoverse数据集中运动预测Motion Forecasting场景的数据集具体信息可访问官网了解
https://www.argoverse.org/av1.html#download-link
参数:
- **data_dir** (str) - 加载数据集的目录,这里包含原始格式的数据,并将在 `process` 方法中被加载。
- **column_names** (Union[str, list[str]],可选) - dataset包含的单个列名或多个列名组成的列表默认值'Graph'。当实现类似 `__getitem__` 等方法时,列名的数量应该等于该方法中返回数据的条数,如下述示例,建议初始化时明确它的取值如:`column_names=["edge_index", "x", "y", "cluster", "valid_len", "time_step_len"]`
- **num_parallel_workers** (int可选) - 指定读取数据的工作进程数/线程数(由参数 `python_multiprocessing` 决定当前为多进程模式或多线程模式默认值1。
- **shuffle** (bool可选) - 是否混洗数据集。当实现的Dataset带有可随机访问属性 `__getitem__` 才可以指定该参数。默认值None。
- **python_multiprocessing** (bool可选) - 启用Python多进程模式加速运算默认值True。当传入 `source` 的Python对象的计算量很大时开启此选项可能会有较好效果。
- **perf_mode** (bool可选) - 遍历创建的dataset对象时获得更高性能的模式在此过程中将调用 `__getitem__` 方法。默认值True将Graph的所有数据如边的索引、节点特征和图的特征都作为图特征进行存储。
.. include:: mindspore.dataset.Dataset.add_sampler.rst
.. include:: mindspore.dataset.Dataset.rst
.. include:: mindspore.dataset.Dataset.b.rst
.. include:: mindspore.dataset.Dataset.c.rst
.. include:: mindspore.dataset.Dataset.d.rst
.. py:method:: load()
从给定处理好的路径加载数据也可以在自己实现的Dataset类中实现这个方法。
.. include:: mindspore.dataset.Dataset.e.rst
.. py:method:: process()
针对argoverse数据集的处理方法基于加载上来的原始数据集创建很多子图。
数据预处理方法主要参考https://github.com/xk-huang/yet-another-vectornet/blob/master/dataset.py。
.. include:: mindspore.dataset.Dataset.f.rst
.. py:method:: save()
将经过 `process` 函数处理后的数据以 numpy.npz 格式保存到磁盘中也可以在自己实现的Dataset类中自己实现这个方法。
.. include:: mindspore.dataset.Dataset.g.rst
.. include:: mindspore.dataset.Dataset.use_sampler.rst
.. include:: mindspore.dataset.Dataset.zip.rst