Skip to main content

训练点云分类模型 (3D Analyst 工具)

汇总

为点云分类训练深度学习模型。

了解有关训练点云分类模型的详细信息

用法

  • 该工具需要安装深度学习基础内容,该内容提供多个神经网络解决方案,包括用于分类点云的神经架构。

    要设置计算机以在 ArcGIS Pro 中使用深度学习框架,请参阅 安装 ArcGIS 的深度学习框架

  • 可以使用具有 CUDA 功能的 NVIDIA 显卡或 CPU 来训练点云分类模型。 使用 GPU 通常比使用 CPU 更快。 仅在没有可用 GPU 的情况下使用 CPU。 使用 CPU 进行训练时,首先使用 RandLA-Net 架构,因为它消耗的内存比 PointCNN 少。 您还可以使用尽可能小的训练样本进行试验,以估计在使用完整训练数据集进行训练之前处理数据所需的时间。

  • 当使用 GPU 在多显卡计算机上训练模型时,该工具将使用计算机上最快的显卡。 您还可以使用 GPU ID 环境设置指定 GPU。 如果计算机上有多个显卡,您可以将计算资源最多的显卡用于训练,将资源较少的显卡用于显示器,从而最大程度提高训练性能。 如果所选 GPU 也用于显示器,则其可用内存将降低,因为被操作系统和训练过程中使用显示器的应用程序所消耗。

  • 使用预训练模型是有利的,特别是在面临数据、时间或计算资源的限制时。 预训练模型减少了对大量训练的需求,并提供了一个可靠的起点,可以加速有用模型的创建。 为了利用预训练模型,新的训练数据必须与预训练模型兼容。 确保新训练数据与用于创建预训练模型的训练数据具有相同的属性和类代码。 如果训练数据中的类代码与预训练模型中的类并不多,则必须相应地重新映射训练数据的类。

  • 当该工具运行时,其进度消息会报告有关每个时期所实现的训练结果的以下统计数据:

    • Epoch—与结果相关联的轮数编号

    • Training Loss—针对训练数据求平均的熵损失函数的结果

    • Validation Loss—熵损失函数的结果,该结果通过将在轮数中训练的模型应用于验证数据来确定

    • Accuracy—验证数据中由该轮次训练的模型正确分类的点(正确)与验证数据中所有点的比率

    • Precision—所有类代码的精度的宏平均值

    • Recall—所有类代码的召回率的宏平均值

    • F1 Score—所有类代码的精度和召回率值的宏平均值的调和均值

    具有低训练损失和高验证损失的模型被认为过度拟合训练数据,它从训练数据的伪影中检测模式,从而确定导致模型无法良好运行以验证数据的模式。 具有高训练损失和高验证损失的模型被认为对训练数据拟合不足,它无法有效学习任何模式以生成可用模型。

    了解有关评估点云训练结果的详细信息

  • 创建一个文件夹来存储每轮结束时创建的检查点模型。 此文件夹的名称与模型名称相同,并带有后缀 .checkpoints,它存储在输出模型位置参数值中。 训练完成后,将在检查点文件夹中创建一个名称以输出模型名称参数值开头并以 _stats.csv 结尾的 CSV 表。 该表包括与每个类代码和历元获得的结果相关的以下字段:

    • Epoch—与该行中的结果相关联的轮数。 该值与在检查点模型目录中创建的模型对应。 通过将在轮数中训练的模型应用于验证数据来获得结果。

    • Class_Code—报告其结果的类代码。

    • Precision—正确分类的点(正确)占所有被分类点(正确和误报)的比率。

    • Recall—正确分类的点(正确)占所有使用该值进行分类的点(正确和误报)的比率。

    • F1_Score—精度和召回率值的调和均值。

  • 训练期间使用的专用内存是给定轮数中分配给深度学习框架的内存与迭代中每批数据大小的总和。 每批数据的大小取决于属性选择参数中指定的其他点属性的数量、任何给定块中的点总数,以及在批量大小参数中指定的每批的块数。 导出训练数据时,将确定每个块的最大点数,并且在估计训练操作的潜在内存占用量时应假定该值。

  • 属性选择参数的相对高度选项属性用于标识点距参考表面的高度,例如裸露地表高程模型。 使用此属性可以潜在地提高模型在训练过程中学习方向关系的能力。

参数

标注 说明 数据类型

输入训练数据

将用于训练分类模型的点云训练数据(*.pctd 文件)。

File

输出模型位置

将存储包含深度学习模型的新目录的现有文件夹。

Folder

输出模型名称

输出 Esri 模型定义文件的名称 (*.emd)、深度学习包 (*.dlpk) 以及将创建的用于存储它们的目录。

String

预训练模型

(可选)

将优化的预训练模型。 提供预训练的模型时,输入训练数据的属性、类代码和最大点数必须与生成此模型的训练数据所使用的相同。

File

属性选择内容

(可选)

指定将用于训练模型的点属性。 只有点云训练数据中存在的属性才可用。 默认情况下不包括其他属性。

  • IntensityThe measure of the magnitude of the lidar pulse return will be used.

  • Return NumberThe ordinal position of the point obtained from a given lidar pulse will be used.

  • Number of ReturnsThe total number of lidar returns that were identified as points from the pulse associated with a given point will be used.

  • Red BandThe red band's value from a point cloud with color information will be used.

  • Green BandThe green band's value from a point cloud with color information will be used.

  • Blue BandThe blue band's value from a point cloud with color information will be used.

  • Near Infrared BandThe near infrared band's value from a point cloud with near infrared information will be used.

  • Relative HeightThe relative height of each point in relation to a reference surface, which would typically be a bare earth DEM, will be used.

String

每块的最小点数

(可选)

如要在训练模型时使用,给定块中必须存在的最小点数。 默认值为 0。

Long

类重映射

(可选)

定义在训练深度学习模型之前,类代码值如何映射到新值。

值表列:

  • Current ClassThe class code value in the training data.

  • Remapped ClassThe class code that the existing code will be changed to.

Value Table

感兴趣内容的类代码

(可选)

将用于过滤训练数据中的块的类代码。 指定了感兴趣区域的类代码后,所有其他类代码都将重新映射为背景类代码。

Long

背景类代码

(可选)

指定了感兴趣内容的类代码后,将用于所有其他类代码的类代码值。

Long

类描述

(可选)

有关训练数据中每个类代码代表内容的描述。

值表列:

  • Current CodeThe class code value that was learned by the model.

  • Class DescriptionThe object described by the class code.

Value Table

模型选择条件

(可选)

指定将用于确定最终模型的统计基础。

  • Validation LossThe model that achieves the lowest result when the entropy loss function is applied to the validation data will be used.

  • RecallThe model that achieves the best macro average of the recall for all class codes will be used. Each class code's recall value is determined by the ratio of correctly classified points (true positives) over all the points that should have been classified with this value (expected positives). This is the default.

  • F1 ScoreThe model that achieves the best harmonic mean between the macro average of the precision and recall values for all class codes will be used. This provides a balance between precision and recall, which favors better overall performance.

  • PrecisionThe model that achieves the best macro average of the precision for all class codes will be used. Each class code's precision is determined by the ratio of points that are correctly classified (true positives) over all the points that are classified (true positives and false positives).

  • AccuracyThe model that achieves the highest ratio of corrected classified points over all the points in the validation data will be used.

String

最大轮次数

(可选)

每个数据块将通过神经网络向前和向后传递的次数。 默认值为 25。

Long

每个轮次的迭代 (%)

(可选)

将在每个训练轮次中处理的数据的百分比。 默认值为 100。

Double

学习率

(可选)

用新信息覆盖现有信息的比率。 如果未提供任何值,则系统将在训练过程中从学习曲线中提取最佳学习率。 这是默认设置。

Double

批量大小

(可选)

在任何给定时间将被处理的训练数据块的数量。 默认值为 2。

Long

当模型不再改进时停止训练

(可选)

指定当模型选择条件参数中指定的指标在五个连续轮次后未记录任何改进时,模型训练是否将停止。

  • 选中The model training will stop when the model is no longer improving. This is the default.

  • 未选中The model training will continue until the maximum number of epochs has been reached.

Boolean

学习率策略

(可选)

指定在训练期间如何修改学习率。

  • One Cycle Learning RateThe learning rate will be cycled throughout each epoch using Fast.AI's implementation of the 1cycle technique for training neural networks to help improve the training of a convolutional neural network. This is the default.

  • Fixed Learning RateThe same learning rate will be used throughout the training process.

String

模型架构

(可选)

指定将用于训练模型的神经网络架构。 指定预训练模型时,将自动设置用于创建预训练模型的架构。

  • PointCNNThe PointCNN architecture will be used.

  • RandLA-NetThe RandLA-Net architecture will be used. RandLA-Net is built on the principles of simple random sampling and local feature aggregation.

  • Semantic Query NetworkThe Semantic Query Network (SQN) architecture will be used. SQN does not require a comprehensive classification of the training data as the other neural network architectures do.

  • Point Transformer V3The Point Transformer V3 architecture will be used. This is the default.

String

损失函数

(可选)

指定将在训练期间使用的损失函数。

  • Cross Entropy LossCross entropy loss will be used. This function is best suited for training data in which each class has a similar number of points to the other classes. This is the default.

  • Focal LossFocal loss will be used. This function is best suited for training data in which the classes that are being trained may have point counts with great variation.

String

派生输出

标注 说明 数据类型

输出模型

此工具生成的结果模型。

File

输出模型统计数据

.csv 文件包含每个类代码和轮数的精度、召回率和 F1 得分。

Text File

输出轮次统计数据

.csv 文件包含在每个轮次获得的训练损失、验证损失、准确度、精度、召回率和 F1 得分。

Text File

环境

处理器类型, GPU ID

许可信息

  • 基本: 需要 3D Analyst
  • 标准: 需要 3D Analyst
  • 高级: 需要 3D Analyst