Toronto3D
The Toronto-3D dataset.

Toronto-3D: A Large-scale Mobile LiDAR Dataset for Semantic Segmentation of Urban Roadways by Tan, Ma, Liu, Bobkov, Pukhalskaya, Eichenberger, Tatarchenko, Kosinka, et al.
The dataset contains four large-scale outdoor mobile LiDAR scans (L001.ply,
L002.ply, L003.ply, L004.ply) covering ~1 km of Toronto roadways. The
official benchmark uses L002.ply as the held-out test split.
Classes:
-
Toronto3D–The Toronto-3D dataset.
Functions:
-
load_toronto3d_data–Parse a Toronto-3D PLY scan and return per-key tensors.
Toronto3D
¶
Toronto3D(
root: PathLike,
*,
split: Toronto3DSplit = "test",
files: Optional[Sequence[str]] = None,
utm_offset: Sequence[float] = TORONTO3D_UTM_OFFSET,
transform: Optional[
Callable[[Dict[str, Any]], Dict[str, Any]]
] = None,
)
Bases: PointCloudDataset
The Toronto-3D dataset.
Each sample is a single CloudCompare-exported PLY scan from the four-tile mobile LiDAR sweep, returned as a dictionary:
| Key | Shape | Dtype | Meaning |
|---|---|---|---|
pos |
\((N, 3)\) | float32 | XYZ (UTM offset by utm_offset) |
color |
\((N, 3)\) | uint8 | RGB (0-255) |
intensity |
\((N, 1)\) | float32 | LiDAR intensity |
gps_time |
\((N, 1)\) | float32 | GPS timestamp |
segment |
\((N,)\) | int64 | Raw class id, 0-8 (0 = Unclassified, ignored) |
name |
str | Source file name without extension |
Parameters:
-
root(PathLike) –Dataset root. Files are read from
<root>/Toronto3D/raw/<file>.ply. -
split(Toronto3DSplit, default:'test') –One of
"train"/"val"/"test"/"trainval"/"all". Test labels are publicly available so val and test are the same file (L002.ply). -
files(Optional[Sequence[str]], default:None) –Optional explicit list of file names. Overrides
split. -
utm_offset(Sequence[float], default:TORONTO3D_UTM_OFFSET) –3-vector subtracted from raw UTM
(x, y, z)to keep coordinates in a small numerical range. Defaults toTORONTO3D_UTM_OFFSET; pass(0, 0, 0)to keep raw UTM coordinates. -
transform(Optional[Callable[[Dict[str, Any]], Dict[str, Any]]], default:None) –Callable applied to each loaded sample dict at
__getitem__time.
Note
The raw dataset must be downloaded manually from
WeikaiTan/Toronto-3D (a license
must be accepted). The expected layout is <root>/Toronto3D/raw/L00{1,2,3,4}.ply.
Methods:
-
download–Toronto-3D must be downloaded manually (a license must be accepted).
Attributes:
-
name(str) –Name of the dataset directory.
-
data_dir(str) –Path to the dataset directory
<root>/<name>. -
raw_dir(str) –Path to the raw download directory.
-
processed_dir(str) –Path to the processed cache directory.
download
¶
Toronto-3D must be downloaded manually (a license must be accepted).
Parameters:
-
force(bool, default:False) –Unused; present to mirror the other datasets'
downloadsignature.
Raises: RuntimeError: Always; automatic download is not supported.
load_toronto3d_data
¶
load_toronto3d_data(
path: PathLike,
/,
utm_offset: Sequence[float] = TORONTO3D_UTM_OFFSET,
) -> Dict[str, Tensor]
Parse a Toronto-3D PLY scan and return per-key tensors.
The PLY files are CloudCompare exports with these vertex properties (in order):
x,y,z(double),red,green,blue(uchar),scalar_Intensity,scalar_GPSTime,scalar_ScanAngleRank(float),scalar_Label(float).
Coordinates are returned in float32 after the UTM offset is subtracted; colors
are uint8 (0-255); intensity and gps_time stay float32; segment
is int64 (raw class id, 0..8).
| Key | Shape | Dtype |
|---|---|---|
pos |
\((N, 3)\) | float32 |
color |
\((N, 3)\) | uint8 |
intensity |
\((N, 1)\) | float32 |
gps_time |
\((N, 1)\) | float32 |
segment |
\((N,)\) | int64 |
Parameters:
-
path(PathLike) –Path to the
.plyfile. -
utm_offset(Sequence[float], default:TORONTO3D_UTM_OFFSET) –3-vector subtracted from
(x, y, z)to keep coordinates in a small numerical range. Defaults toTORONTO3D_UTM_OFFSET; pass(0, 0, 0)to keep raw UTM coordinates.