最新资讯

  • 【深度学习项目】语义分割-DeepLab网络(DeepLabV3介绍、基于Pytorch实现DeepLabV3网络)

【深度学习项目】语义分割-DeepLab网络(DeepLabV3介绍、基于Pytorch实现DeepLabV3网络)

2025-04-27 12:37:32 14 阅读

文章目录

  • 介绍
    • 深度学习语义分割的关键特点
    • 主要架构和技术
    • 数据集和评价指标
    • 总结
  • DeepLab
    • DeepLab 的核心技术
    • DeepLab 的发展历史
    • DeepLab V3
      • 网络结构
      • 获取多尺度信息架构
      • Cascade Model
      • ASPP Model
      • Multi-Grid
      • Pytorch官方实现的DeepLab V3
      • 该项目主要是来自pytorch官方torchvision模块中的源码
      • 环境配置
      • 文件结构
      • 预训练权重下载地址
      • 数据集,本项目使用的是PASCAL VOC2012数据集
      • 训练方法
      • 注意事项
      • 实现代码
        • src文件目录
        • train_utils文件目录
        • 根目录

个人主页:道友老李
欢迎加入社区:道友老李的学习社区

介绍

深度学习语义分割(Semantic Segmentation)是一种计算机视觉任务,它旨在将图像中的每个像素分类为预定义类别之一。与物体检测不同,后者通常只识别和定位图像中的目标对象边界框,语义分割要求对图像的每一个像素进行分类,以实现更精细的理解。这项技术在自动驾驶、医学影像分析、机器人视觉等领域有着广泛的应用。

深度学习语义分割的关键特点

  • 像素级分类:对于输入图像的每一个像素点,模型都需要预测其属于哪个类别。
  • 全局上下文理解:为了正确地分割复杂场景,模型需要考虑整个图像的内容及其上下文信息。
  • 多尺度处理:由于目标可能出现在不同的尺度上,有效的语义分割方法通常会处理多种分辨率下的特征。

主要架构和技术

  1. 全卷积网络 (FCN)

    • FCN是最早的端到端训练的语义分割模型之一,它移除了传统CNN中的全连接层,并用卷积层替代,从而能够接受任意大小的输入并输出相同空间维度的概率图。
  2. 跳跃连接 (Skip Connections)

    • 为了更好地保留原始图像的空间细节,一些模型引入了跳跃连接,即从编码器部分直接传递特征到解码器部分,这有助于恢复细粒度的结构信息。
  3. U-Net

    • U-Net是一个专为生物医学图像分割设计的网络架构,它使用了对称的收缩路径(下采样)和扩展路径(上采样),以及丰富的跳跃连接来捕捉局部和全局信息。
  4. DeepLab系列

    • DeepLab采用了空洞/膨胀卷积(Atrous Convolution)来增加感受野而不减少特征图分辨率,并通过多尺度推理和ASPP模块(Atrous Spatial Pyramid Pooling)增强了对不同尺度物体的捕捉能力。
  5. PSPNet (Pyramid Scene Parsing Network)

    • PSPNet利用金字塔池化机制收集不同尺度的上下文信息,然后将其融合用于最终的预测。
  6. RefineNet

    • RefineNet强调了高分辨率特征的重要性,并通过一系列细化单元逐步恢复细节,确保输出高质量的分割结果。
  7. HRNet (High-Resolution Network)

    • HRNet在整个网络中保持了高分辨率的表示,同时通过多尺度融合策略有效地整合了低分辨率但富含语义的信息。

数据集和评价指标

常用的语义分割数据集包括PASCAL VOC、COCO、Cityscapes等。这些数据集提供了标注好的图像,用于训练和评估模型性能。

评价语义分割模型的标准通常包括:

  • 像素准确率 (Pixel Accuracy):所有正确分类的像素占总像素的比例。
  • 平均交并比 (Mean Intersection over Union, mIoU):这是最常用的评价指标之一,计算每个类别的IoU(交集除以并集),然后取平均值。
  • 频率加权交并比 (Frequency Weighted IoU):考虑每个类别的出现频率,对mIoU进行加权。

总结

随着硬件性能的提升和算法的进步,深度学习语义分割已经取得了显著的进展。现代模型不仅能在速度上满足实时应用的需求,还能提供非常精确的分割结果。未来的研究可能会集中在提高模型效率、增强跨域泛化能力以及探索无监督或弱监督的学习方法等方面。

DeepLab

DeepLab 是一种专门为语义分割任务设计的深度学习模型,由 Google 团队提出。它在处理具有复杂结构和多尺度对象的图像时表现出色,能够精确地捕捉边界信息,并且有效地解决了传统卷积神经网络(CNN)中由于下采样操作导致的空间分辨率损失的问题。

DeepLab 的核心技术

  1. 空洞卷积(Atrous Convolution / Dilated Convolution)

    • 空洞卷积是在标准卷积的基础上增加了一个参数——膨胀率(dilation rate)。通过调整膨胀率,可以在不改变特征图尺寸的情况下扩大感受野,从而捕获更广泛的空间上下文信息。
    • 这使得 DeepLab 能够在保持较高空间分辨率的同时,利用较大的感受野来获取丰富的上下文信息,这对语义分割非常有用。
  2. 多尺度推理(Multi-scale Context Aggregation)

    • DeepLab 采用多种方法来聚合不同尺度的信息。例如,在早期版本中使用了多尺度输入图像进行推理;而在后来的版本中,则引入了空洞空间金字塔池化(ASPP, Atrous Spatial Pyramid Pooling),即在同一层应用多个不同膨胀率的空洞卷积核,以覆盖不同的尺度。
    • ASPP 可以看作是一种特殊的池化层,它通过组合来自不同尺度的感受野输出,增强了对多尺度物体的理解能力。
  3. 跳跃连接与解码器模块(Skip Connections and Decoder Module)

    • 在某些 DeepLab 版本中,如 DeepLab v3+,加入了类似 U-Net 的跳跃连接机制,将低层次的细节信息传递给高层次的特征表示,帮助恢复精细的物体边界。
    • 解码器模块则用于进一步提升分割结果的质量,特别是对于小目标或细长结构的检测更加有效。
  4. 批量归一化(Batch Normalization)

    • 批量归一化有助于加速训练过程并提高模型泛化性能。DeepLab 模型通常会在每个卷积层之后添加 BN 层,以稳定和优化学习过程。
  5. 预训练权重迁移学习

    • DeepLab 常常基于已有的大规模数据集(如 ImageNet)上预训练好的 CNN 模型(如 ResNet、Xception)作为骨干网络,然后针对特定的语义分割任务进行微调。这种迁移学习策略不仅提高了模型的初始表现,还减少了训练时间和计算资源需求。

DeepLab 的发展历史

  • DeepLab v1:首次引入了空洞卷积的概念,用以解决卷积过程中因池化和下采样带来的分辨率降低问题。
  • DeepLab v2:增加了 ASPP 结构,更好地处理了多尺度物体,并引入了条件随机场(CRF)后处理步骤来改善分割边缘质量。
  • DeepLab v3:改进了 ASPP 设计,移除了 CRF 后处理,转而依赖更强大的网络架构来实现更好的分割效果。
  • DeepLab v3+:引入了解码器模块,结合了编码器-解码器框架的优点,进一步提升了分割精度,特别是在细粒度结构上的表现。

总之,DeepLab 系列模型通过不断创新和技术改进,成为了语义分割领域的重要研究方向之一,并为后续的工作提供了宝贵的参考和启发。

DeepLab V3

引入了Multi-Grid,改进了 ASPP 设计,移除了 CRF 后处理,转而依赖更强大的网络架构来实现更好的分割效果

网络结构

获取多尺度信息架构

Cascade Model

ASPP Model

Multi-Grid

Pytorch官方实现的DeepLab V3

该项目主要是来自pytorch官方torchvision模块中的源码

  • https://github.com/pytorch/vision/tree/main/torchvision/models/segmentation

环境配置

  • Python3.6/3.7/3.8
  • Pytorch1.10
  • Ubuntu或Centos(Windows暂不支持多GPU训练)
  • 最好使用GPU训练
  • 详细环境配置见requirements.txt

文件结构

  ├── src: 模型的backbone以及DeepLabv3的搭建
  ├── train_utils: 训练、验证以及多GPU训练相关模块
  ├── my_dataset.py: 自定义dataset用于读取VOC数据集
  ├── train.py: 以deeplabv3_resnet50为例进行训练
  ├── train_multi_GPU.py: 针对使用多GPU的用户使用
  ├── predict.py: 简易的预测脚本,使用训练好的权重进行预测测试
  ├── validation.py: 利用训练好的权重验证/测试数据的mIoU等指标,并生成record_mAP.txt文件
  └── pascal_voc_classes.json: pascal_voc标签文件

预训练权重下载地址

  • 注意:官方提供的预训练权重是在COCO上预训练得到的,训练时只针对和PASCAL VOC相同的类别进行了训练,所以类别数是21(包括背景)
  • deeplabv3_resnet50: https://download.pytorch.org/models/deeplabv3_resnet50_coco-cd0a2569.pth
  • deeplabv3_resnet101: https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth
  • deeplabv3_mobilenetv3_large_coco: https://download.pytorch.org/models/deeplabv3_mobilenet_v3_large-fc3c493d.pth
  • 注意,下载的预训练权重记得要重命名,比如在train.py中读取的是deeplabv3_resnet50_coco.pth文件,
    不是deeplabv3_resnet50_coco-cd0a2569.pth

数据集,本项目使用的是PASCAL VOC2012数据集

  • Pascal VOC2012 train/val数据集下载地址:http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar

    如果想了解PASCAL VOC 数据集请参考目标检测课程.

训练方法

  • 确保提前准备好数据集
  • 确保提前下载好对应预训练模型权重
  • 若要使用单GPU或者CPU训练,直接使用train.py训练脚本
  • 若要使用多GPU训练,使用torchrun --nproc_per_node=8 train_multi_GPU.py指令,nproc_per_node参数为使用GPU数量
  • 如果想指定使用哪些GPU设备可在指令前加上CUDA_VISIBLE_DEVICES=0,3(例如我只要使用设备中的第1块和第4块GPU设备)
  • CUDA_VISIBLE_DEVICES=0,3 torchrun --nproc_per_node=2 train_multi_GPU.py

注意事项

  • 在使用训练脚本时,注意要将’–data-path’(VOC_root)设置为自己存放’VOCdevkit’文件夹所在的根目录
  • 在使用预测脚本时,要将’weights_path’设置为你自己生成的权重路径。
  • 使用validation文件时,注意确保你的验证集或者测试集中必须包含每个类别的目标,并且使用时只需要修改’–num-classes’、‘–aux’、‘–data-path’和’–weights’即可,其他代码尽量不要改动

实现代码

src文件目录
  • deeplabv3_model.py
from collections import OrderedDict

from typing import Dict, List

import torch
from torch import nn, Tensor
from torch.nn import functional as F
from .resnet_backbone import resnet50, resnet101
from .mobilenet_backbone import mobilenet_v3_large


class IntermediateLayerGetter(nn.ModuleDict):
    """
    Module wrapper that returns intermediate layers from a model

    It has a strong assumption that the modules have been registered
    into the model in the same order as they are used.
    This means that one should **not** reuse the same nn.Module
    twice in the forward if you want this to work.

    Additionally, it is only able to query submodules that are directly
    assigned to the model. So if `model` is passed, `model.feature1` can
    be returned, but not `model.feature1.layer2`.

    Args:
        model (nn.Module): model on which we will extract the features
        return_layers (Dict[name, new_name]): a dict containing the names
            of the modules for which the activations will be returned as
            the key of the dict, and the value of the dict is the name
            of the returned activation (which the user can specify).
    """
    _version = 2
    __annotations__ = {
        "return_layers": Dict[str, str],
    }

    def __init__(self, model: nn.Module, return_layers: Dict[str, str]) -> None:
        if not set(return_layers).issubset([name for name, _ in model.named_children()]):
            raise ValueError("return_layers are not present in model")
        orig_return_layers = return_layers
        return_layers = {str(k): str(v) for k, v in return_layers.items()}

        # 重新构建backbone,将没有使用到的模块全部删掉
        layers = OrderedDict()
        for name, module in model.named_children():
            layers[name] = module
            if name in return_layers:
                del return_layers[name]
            if not return_layers:
                break

        super(IntermediateLayerGetter, self).__init__(layers)
        self.return_layers = orig_return_layers

    def forward(self, x: Tensor) -> Dict[str, Tensor]:
        out = OrderedDict()
        for name, module in self.items():
            x = module(x)
            if name in self.return_layers:
                out_name = self.return_layers[name]
                out[out_name] = x
        return out


class DeepLabV3(nn.Module):
    """
    Implements DeepLabV3 model from
    `"Rethinking Atrous Convolution for Semantic Image Segmentation"
    `_.

    Args:
        backbone (nn.Module): the network used to compute the features for the model.
            The backbone should return an OrderedDict[Tensor], with the key being
            "out" for the last feature map used, and "aux" if an auxiliary classifier
            is used.
        classifier (nn.Module): module that takes the "out" element returned from
            the backbone and returns a dense prediction.
        aux_classifier (nn.Module, optional): auxiliary classifier used during training
    """
    __constants__ = ['aux_classifier']

    def __init__(self, backbone, classifier, aux_classifier=None):
        super(DeepLabV3, self).__init__()
        self.backbone = backbone
        self.classifier = classifier
        self.aux_classifier = aux_classifier

    def forward(self, x: Tensor) -> Dict[str, Tensor]:
        input_shape = x.shape[-2:]
        # contract: features is a dict of tensors
        features = self.backbone(x)

        result = OrderedDict()
        x = features["out"]
        x = self.classifier(x)
        # 使用双线性插值还原回原图尺度
        x = F.interpolate(x, size=input_shape, mode='bilinear', align_corners=False)
        result["out"] = x

        if self.aux_classifier is not None:
            x = features["aux"]
            x = self.aux_classifier(x)
            # 使用双线性插值还原回原图尺度
            x = F.interpolate(x, size=input_shape, mode='bilinear', align_corners=False)
            result["aux"] = x

        return result


class FCNHead(nn.Sequential):
    def __init__(self, in_channels, channels):
        inter_channels = in_channels // 4
        super(FCNHead, self).__init__(
            nn.Conv2d(in_channels, inter_channels, 3, padding=1, bias=False),
            nn.BatchNorm2d(inter_channels),
            nn.ReLU(),
            nn.Dropout(0.1),
            nn.Conv2d(inter_channels, channels, 1)
        )


class ASPPConv(nn.Sequential):
    def __init__(self, in_channels: int, out_channels: int, dilation: int) -> None:
        super(ASPPConv, self).__init__(
            nn.Conv2d(in_channels, out_channels, 3, padding=dilation, dilation=dilation, bias=False),
            nn.BatchNorm2d(out_channels),
            nn.ReLU()
        )


class ASPPPooling(nn.Sequential):
    def __init__(self, in_channels: int, out_channels: int) -> None:
        super(ASPPPooling, self).__init__(
            nn.AdaptiveAvgPool2d(1),
            nn.Conv2d(in_channels, out_channels, 1, bias=False),
            nn.BatchNorm2d(out_channels),
            nn.ReLU()
        )

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        size = x.shape[-2:]
        for mod in self:
            x = mod(x)
        return F.interpolate(x, size=size, mode='bilinear', align_corners=False)


class ASPP(nn.Module):
    def __init__(self, in_channels: int, atrous_rates: List[int], out_channels: int = 256) -> None:
        super(ASPP, self).__init__()
        modules = [
            nn.Sequential(nn.Conv2d(in_channels, out_channels, 1, bias=False),
                          nn.BatchNorm2d(out_channels),
                          nn.ReLU())
        ]

        rates = tuple(atrous_rates)
        for rate in rates:
            modules.append(ASPPConv(in_channels, out_channels, rate))

        modules.append(ASPPPooling(in_channels, out_channels))

        self.convs = nn.ModuleList(modules)

        self.project = nn.Sequential(
            nn.Conv2d(len(self.convs) * out_channels, out_channels, 1, bias=False),
            nn.BatchNorm2d(out_channels),
            nn.ReLU(),
            nn.Dropout(0.5)
        )

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        _res = []
        for conv in self.convs:
            _res.append(conv(x))
        res = torch.cat(_res, dim=1)
        return self.project(res)


class DeepLabHead(nn.Sequential):
    def __init__(self, in_channels: int, num_classes: int) -> None:
        super(DeepLabHead, self).__init__(
            ASPP(in_channels, [12, 24, 36]),
            nn.Conv2d(256, 256, 3, padding=1, bias=False),
            nn.BatchNorm2d(256),
            nn.ReLU(),
            nn.Conv2d(256, num_classes, 1)
        )


def deeplabv3_resnet50(aux, num_classes=21, pretrain_backbone=False):
    # 'resnet50_imagenet': 'https://download.pytorch.org/models/resnet50-0676ba61.pth'
    # 'deeplabv3_resnet50_coco': 'https://download.pytorch.org/models/deeplabv3_resnet50_coco-cd0a2569.pth'
    backbone = resnet50(replace_stride_with_dilation=[False, True, True])

    if pretrain_backbone:
        # 载入resnet50 backbone预训练权重
        backbone.load_state_dict(torch.load("resnet50.pth", map_location='cpu'))

    out_inplanes = 2048
    aux_inplanes = 1024

    return_layers = {'layer4': 'out'}
    if aux:
        return_layers['layer3'] = 'aux'
    backbone = IntermediateLayerGetter(backbone, return_layers=return_layers)

    aux_classifier = None
    # why using aux: https://github.com/pytorch/vision/issues/4292
    if aux:
        aux_classifier = FCNHead(aux_inplanes, num_classes)

    classifier = DeepLabHead(out_inplanes, num_classes)

    model = DeepLabV3(backbone, classifier, aux_classifier)

    return model


def deeplabv3_resnet101(aux, num_classes=21, pretrain_backbone=False):
    # 'resnet101_imagenet': 'https://download.pytorch.org/models/resnet101-63fe2227.pth'
    # 'deeplabv3_resnet101_coco': 'https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth'
    backbone = resnet101(replace_stride_with_dilation=[False, True, True])

    if pretrain_backbone:
        # 载入resnet101 backbone预训练权重
        backbone.load_state_dict(torch.load("resnet101.pth", map_location='cpu'))

    out_inplanes = 2048
    aux_inplanes = 1024

    return_layers = {'layer4': 'out'}
    if aux:
        return_layers['layer3'] = 'aux'
    backbone = IntermediateLayerGetter(backbone, return_layers=return_layers)

    aux_classifier = None
    # why using aux: https://github.com/pytorch/vision/issues/4292
    if aux:
        aux_classifier = FCNHead(aux_inplanes, num_classes)

    classifier = DeepLabHead(out_inplanes, num_classes)

    model = DeepLabV3(backbone, classifier, aux_classifier)

    return model


def deeplabv3_mobilenetv3_large(aux, num_classes=21, pretrain_backbone=False):
    # 'mobilenetv3_large_imagenet': 'https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth'
    # 'depv3_mobilenetv3_large_coco': "https://download.pytorch.org/models/deeplabv3_mobilenet_v3_large-fc3c493d.pth"
    backbone = mobilenet_v3_large(dilated=True)

    if pretrain_backbone:
        # 载入mobilenetv3 large backbone预训练权重
        backbone.load_state_dict(torch.load("mobilenet_v3_large.pth", map_location='cpu'))

    backbone = backbone.features

    # Gather the indices of blocks which are strided. These are the locations of C1, ..., Cn-1 blocks.
    # The first and last blocks are always included because they are the C0 (conv1) and Cn.
    stage_indices = [0] + [i for i, b in enumerate(backbone) if getattr(b, "is_strided", False)] + [len(backbone) - 1]
    out_pos = stage_indices[-1]  # use C5 which has output_stride = 16
    out_inplanes = backbone[out_pos].out_channels
    aux_pos = stage_indices[-4]  # use C2 here which has output_stride = 8
    aux_inplanes = backbone[aux_pos].out_channels
    return_layers = {str(out_pos): "out"}
    if aux:
        return_layers[str(aux_pos)] = "aux"

    backbone = IntermediateLayerGetter(backbone, return_layers=return_layers)

    aux_classifier = None
    # why using aux: https://github.com/pytorch/vision/issues/4292
    if aux:
        aux_classifier = FCNHead(aux_inplanes, num_classes)

    classifier = DeepLabHead(out_inplanes, num_classes)

    model = DeepLabV3(backbone, classifier, aux_classifier)

    return model

  • mobilenet_backbone.py
from typing import Callable, List, Optional

import torch
from torch import nn, Tensor
from torch.nn import functional as F
from functools import partial


def _make_divisible(ch, divisor=8, min_ch=None):
    """
    This function is taken from the original tf repo.
    It ensures that all layers have a channel number that is divisible by 8
    It can be seen here:
    https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/mobilenet.py
    """
    if min_ch is None:
        min_ch = divisor
    new_ch = max(min_ch, int(ch + divisor / 2) // divisor * divisor)
    # Make sure that round down does not go down by more than 10%.
    if new_ch < 0.9 * ch:
        new_ch += divisor
    return new_ch


class ConvBNActivation(nn.Sequential):
    def __init__(self,
                 in_planes: int,
                 out_planes: int,
                 kernel_size: int = 3,
                 stride: int = 1,
                 groups: int = 1,
                 norm_layer: Optional[Callable[..., nn.Module]] = None,
                 activation_layer: Optional[Callable[..., nn.Module]] = None,
                 dilation: int = 1):
        padding = (kernel_size - 1) // 2 * dilation
        if norm_layer is None:
            norm_layer = nn.BatchNorm2d
        if activation_layer is None:
            activation_layer = nn.ReLU6
        super(ConvBNActivation, self).__init__(nn.Conv2d(in_channels=in_planes,
                                                         out_channels=out_planes,
                                                         kernel_size=kernel_size,
                                                         stride=stride,
                                                         dilation=dilation,
                                                         padding=padding,
                                                         groups=groups,
                                                         bias=False),
                                               norm_layer(out_planes),
                                               activation_layer(inplace=True))
        self.out_channels = out_planes


class SqueezeExcitation(nn.Module):
    def __init__(self, input_c: int, squeeze_factor: int = 4):
        super(SqueezeExcitation, self).__init__()
        squeeze_c = _make_divisible(input_c // squeeze_factor, 8)
        self.fc1 = nn.Conv2d(input_c, squeeze_c, 1)
        self.fc2 = nn.Conv2d(squeeze_c, input_c, 1)

    def forward(self, x: Tensor) -> Tensor:
        scale = F.adaptive_avg_pool2d(x, output_size=(1, 1))
        scale = self.fc1(scale)
        scale = F.relu(scale, inplace=True)
        scale = self.fc2(scale)
        scale = F.hardsigmoid(scale, inplace=True)
        return scale * x


class InvertedResidualConfig:
    def __init__(self,
                 input_c: int,
                 kernel: int,
                 expanded_c: int,
                 out_c: int,
                 use_se: bool,
                 activation: str,
                 stride: int,
                 dilation: int,
                 width_multi: float):
        self.input_c = self.adjust_channels(input_c, width_multi)
        self.kernel = kernel
        self.expanded_c = self.adjust_channels(expanded_c, width_multi)
        self.out_c = self.adjust_channels(out_c, width_multi)
        self.use_se = use_se
        self.use_hs = activation == "HS"  # whether using h-swish activation
        self.stride = stride
        self.dilation = dilation

    @staticmethod
    def adjust_channels(channels: int, width_multi: float):
        return _make_divisible(channels * width_multi, 8)


class InvertedResidual(nn.Module):
    def __init__(self,
                 cnf: InvertedResidualConfig,
                 norm_layer: Callable[..., nn.Module]):
        super(InvertedResidual, self).__init__()

        if cnf.stride not in [1, 2]:
            raise ValueError("illegal stride value.")

        self.use_res_connect = (cnf.stride == 1 and cnf.input_c == cnf.out_c)

        layers: List[nn.Module] = []
        activation_layer = nn.Hardswish if cnf.use_hs else nn.ReLU

        # expand
        if cnf.expanded_c != cnf.input_c:
            layers.append(ConvBNActivation(cnf.input_c,
                                           cnf.expanded_c,
                                           kernel_size=1,
                                           norm_layer=norm_layer,
                                           activation_layer=activation_layer))

        # depthwise
        stride = 1 if cnf.dilation > 1 else cnf.stride
        layers.append(ConvBNActivation(cnf.expanded_c,
                                       cnf.expanded_c,
                                       kernel_size=cnf.kernel,
                                       stride=stride,
                                       dilation=cnf.dilation,
                                       groups=cnf.expanded_c,
                                       norm_layer=norm_layer,
                                       activation_layer=activation_layer))

        if cnf.use_se:
            layers.append(SqueezeExcitation(cnf.expanded_c))

        # project
        layers.append(ConvBNActivation(cnf.expanded_c,
                                       cnf.out_c,
                                       kernel_size=1,
                                       norm_layer=norm_layer,
                                       activation_layer=nn.Identity))

        self.block = nn.Sequential(*layers)
        self.out_channels = cnf.out_c
        self.is_strided = cnf.stride > 1

    def forward(self, x: Tensor) -> Tensor:
        result = self.block(x)
        if self.use_res_connect:
            result += x

        return result


class MobileNetV3(nn.Module):
    def __init__(self,
                 inverted_residual_setting: List[InvertedResidualConfig],
                 last_channel: int,
                 num_classes: int = 1000,
                 block: Optional[Callable[..., nn.Module]] = None,
                 norm_layer: Optional[Callable[..., nn.Module]] = None):
        super(MobileNetV3, self).__init__()

        if not inverted_residual_setting:
            raise ValueError("The inverted_residual_setting should not be empty.")
        elif not (isinstance(inverted_residual_setting, List) and
                  all([isinstance(s, InvertedResidualConfig) for s in inverted_residual_setting])):
            raise TypeError("The inverted_residual_setting should be List[InvertedResidualConfig]")

        if block is None:
            block = InvertedResidual

        if norm_layer is None:
            norm_layer = partial(nn.BatchNorm2d, eps=0.001, momentum=0.01)

        layers: List[nn.Module] = []

        # building first layer
        firstconv_output_c = inverted_residual_setting[0].input_c
        layers.append(ConvBNActivation(3,
                                       firstconv_output_c,
                                       kernel_size=3,
                                       stride=2,
                                       norm_layer=norm_layer,
                                       activation_layer=nn.Hardswish))
        # building inverted residual blocks
        for cnf in inverted_residual_setting:
            layers.append(block(cnf, norm_layer))

        # building last several layers
        lastconv_input_c = inverted_residual_setting[-1].out_c
        lastconv_output_c = 6 * lastconv_input_c
        layers.append(ConvBNActivation(lastconv_input_c,
                                       lastconv_output_c,
                                       kernel_size=1,
                                       norm_layer=norm_layer,
                                       activation_layer=nn.Hardswish))
        self.features = nn.Sequential(*layers)
        self.avgpool = nn.AdaptiveAvgPool2d(1)
        self.classifier = nn.Sequential(nn.Linear(lastconv_output_c, last_channel),
                                        nn.Hardswish(inplace=True),
                                        nn.Dropout(p=0.2, inplace=True),
                                        nn.Linear(last_channel, num_classes))

        # initial weights
        for m in self.modules():
            if isinstance(m, nn.Conv2d):
                nn.init.kaiming_normal_(m.weight, mode="fan_out")
                if m.bias is not None:
                    nn.init.zeros_(m.bias)
            elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)):
                nn.init.ones_(m.weight)
                nn.init.zeros_(m.bias)
            elif isinstance(m, nn.Linear):
                nn.init.normal_(m.weight, 0, 0.01)
                nn.init.zeros_(m.bias)

    def _forward_impl(self, x: Tensor) -> Tensor:
        x = self.features(x)
        x = self.avgpool(x)
        x = torch.flatten(x, 1)
        x = self.classifier(x)

        return x

    def forward(self, x: Tensor) -> Tensor:
        return self._forward_impl(x)


def mobilenet_v3_large(num_classes: int = 1000,
                       reduced_tail: bool = False,
                       dilated: bool = False) -> MobileNetV3:
    """
    Constructs a large MobileNetV3 architecture from
    "Searching for MobileNetV3" .

    weights_link:
    https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth

    Args:
        num_classes (int): number of classes
        reduced_tail (bool): If True, reduces the channel counts of all feature layers
            between C4 and C5 by 2. It is used to reduce the channel redundancy in the
            backbone for Detection and Segmentation.
        dilated: whether using dilated conv
    """
    width_multi = 1.0
    bneck_conf = partial(InvertedResidualConfig, width_multi=width_multi)
    adjust_channels = partial(InvertedResidualConfig.adjust_channels, width_multi=width_multi)

    reduce_divider = 2 if reduced_tail else 1
    dilation = 2 if dilated else 1

    inverted_residual_setting = [
        # input_c, kernel, expanded_c, out_c, use_se, activation, stride, dilation
        bneck_conf(16, 3, 16, 16, False, "RE", 1, 1),
        bneck_conf(16, 3, 64, 24, False, "RE", 2, 1),  # C1
        bneck_conf(24, 3, 72, 24, False, "RE", 1, 1),
        bneck_conf(24, 5, 72, 40, True, "RE", 2, 1),  # C2
        bneck_conf(40, 5, 120, 40, True, "RE", 1, 1),
        bneck_conf(40, 5, 120, 40, True, "RE", 1, 1),
        bneck_conf(40, 3, 240, 80, False, "HS", 2, 1),  # C3
        bneck_conf(80, 3, 200, 80, False, "HS", 1, 1),
        bneck_conf(80, 3, 184, 80, False, "HS", 1, 1),
        bneck_conf(80, 3, 184, 80, False, "HS", 1, 1),
        bneck_conf(80, 3, 480, 112, True, "HS", 1, 1),
        bneck_conf(112, 3, 672, 112, True, "HS", 1, 1),
        bneck_conf(112, 5, 672, 160 // reduce_divider, True, "HS", 2, dilation),  # C4
        bneck_conf(160 // reduce_divider, 5, 960 // reduce_divider, 160 // reduce_divider, True, "HS", 1, dilation),
        bneck_conf(160 // reduce_divider, 5, 960 // reduce_divider, 160 // reduce_divider, True, "HS", 1, dilation),
    ]
    last_channel = adjust_channels(1280 // reduce_divider)  # C5

    return MobileNetV3(inverted_residual_setting=inverted_residual_setting,
                       last_channel=last_channel,
                       num_classes=num_classes)


def mobilenet_v3_small(num_classes: int = 1000,
                       reduced_tail: bool = False,
                       dilated: bool = False) -> MobileNetV3:
    """
    Constructs a large MobileNetV3 architecture from
    "Searching for MobileNetV3" .

    weights_link:
    https://download.pytorch.org/models/mobilenet_v3_small-047dcff4.pth

    Args:
        num_classes (int): number of classes
        reduced_tail (bool): If True, reduces the channel counts of all feature layers
            between C4 and C5 by 2. It is used to reduce the channel redundancy in the
            backbone for Detection and Segmentation.
        dilated: whether using dilated conv
    """
    width_multi = 1.0
    bneck_conf = partial(InvertedResidualConfig, width_multi=width_multi)
    adjust_channels = partial(InvertedResidualConfig.adjust_channels, width_multi=width_multi)

    reduce_divider = 2 if reduced_tail else 1
    dilation = 2 if dilated else 1

    inverted_residual_setting = [
        # input_c, kernel, expanded_c, out_c, use_se, activation, stride, dilation
        bneck_conf(16, 3, 16, 16, True, "RE", 2, 1),  # C1
        bneck_conf(16, 3, 72, 24, False, "RE", 2, 1),  # C2
        bneck_conf(24, 3, 88, 24, False, "RE", 1, 1),
        bneck_conf(24, 5, 96, 40, True, "HS", 2, 1),  # C3
        bneck_conf(40, 5, 240, 40, True, "HS", 1, 1),
        bneck_conf(40, 5, 240, 40, True, "HS", 1, 1),
        bneck_conf(40, 5, 120, 48, True, "HS", 1, 1),
        bneck_conf(48, 5, 144, 48, True, "HS", 1, 1),
        bneck_conf(48, 5, 288, 96 // reduce_divider, True, "HS", 2, dilation),  # C4
        bneck_conf(96 // reduce_divider, 5, 576 // reduce_divider, 96 // reduce_divider, True, "HS", 1, dilation),
        bneck_conf(96 // reduce_divider, 5, 576 // reduce_divider, 96 // reduce_divider, True, "HS", 1, dilation)
    ]
    last_channel = adjust_channels(1024 // reduce_divider)  # C5

    return MobileNetV3(inverted_residual_setting=inverted_residual_setting,
                       last_channel=last_channel,
                       num_classes=num_classes)

  • resnet_backbone.py
import torch
import torch.nn as nn


def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
    """3x3 convolution with padding"""
    return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
                     padding=dilation, groups=groups, bias=False, dilation=dilation)


def conv1x1(in_planes, out_planes, stride=1):
    """1x1 convolution"""
    return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)


class Bottleneck(nn.Module):
    # Bottleneck in torchvision places the stride for downsampling at 3x3 convolution(self.conv2)
    # while original implementation places the stride at the first 1x1 convolution(self.conv1)
    # according to "Deep residual learning for image recognition"https://arxiv.org/abs/1512.03385.
    # This variant is also known as ResNet V1.5 and improves accuracy according to
    # https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch.

    expansion = 4

    def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1,
                 base_width=64, dilation=1, norm_layer=None):
        super(Bottleneck, self).__init__()
        if norm_layer is None:
            norm_layer = nn.BatchNorm2d
        width = int(planes * (base_width / 64.)) * groups
        # Both self.conv2 and self.downsample layers downsample the input when stride != 1
        self.conv1 = conv1x1(inplanes, width)
        self.bn1 = norm_layer(width)
        self.conv2 = conv3x3(width, width, stride, groups, dilation)
        self.bn2 = norm_layer(width)
        self.conv3 = conv1x1(width, planes * self.expansion)
        self.bn3 = norm_layer(planes * self.expansion)
        self.relu = nn.ReLU(inplace=True)
        self.downsample = downsample
        self.stride = stride

    def forward(self, x):
        identity = x

        out = self.conv1(x)
        out = self.bn1(out)
        out = self.relu(out)

        out = self.conv2(out)
        out = self.bn2(out)
        out = self.relu(out)

        out = self.conv3(out)
        out = self.bn3(out)

        if self.downsample is not None:
            identity = self.downsample(x)

        out += identity
        out = self.relu(out)

        return out


class ResNet(nn.Module):

    def __init__(self, block, layers, num_classes=1000, zero_init_residual=False,
                 groups=1, width_per_group=64, replace_stride_with_dilation=None,
                 norm_layer=None):
        super(ResNet, self).__init__()
        if norm_layer is None:
            norm_layer = nn.BatchNorm2d
        self._norm_layer = norm_layer

        self.inplanes = 64
        self.dilation = 1
        if replace_stride_with_dilation is None:
            # each element in the tuple indicates if we should replace
            # the 2x2 stride with a dilated convolution instead
            replace_stride_with_dilation = [False, False, False]
        if len(replace_stride_with_dilation) != 3:
            raise ValueError("replace_stride_with_dilation should be None "
                             "or a 3-element tuple, got {}".format(replace_stride_with_dilation))
        self.groups = groups
        self.base_width = width_per_group
        self.conv1 = nn.Conv2d(3, self.inplanes, kernel_size=7, stride=2, padding=3,
                               bias=False)
        self.bn1 = norm_layer(self.inplanes)
        self.relu = nn.ReLU(inplace=True)
        self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1)
        self.layer1 = self._make_layer(block, 64, layers[0])
        self.layer2 = self._make_layer(block, 128, layers[1], stride=2,
                                       dilate=replace_stride_with_dilation[0])
        self.layer3 = self._make_layer(block, 256, layers[2], stride=2,
                                       dilate=replace_stride_with_dilation[1])
        self.layer4 = self._make_layer(block, 512, layers[3], stride=2,
                                       dilate=replace_stride_with_dilation[2])
        self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
        self.fc = nn.Linear(512 * block.expansion, num_classes)

        for m in self.modules():
            if isinstance(m, nn.Conv2d):
                nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
            elif isinstance(m, nn.BatchNorm2d):
                nn.init.constant_(m.weight, 1)
                nn.init.constant_(m.bias, 0)

        # Zero-initialize the last BN in each residual branch,
        # so that the residual branch starts with zeros, and each residual block behaves like an identity.
        # This improves the model by 0.2~0.3% according to https://arxiv.org/abs/1706.02677
        if zero_init_residual:
            for m in self.modules():
                if isinstance(m, Bottleneck):
                    nn.init.constant_(m.bn3.weight, 0)

    def _make_layer(self, block, planes, blocks, stride=1, dilate=False):
        norm_layer = self._norm_layer
        downsample = None
        previous_dilation = self.dilation
        if dilate:
            self.dilation *= stride
            stride = 1
        if stride != 1 or self.inplanes != planes * block.expansion:
            downsample = nn.Sequential(
                conv1x1(self.inplanes, planes * block.expansion, stride),
                norm_layer(planes * block.expansion),
            )

        layers = []
        layers.append(block(self.inplanes, planes, stride, downsample, self.groups,
                            self.base_width, previous_dilation, norm_layer))
        self.inplanes = planes * block.expansion
        for _ in range(1, blocks):
            layers.append(block(self.inplanes, planes, groups=self.groups,
                                base_width=self.base_width, dilation=self.dilation,
                                norm_layer=norm_layer))

        return nn.Sequential(*layers)

    def _forward_impl(self, x):
        # See note [TorchScript super()]
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.relu(x)
        x = self.maxpool(x)

        x = self.layer1(x)
        x = self.layer2(x)
        x = self.layer3(x)
        x = self.layer4(x)

        x = self.avgpool(x)
        x = torch.flatten(x, 1)
        x = self.fc(x)

        return x

    def forward(self, x):
        return self._forward_impl(x)


def _resnet(block, layers, **kwargs):
    model = ResNet(block, layers, **kwargs)
    return model


def resnet50(**kwargs):
    r"""ResNet-50 model from
    `"Deep Residual Learning for Image Recognition" `_

    Args:
        pretrained (bool): If True, returns a model pre-trained on ImageNet
        progress (bool): If True, displays a progress bar of the download to stderr
    """
    return _resnet(Bottleneck, [3, 4, 6, 3], **kwargs)


def resnet101(**kwargs):
    r"""ResNet-101 model from
    `"Deep Residual Learning for Image Recognition" `_

    Args:
        pretrained (bool): If True, returns a model pre-trained on ImageNet
        progress (bool): If True, displays a progress bar of the download to stderr
    """
    return _resnet(Bottleneck, [3, 4, 23, 3], **kwargs)

train_utils文件目录
  • distributed_utils.py
from collections import defaultdict, deque
import datetime
import time
import torch
import torch.distributed as dist

import errno
import os


class SmoothedValue(object):
    """Track a series of values and provide access to smoothed values over a
    window or the global series average.
    """

    def __init__(self, window_size=20, fmt=None):
        if fmt is None:
            fmt = "{value:.4f} ({global_avg:.4f})"
        self.deque = deque(maxlen=window_size)
        self.total = 0.0
        self.count = 0
        self.fmt = fmt

    def update(self, value, n=1):
        self.deque.append(value)
        self.count += n
        self.total += value * n

    def synchronize_between_processes(self):
        """
        Warning: does not synchronize the deque!
        """
        if not is_dist_avail_and_initialized():
            return
        t = torch.tensor([self.count, self.total], dtype=torch.float64, device='cuda')
        dist.barrier()
        dist.all_reduce(t)
        t = t.tolist()
        self.count = int(t[0])
        self.total = t[1]

    @property
    def median(self):
        d = torch.tensor(list(self.deque))
        return d.median().item()

    @property
    def avg(self):
        d = torch.tensor(list(self.deque), dtype=torch.float32)
        return d.mean().item()

    @property
    def global_avg(self):
        return self.total / self.count

    @property
    def max(self):
        return max(self.deque)

    @property
    def value(self):
        return self.deque[-1]

    def __str__(self):
        return self.fmt.format(
            median=self.median,
            avg=self.avg,
            global_avg=self.global_avg,
            max=self.max,
            value=self.value)


class ConfusionMatrix(object):
    def __init__(self, num_classes):
        self.num_classes = num_classes
        self.mat = None

    def update(self, a, b):
        n = self.num_classes
        if self.mat is None:
            # 创建混淆矩阵
            self.mat = torch.zeros((n, n), dtype=torch.int64, device=a.device)
        with torch.no_grad():
            # 寻找GT中为目标的像素索引
            k = (a >= 0) & (a < n)
            # 统计像素真实类别a[k]被预测成类别b[k]的个数(这里的做法很巧妙)
            inds = n * a[k].to(torch.int64) + b[k]
            self.mat += torch.bincount(inds, minlength=n**2).reshape(n, n)

    def reset(self):
        if self.mat is not None:
            self.mat.zero_()

    def compute(self):
        h = self.mat.float()
        # 计算全局预测准确率(混淆矩阵的对角线为预测正确的个数)
        acc_global = torch.diag(h).sum() / h.sum()
        # 计算每个类别的准确率
        acc = torch.diag(h) / h.sum(1)
        # 计算每个类别预测与真实目标的iou
        iu = torch.diag(h) / (h.sum(1) + h.sum(0) - torch.diag(h))
        return acc_global, acc, iu

    def reduce_from_all_processes(self):
        if not torch.distributed.is_available():
            return
        if not torch.distributed.is_initialized():
            return
        torch.distributed.barrier()
        torch.distributed.all_reduce(self.mat)

    def __str__(self):
        acc_global, acc, iu = self.compute()
        return (
            'global correct: {:.1f}
'
            'average row correct: {}
'
            'IoU: {}
'
            'mean IoU: {:.1f}').format(
                acc_global.item() * 100,
                ['{:.1f}'.format(i) for i in (acc * 100).tolist()],
                ['{:.1f}'.format(i) for i in (iu * 100).tolist()],
                iu.mean().item() * 100)


class MetricLogger(object):
    def __init__(self, delimiter="	"):
        self.meters = defaultdict(SmoothedValue)
        self.delimiter = delimiter

    def update(self, **kwargs):
        for k, v in kwargs.items():
            if isinstance(v, torch.Tensor):
                v = v.item()
            assert isinstance(v, (float, int))
            self.meters[k].update(v)

    def __getattr__(self, attr):
        if attr in self.meters:
            return self.meters[attr]
        if attr in self.__dict__:
            return self.__dict__[attr]
        raise AttributeError("'{}' object has no attribute '{}'".format(
            type(self).__name__, attr))

    def __str__(self):
        loss_str = []
        for name, meter in self.meters.items():
            loss_str.append(
                "{}: {}".format(name, str(meter))
            )
        return self.delimiter.join(loss_str)

    def synchronize_between_processes(self):
        for meter in self.meters.values():
            meter.synchronize_between_processes()

    def add_meter(self, name, meter):
        self.meters[name] = meter

    def log_every(self, iterable, print_freq, header=None):
        i = 0
        if not header:
            header = ''
        start_time = time.time()
        end = time.time()
        iter_time = SmoothedValue(fmt='{avg:.4f}')
        data_time = SmoothedValue(fmt='{avg:.4f}')
        space_fmt = ':' + str(len(str(len(iterable)))) + 'd'
        if torch.cuda.is_available():
            log_msg = self.delimiter.join([
                header,
                '[{0' + space_fmt + '}/{1}]',
                'eta: {eta}',
                '{meters}',
                'time: {time}',
                'data: {data}',
                'max mem: {memory:.0f}'
            ])
        else:
            log_msg = self.delimiter.join([
                header,
                '[{0' + space_fmt + '}/{1}]',
                'eta: {eta}',
                '{meters}',
                'time: {time}',
                'data: {data}'
            ])
        MB = 1024.0 * 1024.0
        for obj in iterable:
            data_time.update(time.time() - end)
            yield obj
            iter_time.update(time.time() - end)
            if i % print_freq == 0:
                eta_seconds = iter_time.global_avg * (len(iterable) - i)
                eta_string = str(datetime.timedelta(seconds=int(eta_seconds)))
                if torch.cuda.is_available():
                    print(log_msg.format(
                        i, len(iterable), eta=eta_string,
                        meters=str(self),
                        time=str(iter_time), data=str(data_time),
                        memory=torch.cuda.max_memory_allocated() / MB))
                else:
                    print(log_msg.format(
                        i, len(iterable), eta=eta_string,
                        meters=str(self),
                        time=str(iter_time), data=str(data_time)))
            i += 1
            end = time.time()
        total_time = time.time() - start_time
        total_time_str = str(datetime.timedelta(seconds=int(total_time)))
        print('{} Total time: {}'.format(header, total_time_str))


def mkdir(path):
    try:
        os.makedirs(path)
    except OSError as e:
        if e.errno != errno.EEXIST:
            raise


def setup_for_distributed(is_master):
    """
    This function disables printing when not in master process
    """
    import builtins as __builtin__
    builtin_print = __builtin__.print

    def print(*args, **kwargs):
        force = kwargs.pop('force', False)
        if is_master or force:
            builtin_print(*args, **kwargs)

    __builtin__.print = print


def is_dist_avail_and_initialized():
    if not dist.is_available():
        return False
    if not dist.is_initialized():
        return False
    return True


def get_world_size():
    if not is_dist_avail_and_initialized():
        return 1
    return dist.get_world_size()


def get_rank():
    if not is_dist_avail_and_initialized():
        return 0
    return dist.get_rank()


def is_main_process():
    return get_rank() == 0


def save_on_master(*args, **kwargs):
    if is_main_process():
        torch.save(*args, **kwargs)


def init_distributed_mode(args):
    if 'RANK' in os.environ and 'WORLD_SIZE' in os.environ:
        args.rank = int(os.environ["RANK"])
        args.world_size = int(os.environ['WORLD_SIZE'])
        args.gpu = int(os.environ['LOCAL_RANK'])
    elif 'SLURM_PROCID' in os.environ:
        args.rank = int(os.environ['SLURM_PROCID'])
        args.gpu = args.rank % torch.cuda.device_count()
    elif hasattr(args, "rank"):
        pass
    else:
        print('Not using distributed mode')
        args.distributed = False
        return

    args.distributed = True

    torch.cuda.set_device(args.gpu)
    args.dist_backend = 'nccl'
    print('| distributed init (rank {}): {}'.format(
        args.rank, args.dist_url), flush=True)
    torch.distributed.init_process_group(backend=args.dist_backend, init_method=args.dist_url,
                                         world_size=args.world_size, rank=args.rank)
    setup_for_distributed(args.rank == 0)

  • train_and_eval.py
import torch
from torch import nn
import train_utils.distributed_utils as utils


def criterion(inputs, target):
    losses = {}
    for name, x in inputs.items():
        # 忽略target中值为255的像素,255的像素是目标边缘或者padding填充
        losses[name] = nn.functional.cross_entropy(x, target, ignore_index=255)

    if len(losses) == 1:
        return losses['out']

    return losses['out'] + 0.5 * losses['aux']


def evaluate(model, data_loader, device, num_classes):
    model.eval()
    confmat = utils.ConfusionMatrix(num_classes)
    metric_logger = utils.MetricLogger(delimiter="  ")
    header = 'Test:'
    with torch.no_grad():
        for image, target in metric_logger.log_every(data_loader, 100, header):
            image, target = image.to(device), target.to(device)
            output = model(image)
            output = output['out']

            confmat.update(target.flatten(), output.argmax(1).flatten())

        confmat.reduce_from_all_processes()

    return confmat


def train_one_epoch(model, optimizer, data_loader, device, epoch, lr_scheduler, print_freq=10, scaler=None):
    model.train()
    metric_logger = utils.MetricLogger(delimiter="  ")
    metric_logger.add_meter('lr', utils.SmoothedValue(window_size=1, fmt='{value:.6f}'))
    header = 'Epoch: [{}]'.format(epoch)

    for image, target in metric_logger.log_every(data_loader, print_freq, header):
        image, target = image.to(device), target.to(device)
        with torch.cuda.amp.autocast(enabled=scaler is not None):
            output = model(image)
            loss = criterion(output, target)

        optimizer.zero_grad()
        if scaler is not None:
            scaler.scale(loss).backward()
            scaler.step(optimizer)
            scaler.update()
        else:
            loss.backward()
            optimizer.step()

        lr_scheduler.step()

        lr = optimizer.param_groups[0]["lr"]
        metric_logger.update(loss=loss.item(), lr=lr)

    return metric_logger.meters["loss"].global_avg, lr


def create_lr_scheduler(optimizer,
                        num_step: int,
                        epochs: int,
                        warmup=True,
                        warmup_epochs=1,
                        warmup_factor=1e-3):
    assert num_step > 0 and epochs > 0
    if warmup is False:
        warmup_epochs = 0

    def f(x):
        """
        根据step数返回一个学习率倍率因子,
        注意在训练开始之前,pytorch会提前调用一次lr_scheduler.step()方法
        """
        if warmup is True and x <= (warmup_epochs * num_step):
            alpha = float(x) / (warmup_epochs * num_step)
            # warmup过程中lr倍率因子从warmup_factor -> 1
            return warmup_factor * (1 - alpha) + alpha
        else:
            # warmup后lr倍率因子从1 -> 0
            # 参考deeplab_v2: Learning rate policy
            return (1 - (x - warmup_epochs * num_step) / ((epochs - warmup_epochs) * num_step)) ** 0.9

    return torch.optim.lr_scheduler.LambdaLR(optimizer, lr_lambda=f)

根目录
  • train.py
import os
import time
import datetime

import torch

from src import deeplabv3_resnet50
from train_utils import train_one_epoch, evaluate, create_lr_scheduler
from my_dataset import VOCSegmentation
import transforms as T


class SegmentationPresetTrain:
    def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)):
        min_size = int(0.5 * base_size)
        max_size = int(2.0 * base_size)

        trans = [T.RandomResize(min_size, max_size)]
        if hflip_prob > 0:
            trans.append(T.RandomHorizontalFlip(hflip_prob))
        trans.extend([
            T.RandomCrop(crop_size),
            T.ToTensor(),
            T.Normalize(mean=mean, std=std),
        ])
        self.transforms = T.Compose(trans)

    def __call__(self, img, target):
        return self.transforms(img, target)


class SegmentationPresetEval:
    def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)):
        self.transforms = T.Compose([
            T.RandomResize(base_size, base_size),
            T.ToTensor(),
            T.Normalize(mean=mean, std=std),
        ])

    def __call__(self, img, target):
        return self.transforms(img, target)


def get_transform(train):
    base_size = 520
    crop_size = 480

    return SegmentationPresetTrain(base_size, crop_size) if train else SegmentationPresetEval(base_size)


def create_model(aux, num_classes, pretrain=True):
    model = deeplabv3_resnet50(aux=aux, num_classes=num_classes)

    if pretrain:
        weights_dict = torch.load("./src/deeplabv3_resnet50.pth", map_location='cpu')

        if num_classes != 21:
            # 官方提供的预训练权重是21类(包括背景)
            # 如果训练自己的数据集,将和类别相关的权重删除,防止权重shape不一致报错
            for k in list(weights_dict.keys()):
                if "classifier.4" in k:
                    del weights_dict[k]

        missing_keys, unexpected_keys = model.load_state_dict(weights_dict, strict=False)
        if len(missing_keys) != 0 or len(unexpected_keys) != 0:
            print("missing_keys: ", missing_keys)
            print("unexpected_keys: ", unexpected_keys)

    return model


def main(args):
    device = torch.device(args.device if torch.cuda.is_available() else "cpu")
    batch_size = args.batch_size
    # segmentation nun_classes + background
    num_classes = args.num_classes + 1

    # 用来保存训练以及验证过程中信息
    results_file = "results{}.txt".format(datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))

    # VOCdevkit -> VOC2012 -> ImageSets -> Segmentation -> train.txt
    train_dataset = VOCSegmentation(args.data_path,
                                    year="2012",
                                    transforms=get_transform(train=True),
                                    txt_name="train.txt")

    # VOCdevkit -> VOC2012 -> ImageSets -> Segmentation -> val.txt
    val_dataset = VOCSegmentation(args.data_path,
                                  year="2012",
                                  transforms=get_transform(train=False),
                                  txt_name="val.txt")

    num_workers = min([os.cpu_count(), batch_size if batch_size > 1 else 0, 8])
    train_loader = torch.utils.data.DataLoader(train_dataset,
                                               batch_size=batch_size,
                                               num_workers=num_workers,
                                               shuffle=True,
                                               pin_memory=True,
                                               collate_fn=train_dataset.collate_fn)

    val_loader = torch.utils.data.DataLoader(val_dataset,
                                             batch_size=1,
                                             num_workers=num_workers,
                                             pin_memory=True,
                                             collate_fn=val_dataset.collate_fn)

    model = create_model(aux=args.aux, num_classes=num_classes)
    model.to(device)

    params_to_optimize = [
        {"params": [p for p in model.backbone.parameters() if p.requires_grad]},
        {"params": [p for p in model.classifier.parameters() if p.requires_grad]}
    ]

    if args.aux:
        params = [p for p in model.aux_classifier.parameters() if p.requires_grad]
        params_to_optimize.append({"params": params, "lr": args.lr * 10})

    optimizer = torch.optim.SGD(
        params_to_optimize,
        lr=args.lr, momentum=args.momentum, weight_decay=args.weight_decay
    )

    scaler = torch.cuda.amp.GradScaler() if args.amp else None

    # 创建学习率更新策略,这里是每个step更新一次(不是每个epoch)
    lr_scheduler = create_lr_scheduler(optimizer, len(train_loader), args.epochs, warmup=True)

    # import matplotlib.pyplot as plt
    # lr_list = []
    # for _ in range(args.epochs):
    #     for _ in range(len(train_loader)):
    #         lr_scheduler.step()
    #         lr = optimizer.param_groups[0]["lr"]
    #         lr_list.append(lr)
    # plt.plot(range(len(lr_list)), lr_list)
    # plt.show()

    if args.resume:
        checkpoint = torch.load(args.resume, map_location='cpu')
        model.load_state_dict(checkpoint['model'])
        optimizer.load_state_dict(checkpoint['optimizer'])
        lr_scheduler.load_state_dict(checkpoint['lr_scheduler'])
        args.start_epoch = checkpoint['epoch'] + 1
        if args.amp:
            scaler.load_state_dict(checkpoint["scaler"])

    start_time = time.time()
    for epoch in range(args.start_epoch, args.epochs):
        mean_loss, lr = train_one_epoch(model, optimizer, train_loader, device, epoch,
                                        lr_scheduler=lr_scheduler, print_freq=args.print_freq, scaler=scaler)

        confmat = evaluate(model, val_loader, device=device, num_classes=num_classes)
        val_info = str(confmat)
        print(val_info)
        # write into txt
        with open(results_file, "a") as f:
            # 记录每个epoch对应的train_loss、lr以及验证集各指标
            train_info = f"[epoch: {epoch}]
" 
                         f"train_loss: {mean_loss:.4f}
" 
                         f"lr: {lr:.6f}
"
            f.write(train_info + val_info + "

")

        save_file = {"model": model.state_dict(),
                     "optimizer": optimizer.state_dict(),
                     "lr_scheduler": lr_scheduler.state_dict(),
                     "epoch": epoch,
                     "args": args}
        if args.amp:
            save_file["scaler"] = scaler.state_dict()
        torch.save(save_file, "save_weights/model_{}.pth".format(epoch))

    total_time = time.time() - start_time
    total_time_str = str(datetime.timedelta(seconds=int(total_time)))
    print("training time {}".format(total_time_str))


def parse_args():
    import argparse
    parser = argparse.ArgumentParser(description="pytorch deeplabv3 training")

    parser.add_argument("--data-path", default="/data/", help="VOCdevkit root")
    parser.add_argument("--num-classes", default=20, type=int)
    parser.add_argument("--aux", default=True, type=bool, help="auxilier loss")
    parser.add_argument("--device", default="cuda", help="training device")
    parser.add_argument("-b", "--batch-size", default=4, type=int)
    parser.add_argument("--epochs", default=30, type=int, metavar="N",
                        help="number of total epochs to train")

    parser.add_argument('--lr', default=0.0001, type=float, help='initial learning rate')
    parser.add_argument('--momentum', default=0.9, type=float, metavar='M',
                        help='momentum')
    parser.add_argument('--wd', '--weight-decay', default=1e-4, type=float,
                        metavar='W', help='weight decay (default: 1e-4)',
                        dest='weight_decay')
    parser.add_argument('--print-freq', default=10, type=int, help='print frequency')
    parser.add_argument('--resume', default='', help='resume from checkpoint')
    parser.add_argument('--start-epoch', default=0, type=int, metavar='N',
                        help='start epoch')
    # Mixed precision training parameters
    parser.add_argument("--amp", default=False, type=bool,
                        help="Use torch.cuda.amp for mixed precision training")

    args = parser.parse_args()

    return args


if __name__ == '__main__':
    args = parse_args()

    if not os.path.exists("./save_weights"):
        os.mkdir("./save_weights")

    main(args)

  • predict.py
import os
import time
import json

import torch
from torchvision import transforms
import numpy as np
from PIL import Image

from src import deeplabv3_resnet50


def time_synchronized():
    torch.cuda.synchronize() if torch.cuda.is_available() else None
    return time.time()


def main():
    aux = False  # inference time not need aux_classifier
    classes = 20
    weights_path = "./save_weights/model_0.pth"
    img_path = "./test.jpg"
    palette_path = "./palette.json"
    assert os.path.exists(weights_path), f"weights {weights_path} not found."
    assert os.path.exists(img_path), f"image {img_path} not found."
    assert os.path.exists(palette_path), f"palette {palette_path} not found."
    with open(palette_path, "rb") as f:
        pallette_dict = json.load(f)
        pallette = []
        for v in pallette_dict.values():
            pallette += v

    # get devices
    device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
    print("using {} device.".format(device))

    # create model
    model = deeplabv3_resnet50(aux=aux, num_classes=classes+1)

    # delete weights about aux_classifier
    weights_dict = torch.load(weights_path, map_location='cpu')['model']
    for k in list(weights_dict.keys()):
        if "aux" in k:
            del weights_dict[k]

    # load weights
    model.load_state_dict(weights_dict)
    model.to(device)

    # load image
    original_img = Image.open(img_path)

    # from pil image to tensor and normalize
    data_transform = transforms.Compose([transforms.Resize(520),
                                         transforms.ToTensor(),
                                         transforms.Normalize(mean=(0.485, 0.456, 0.406),
                                                              std=(0.229, 0.224, 0.225))])
    img = data_transform(original_img)
    # expand batch dimension
    img = torch.unsqueeze(img, dim=0)

    model.eval()  # 进入验证模式
    with torch.no_grad():
        # init model
        img_height, img_width = img.shape[-2:]
        init_img = torch.zeros((1, 3, img_height, img_width), device=device)
        model(init_img)

        t_start = time_synchronized()
        output = model(img.to(device))
        t_end = time_synchronized()
        print("inference+NMS time: {}".format(t_end - t_start))

        prediction = output['out'].argmax(1).squeeze(0)
        prediction = prediction.to("cpu").numpy().astype(np.uint8)
        mask = Image.fromarray(prediction)
        mask.putpalette(pallette)
        mask.save("test_result.png")


if __name__ == '__main__':
    main()

本文地址:https://www.vps345.com/3339.html

搜索文章

Tags

docker 容器 运维 java-rabbitmq java PV计算 带宽计算 流量带宽 服务器带宽 上行带宽 上行速率 什么是上行带宽? CC攻击 攻击怎么办 流量攻击 DDOS攻击 服务器被攻击怎么办 源IP 开源 自动化 n8n dity make 服务器 linux rag ragflow ollama 大模型部署 人工智能 ubuntu linux环境变量 LLM 大模型面经 大模型 职场和发展 Deepseek 大模型学习 搜索引擎 程序员 大模型应用 prompt 数据库 postgresql pgpool pytorch tensorflow 嵌入式硬件 边缘计算 centos 数据分析 机器学习 计算机视觉 qt linuxdeployqt 打包部署程序 appimagetool Agent DeepSeek llama CrewAI python chatgpt gpu算力 安全 uniapp 网络 vue android studio 交互 后端 websocket android AI Dify Linux DNS 硬件工程 单片机 物联网 tcp/ip 无人机 机器人 milvus flutter Google pay Apple pay deepseek 科技 大数据 云计算 区块链 分布式账本 web3 智能合约 信任链 共识算法 debian wps vscode 安卓 ai nlp Linux 维护模式 知识图谱 大模型教程 AI大模型 pycharm flask 智能手机 计算机网络 web安全 网络安全 相机 ide github ffmpeg 开发语言 macos MacMini Mac 迷你主机 mini Apple ESXi opencv YOLO 深度学习 操作系统 php 技能大赛 Qwen3 qwen3 32b vllm 本地部署 网络协议 gitlab MQTT mosquitto 消息队列 系统架构 阿里云 spring boot spring 远程连接 微信开放平台 微信公众平台 微信公众号配置 华为 智能路由器 onlyoffice 在线office 学习 笔记 vim c++ windows nac 802.1 portal 区块链项目 WSL2 上安装 Ubuntu vmware 虚拟机 nginx 网页服务器 web服务器 Nginx chrome ssh vue.js react.js 前端 HTTP 服务器控制 ESP32 DeepSeek oracle c语言 rocketmq Docker引擎已经停止 Docker无法使用 WSL进度一直是0 镜像加速地址 redis 分布式 缓存 远程 命令 执行 sshpass 操作 政务 分布式系统 监控运维 Prometheus Grafana fiddler 爬虫 http conda mysql 主从复制 服务器安全 网络安全策略 防御服务器攻击 安全威胁和解决方案 程序员博客保护 数据保护 安全最佳实践 top Linux top top命令详解 top命令重点 top常用参数 Apache Beam 批流统一 性能优化 案例展示 数据分区 容错机制 kubernetes 云原生 go GIS 遥感 WebGIS iventoy VmWare OpenEuler harmonyos 编辑器 鸿蒙 鸿蒙系统 前端框架 车载系统 mcu 多线程服务器 TCP服务器 qt项目 qt项目实战 qt教程 ssl tidb GLIBC mamba 服务器扩容没有扩容成功 virtualenv arm 金融 算法 数据挖掘 ShapeFile GeoJSON Python 环境迁移 BMC IPMI 带外管理 Windows ai工具 串口服务器 万物互联 工业自动化 工厂改造 fpga开发 线程 多线程 kylin 卸载 软件 列表 ROS 自动驾驶 c# MCP AIGC ansible playbook 自动化运维 django 存储维护 NetApp存储 EMC存储 架构 语言模型 华为云 华为od udp k8s kvm qemu libvirt 蓝桥杯 spring cloud ruoyi oceanbase rc.local 开机自启 systemd 麒麟 Dell HPE 联想 浪潮 AI-native elasticsearch 7-zip mcp mcp协议 go-zero mcp服务器 程序人生 Python教程 pycharm安装 目标检测 YOLOv12 maven 学习方法 经验分享 大模型推理 servlet 考研 数据结构 jvm 游戏 网络结构图 yaml Ultralytics 可视化 ssh漏洞 ssh9.9p2 CVE-2025-23419 ragflow 源码启动 音视频 游戏引擎 jenkins 1024程序员节 agi p2p muduo 网络库 关系型 CH340 串口驱动 CH341 uart 485 ddos UEFI Legacy MBR GPT U盘安装操作系统 具身智能 强化学习 wsl2 wsl vsxsrv git IO pip Kali 渗透 部署 自然语言处理 神经网络 H3C javascript edge cursor 网工 运维开发 Deepseek-R1 私有化部署 推理模型 tomcat Cursor webpack appium 软件测试 自动化测试 功能测试 课程设计 程序 编程 内存 性能分析 rpa llm 群晖 低代码 visualstudio kafka https hadoop big data 其他 微服务 源码 毕业设计 RAGFlow Ollama CosyVoice 嵌入式 linux驱动开发 arm开发 小程序 pyautogui Vmamba eclipse 卷积神经网络 网络工程师 网络管理 软考 2024 2024年上半年 下午真题 答案 AI编程 visual studio code 镜像源 transformer 云电竞 云电脑 todesk prometheus 驱动开发 AI员工 harmonyOS面试题 bash 负载均衡 rabbitmq ruby excel gcc g++ g++13 vmamba hdc 鸿蒙NEXT 智能驾驶 BEVFusion Ubuntu 面试 unity eureka intellij-idea Claude Desktop Claude MCP Windows Cli MCP ACL 流量控制 基本ACL 规则配置 devops LSTM 信息与通信 springsecurity6 oauth2 授权服务器 自定义客户端 SAS ipython word图片自动上传 word一键转存 复制word图片 复制word图文 复制word公式 粘贴word图文 粘贴word公式 jupyter PyQt PySide6 Playwright pythonai PlaywrightMCP mysql离线安装 ubuntu22.04 mysql8.0 中兴光猫 换光猫 网络桥接 自己换光猫 typescript 重启 排查 系统重启 日志 原因 fstab mysql安装报错 windows拒绝安装 企业微信 burpsuite 安全工具 mac安全工具 burp安装教程 渗透工具 adb Ubuntu20.04 2.35 电脑 镜像 docker-compose grafana 前后端分离 图形化界面 vite vue3 powerpoint Docker Docker Compose Kubernetes 压力测试 大模型压力测试 EvalScope 网络攻击模型 系统安全 FTP服务器 DeepSeek-R1 API接口 大模型入门 LLM Web APP Streamlit oneapi 在线预览 xlsx xls文件 在浏览器直接打开解析xls表格 前端实现vue3打开excel 文件地址url或接口文档流二进 jmeter r语言 数据可视化 gaussdb C++软件实战问题排查经验分享 0xfeeefeee 0xcdcdcdcd 动态库加载失败 程序启动失败 程序运行权限 标准用户权限与管理员权限 webrtc uni-app 鲲鹏 昇腾 npu matlab word gpt sdkman SenseVoice 计算机外设 bug 智慧农业 开源鸿蒙 团队开发 notepad gnu zabbix grep 图文教程 VMware虚拟机 macOS系统安装教程 macOS最新版 虚拟机安装macOS Sequoia 远程工作 mac 截图 录屏 gif 工具 5G 3GPP 卫星通信 gitee 抓包工具 yolov5 腾讯云 Apache Flume 数据采集 安装部署 配置优化 高级功能 大数据工具集成 SSE stm32 v10 armbian u-boot 服务器配置 ESP32 IM即时通讯 QQ 微信 剪切板对通 HTML FORMAT 上传视频文件到服务器 uniApp本地上传视频并预览 uniapp移动端h5网页 uniapp微信小程序上传视频 uniapp app端视频上传 uniapp uview组件库 yolov8 openssl unix VMware 软件需求 cnn GoogLeNet Ubuntu DeepSeek DeepSeek Ubuntu DeepSeek 本地部署 DeepSeek 知识库 DeepSeek 私有化知识库 本地部署 DeepSeek DeepSeek 私有化部署 QT 5.12.12 QT开发环境 Ubuntu18.04 node.js selenium 测试工具 集成学习 集成测试 框架搭建 前端面试题 持续部署 axure 富文本编辑器 Alexnet 工具分享 nvm 网络药理学 生信 分子对接 autodock mgltools PDB PubChem VMware Tools vmware tools安装 vmwaretools安装步骤 vmwaretools安装失败 vmware tool安装步骤 vm tools安装步骤 vm tools安装后不能拖 vmware tools安装步骤 防火墙 端口号 开放端口 访问列表 LVM 磁盘分区 lvresize 磁盘扩容 pvcreate 智能体开发 android-studio lvs sql golang 远程桌面 audio vue音乐播放器 vue播放音频文件 Audio音频播放器自定义样式 播放暂停进度条音量调节快进快退 自定义audio覆盖默认样式 服务器无法访问 ip地址无法访问 无法访问宝塔面板 宝塔面板打不开 svn 模型联网 API CherryStudio 数据库系统 iot IIS服务器 IIS性能 日志监控 模拟退火算法 数据库架构 数据管理 数据治理 数据编织 数据虚拟化 安全漏洞 信息安全 shell NVML nvidia-smi 微信小程序 notepad++ chrome devtools chromedriver GCC crosstool-ng 键盘 卡死 list 安卓模拟器 shell脚本免交互 expect linux免交互 隐藏文件 maxkb ARG ArkUI ArkTS 移动端开发 iTerm2 arkUI arkTs Linux find grep python3.11 openjdk Ubuntu 24 常用命令 Ubuntu 24 Ubuntu vi 异常处理 WSL2 IP 地址 docker run 数据卷挂载 环境变量 端口映射 交互模式 知识库 本地知识库部署 DeepSeek R1 模型 pdf 办公自动化 自动化生成 pdf教程 arcgis 人工智能生成内容 iftop 网络流量监控 vnc ui opengl 网络爬虫 cron crontab日志 DevOps 软件交付 数据驱动 应用场景 数据安全 tcpdump nohup 异步执行 RTSP xop RTP RTSPServer 推流 视频 Trae IDE AI 原生集成开发环境 Trae AI fastapi Flask FastAPI Waitress Gunicorn uWSGI Uvicorn 银河麒麟 rsyslog kind sqlserver gitea micropython esp32 mqtt 语音识别 apache microsoft gitee go Java进程管理 DevOps自动化 脚本执行 跨平台开发 远程运维 Apache Exec JSch 模拟器 教程 kali 共享文件夹 虚拟显示器 远程控制 Mac内存不够用怎么办 ubuntu20.04 开机黑屏 程序员创富 open webui diskgenius rime 图像处理 策略模式 zip unzip CUPS 打印机 Qt5 AnythingLLM AnythingLLM安装 生物信息学 gromacs 分子动力学模拟 MD 动力学模拟 ip协议 视频编解码 7z Doris搭建 docker搭建Doris Doris搭建过程 linux搭建Doris Doris搭建详细步骤 Doris部署 计算生物学 生物信息 基因组 ros ros1 Noetic 20.04 apt 安装 html k8s部署 MySQL8.0 高可用集群(1主2从) 显卡驱动持久化 GPU持久化 jdk 交换机 硬件 设备 GPU PCI-Express 回显服务器 UDP的API使用 大模型微调 雨云 NPS dell服务器 YOLOv8 NPU Atlas800 A300I pro asi_bench 安全威胁分析 实时音视频 npm 反向代理 RAID RAID技术 磁盘 存储 监控 我的世界 我的世界联机 数码 我的世界服务器搭建 rust腐蚀 file server http server web server triton 模型分析 游戏服务器 Minecraft 状态管理的 UDP 服务器 Arduino RTOS .net Windsurf 宝塔 NFC 近场通讯 智能门锁 蓝桥杯C++组 C++ deepseek-r1 大模型本地部署 虚拟化 es6 qt6.3 g726 飞腾处理器 硬件架构 国产化 Python 视频爬取教程 Python 视频爬取 Python 视频教程 aws localhost chatbox 进程 进程控制 C 进程地址空间 ip 邮件APP 免费软件 嵌入式Linux IPC java-ee MacOS 向日葵 xcode python2 ubuntu24.04 kotlin iphone 桌面环境 Isaac Sim 虚拟仿真 chromium dpi 打不开xxx软件 无法检查其是否包含恶意软件 设备树 毕设 MobaXterm 文件传输 lsb_release /etc/issue /proc/version uname -r 查看ubuntu版本 cuda Bug解决 Qt platform OpenCV 权限 鸿蒙面试 面试题 IMX317 MIPI H265 VCU apt 国内源 实时互动 rnn 多进程 pygame camera Arduino 电子信息 yum换源 WebVM 单例模式 计算机 cudnn nvidia dash json 正则表达式 qps 高并发 单元测试 可用性测试 京东云 DrissionPage SRS 流媒体 直播 FTP 服务器 升级 CVE-2024-7347 漏洞 mount挂载磁盘 wrong fs type LVM挂载磁盘 Centos7.9 IIS .net core Hosting Bundle .NET Framework vs2022 AutoDL xrdp 孤岛惊魂4 filezilla 无法连接服务器 连接被服务器拒绝 vsftpd 331/530 adobe live555 源码剖析 rtsp实现步骤 流媒体开发 googlecloud 银河麒麟操作系统 express 测试用例 游戏程序 大语言模型 langchain NFS redhat 大数据平台 jar 大文件分片上传断点续传及进度条 如何批量上传超大文件并显示进度 axios大文件切片上传详细教 node服务器合并切片 vue3大文件上传报错提示错误 vu大文件秒传跨域报错cors oracle fusion oracle中间件 lighttpd安装 Ubuntu配置 Windows安装 性能测试 服务器优化 Chatbox postman Qualcomm WoS QNN AppBuilder 虚幻 信号处理 ftp服务 文件上传 华为OD 华为OD机试真题 可以组成网络的服务器 电路仿真 multisim 硬件工程师 硬件工程师学习 电路图 电路分析 仪器仪表 web .netcore 匿名FTP 邮件传输代理 SSL支持 chroot监狱技术 小游戏 五子棋 yum RAGFLOW RAG 检索增强生成 文档解析 大模型垂直应用 chrome 浏览器下载 chrome 下载安装 谷歌浏览器下载 USB转串口 xshell termius iterm2 客户端 MySql Qwen2.5-coder 离线部署 export env 变量 高德地图 鸿蒙接入高德地图 HarmonyOS5.0 IP配置 netplan 快捷键 旋转屏幕 自动操作 Ubuntu 22.04 算家云 算力租赁 安装教程 termux 环境搭建 SecureCRT comfyui comfyui教程 mac设置host 虚拟现实 向量数据库 milvus安装 Maxkb RAG技术 本地知识库 OpenCore 热榜 rpc Docker Desktop 自动化任务管理 seleium 双系统 GRUB引导 Linux技巧 飞牛nas fnos centos 7 dify 本地化部署 kernel tar remote-ssh 安装MySQL 进程信号 post.io 企业邮箱 搭建邮箱 rtc xml 计算机学习路线 编程语言选择 小智 宝塔面板 easyTier 内网穿透 组网 C语言 Cline Kylin-Server 国产操作系统 服务器安装 spark HistoryServer Spark YARN jobhistory ftp RustDesk自建服务器 rustdesk服务器 docker rustdesk 华为认证 个人博客 ping++ 宝塔面板访问不了 宝塔面板网站访问不了 宝塔面板怎么配置网站能访问 宝塔面板配置ip访问 宝塔面板配置域名访问教程 宝塔面板配置教程 HTML audio 控件组件 vue3 audio音乐播放器 Audio标签自定义样式默认 vue3播放音频文件音效音乐 自定义audio播放器样式 播放暂停调整声音大小下载文件 react next.js 部署next.js rtsp rtp VM搭建win2012 win2012应急响应靶机搭建 攻击者获取服务器权限 上传wakaung病毒 应急响应并溯源 挖矿病毒处置 应急响应综合性靶场 opcua opcda KEPServer安装 ssrf 失效的访问控制 同步 备份 建站 web3.py Headless Linux windwos防火墙 defender防火墙 win防火墙白名单 防火墙白名单效果 防火墙只允许指定应用上网 防火墙允许指定上网其它禁止 媒体 api EtherNet/IP串口网关 EIP转RS485 EIP转Modbus EtherNet/IP网关协议 EIP转RS485网关 EIP串口服务器 WebRTC opensearch helm html5 firefox 项目部署到linux服务器 项目部署过程 火绒安全 zookeeper 服务器繁忙 备选 网站 调用 示例 CDN ABAP 毕昇JDK llama.cpp db rustdesk 镜像下载 freebsd Pyppeteer numpy EtherCAT转Modbus EtherCAT转485网关 ECT转485串口服务器 ECT转Modbus485协议 ECT转Modbus串口网关 ECT转Modbus串口服务器 大模型训练/推理 推理问题 mindie css css3 c/s 密码学 minio 文件存储服务器组件 云计算面试题 个人开发 mongodb make命令 makefile文件 ios bcompare Beyond Compare GaN HEMT 氮化镓 单粒子烧毁 辐射损伤 辐照效应 PX4 cocoapods 软件工程 稳定性 看门狗 设计模式 版本 安装 并查集 leetcode EVE-NG 终端工具 远程工具 ollama api ollama外网访问 进程间通信 WSL resolv.conf GPU训练 华为鸿蒙系统 ArkTS语言 Component 生命周期 条件渲染 Image图片组件 Obsidian Dataview csrf Xinference Kali Linux 数据集 影刀 #影刀RPA# 腾讯云大模型知识引擎 实习 Claude Python基础 Python技巧 elk Logstash 日志采集 拓扑图 软链接 硬链接 wireshark okhttp 虚拟局域网 AI Agent 字节智能运维 3d 目标跟踪 OpenVINO 推理应用 ip命令 新增网卡 新增IP 启动网卡 性能调优 安全代理 docker desktop image flash-attention 报错 国产数据库 瀚高数据库 数据迁移 下载安装 scapy CPU 使用率 系统监控工具 linux 命令 Linux Vim 命名管道 客户端与服务端通信 rust 论文笔记 gru Apache OpenNLP 句子检测 分词 词性标注 核心指代解析 pillow vscode1.86 1.86版本 ssh远程连接 阻塞队列 生产者消费者模型 服务器崩坏原因 常用命令 文本命令 目录命令 微信小程序域名配置 微信小程序服务器域名 微信小程序合法域名 小程序配置业务域名 微信小程序需要域名吗 微信小程序添加域名 NAT转发 NAT Server UDP LDAP cpu 实时 使用 统信 虚拟机安装 IMM NAS Termux Samba frp 内网服务器 内网代理 内网通信 open Euler dde deepin 统信UOS string模拟实现 深拷贝 浅拷贝 经典的string类问题 三个swap 黑客 渗透测试 信息收集 kamailio sip VoIP 三级等保 服务器审计日志备份 大大通 第三代半导体 碳化硅 弹性计算 云服务器 裸金属服务器 弹性裸金属服务器 FunASR ASR DOIT 四博智联 云服务 midjourney AI写作 asm 阿里云ECS 浏览器自动化 像素流送api 像素流送UE4 像素流送卡顿 像素流送并发支持 机柜 1U 2U gunicorn 锁屏不生效 跨域请求 哈希算法 mariadb #STC8 #STM32 ecmascript 框架 商用密码产品体系 rsync openEuler 服务网格 istio 私有化 混合开发 环境安装 JDK 灵办AI HarmonyOS Next DevEco Studio rclone AList webdav fnOS 本地部署AI大模型 产品经理 软件卸载 系统清理 匿名管道 通信工程 毕业 英语 开发环境 本地环回 bind matplotlib fonts-noto-cjk jellyfin nas iNode Macos nohup后台启动 gpt-3 冯诺依曼体系 pthread 系统 node mybase 裸机装机 linux磁盘分区 裸机安装linux 裸机安装ubuntu 裸机安装kali 裸机 代码 对比 meld DiffMerge 创业创新 react native vm 蓝耘科技 元生代平台工作流 ComfyUI linux上传下载 产测工具框架 IMX6ULL 管理框架 perf openwrt USB网络共享 运维监控 minicom 串口调试工具 glibc 网络用户购物行为分析可视化平台 大数据毕业设计 Reactor 文件系统 路径解析 KVM uv ue4 着色器 ue5 searxng telnet 远程登录 springcloud Portainer搭建 Portainer使用 Portainer使用详解 Portainer详解 Portainer portainer perl 设置代理 实用教程 读写锁 指令 Typore nftables compose Java LInux ci/cd IPv4/IPv6双栈 双栈技术 网路规划设计 ensp综合实验 IPv4过渡IPv6 IPv4与IPv6 磁盘挂载 新盘添加 partedUtil 隐藏目录 管理器 通配符 autoware ros2 MAVROS 四旋翼无人机 deepseek-v3 ktransformers python高级编程 Ansible elk stack mcp-proxy mcp-inspector fastapi-mcp agent sse 传统数据库升级 银行 Linux网络编程 MCP server C/S 嵌入式实习 AD域 MS Materials Invalid Host allowedHosts intellij idea EasyConnect springboot 做raid 装系统 单一职责原则 echarts 信息可视化 网页设计 unity3d HCIE 数通 豆瓣 追剧助手 迅雷 PyTorch Hyper-V WinRM TrustedHosts 需求分析 规格说明书 LLMs PVE 磁盘监控 直播推流 外网访问 X11 Xming 大文件秒传跨域报错cors Unity Dedicated Server Host Client 无头主机 文件分享 WebDAV 高效日志打印 串口通信日志 服务器日志 系统状态监控日志 异常记录日志 雨云服务器 asp.net大文件上传 asp.net大文件上传下载 asp.net大文件上传源码 ASP.NET断点续传 asp.net上传文件夹 asp.net上传大文件 .net core断点续传 算力 rtsp服务器 rtsp server android rtsp服务 安卓rtsp服务器 移动端rtsp服务 大牛直播SDK uni-file-picker 拍摄从相册选择 uni.uploadFile H5上传图片 微信小程序上传图片 skynet 田俊楠 ECT转Modbus协议 EtherCAT转485协议 ECT转Modbus网关 C# MQTTS 双向认证 emqx 录音麦克风权限判断检测 录音功能 录音文件mp3播放 小程序实现录音及播放功能 RecorderManager 解决录音报错播放没声音问题 HP Anyware 视频监控 outlook 错误代码2603 无网络连接 2603 智能电视 element-ui 上传视频并预览视频 vue上传本地视频及进度条功能 vue2选择视频上传到服务器 upload上传视频组件插件 批量上传视频 限制单个上传视频 设计规范 华为昇腾910b3 qwen2vl 电子信息工程 GPU状态 宠物 免费学习 宠物领养 宠物平台 linux安装配置 捆绑 链接 谷歌浏览器 youtube google gmail 换源 Debian ArcTS 登录 ArcUI GridItem 微信分享 Image wxopensdk Ubuntu Server Ubuntu 22.04.5 Linux awk awk函数 awk结构 awk内置变量 awk参数 awk脚本 awk详解 Linux的基础指令 VMware安装mocOS macOS系统安装 safari trea idea protobuf 序列化和反序列化 Linux无人智慧超市 LInux多线程服务器 QT项目 LInux项目 单片机项目 ArkTs openvpn server openvpn配置教程 centos安装openvpn linux内核 lvm UOS 开机自启动 桌面快捷方式 电脑桌面出现linux图标 电脑桌面linux图标删除不了 电脑桌面Liunx图标删不掉 linux图标删不掉 Xshell Echarts图表 折线图 柱状图 异步动态数据 鸿蒙开发 可视化效果 brew 材料工程 eNSP 企业网络规划 华为eNSP 网络规划 docker compose 开发 can 线程池 DocFlow 王者荣耀 k8s集群资源管理 云原生开发 GPU环境配置 Ubuntu22 CUDA Anaconda安装 序列化反序列化 docker搭建nacos详解 docker部署nacos docker安装nacos 腾讯云搭建nacos centos7搭建nacos efficientVIT YOLOv8替换主干网络 TOLOv8 显卡驱动 增强现实 沉浸式体验 技术实现 案例分析 AR moveit 机器人运动 ai小智 语音助手 ai小智配网 ai小智教程 智能硬件 esp32语音助手 diy语音助手 etcd RBAC docker搭建pg docker搭建pgsql pg授权 postgresql使用 postgresql搭建 mq 嵌入式系统开发 miniapp 真机调试 调试 debug 断点 网络API请求调试方法 监控k8s 监控kubernetes 文心一言 rancher dubbo 大模型技术 本地部署大模型 ubuntu安装 linux入门小白 burp suite 抓包 centos-root /dev/mapper yum clean all df -h / du -sh 免密 公钥 私钥 网络编程 网易邮箱大师 宝塔面板无法访问 健康医疗 全文检索 图搜索算法 RDP 命令模式 软考设计师 中级设计师 SQL 软件设计师 智能体 autogen openai coze 源代码 linux子系统 忘记密码 RagFlow 企业风控系统 互联网反欺诈 DDoS攻击 SQL注入攻击 恶意软件和病毒攻击 lstm LSTM-SVM 时间序列预测 c EMQX 通信协议 SSH Xterminal 华为机试 VSCode 物联网开发 zotero 同步失败 代理模式 Kylin OS webstorm odoo 服务器动作 Server action DeepSeek行业应用 Heroku 网站部署 nextjs reactjs 僵尸世界大战 游戏服务器搭建 HAProxy 银河麒麟桌面操作系统 多个客户端访问 IO多路复用 TCP相关API hibernate 查询数据库服务IP地址 SQL Server 银河麒麟服务器操作系统 系统激活 XFS xfs文件系统损坏 I_O error dns是什么 如何设置电脑dns dns应该如何设置 VPS ldap 服务器数据恢复 数据恢复 存储数据恢复 raid5数据恢复 磁盘阵列数据恢复 nuxt3 中间件 iis 聊天服务器 套接字 TCP Socket DigitalOcean GPU服务器购买 GPU服务器哪里有 GPU服务器 Dell R750XS 远程看看 远程协助 MI300x 银河麒麟高级服务器 外接硬盘 Kylin 计算虚拟化 弹性裸金属 崖山数据库 YashanDB 显示管理器 lightdm gdm Java Applet URL操作 服务器建立 Socket编程 网络文件读取 创意 社区 tcp IPMITOOL 硬件管理 hugo 能力提升 面试宝典 技术 IT信息化 网络穿透 grub 版本升级 扩容 JAVA mybatis 剧本 网站搭建 serv00 博客 搭建个人相关服务器 KylinV10 麒麟操作系统 Vmware CPU 主板 电源 网卡 gradle TrueLicense Jellyfin 安防软件 飞牛 dba 互信 视频平台 录像 视频转发 视频流 硅基流动 ChatBox 笔灵AI AI工具 hive 内网渗透 靶机渗透 Netty 行情服务器 股票交易 速度慢 切换 股票量化接口 股票API接口 券商 股票交易接口api 类型 特点 vCenter服务器 ESXi主机 监控与管理 故障排除 日志记录 RK3568 百度云 矩池云 数据下载 数据传输 pyscenic 生信教程 机器人仿真 模拟仿真 HarmonyOS MateBook webgl 医疗APP开发 app开发 neo4j 数据仓库 数据库开发 database deekseek 图形渲染 alias unalias 别名 MacOS录屏软件 命令行 基础入门 飞牛NAS 飞牛OS MacBook Pro regedit 开机启动 Linux24.04 embedding Hive环境搭建 hive3环境 Hive远程模式 多层架构 解耦 Redis Desktop cmos anaconda conda配置 conda镜像源 CentOS Stream CentOS 模拟实现 历史版本 下载 Linux PID Ubuntu共享文件夹 共享目录 Linux共享文件夹 c/c++ 串口 系统开发 binder framework 源码环境 基础环境 沙盒 进程优先级 调度队列 进程切换 高级IO epoll curl wget 华为证书 HarmonyOS认证 华为证书考试 cmake MVS 海康威视相机 deep learning 动静态库 推荐算法 视觉检测 实时内核 链表 一切皆文件 js MAC 切换root jdk11安装 jdk安装 openjdk11 openjdk11安装 ceph fd 文件描述符 深度求索 私域 k8s资源监控 annotations自动化 自动化监控 监控service 监控jvm 工作流 workflow 环境配置 ShenTong AI代码编辑器 Open WebUI 可信计算技术 安全架构 怎么卸载MySQL MySQL怎么卸载干净 MySQL卸载重新安装教程 MySQL5.7卸载 Linux卸载MySQL8.0 如何卸载MySQL教程 MySQL卸载与安装 DenseNet Docker Hub docker pull daemon.json linux 命令 sed 命令 vr Cookie bat log4j WebUI DeepSeek V3 聚类 输入法 DeepSeek r1 WLAN selete 链路聚合 端口聚合 win11 windows11 ubuntu 18.04 Ubuntu22.04 开发人员主页 K8S k8s管理系统 scikit-learn qt5 客户端开发 ROS2 蓝牙 大屏端 音乐服务器 Navidrome 音流 rdp 远程服务 论文阅读 物理地址 页表 虚拟地址 postgres Dify重启后重新初始化 solr ranger MySQL8.0 超级终端 多任务操作 提高工作效率 dns 电子器件 二极管 三极管 三维重建 实验 远程过程调用 Windows环境 stm32项目 网卡的名称修改 eth0 ens33 无法解析服务器的名称或地址 SVN Server tortoise svn vasp安装 ocr Ubuntu 24.04.1 轻量级服务器 RTMP 应用层 流式接口 ecm bpm 压测 ECS TrinityCore 魔兽世界 vSphere vCenter 软件定义数据中心 sddc 恒源云 bootstrap 统信操作系统 edge浏览器 SSL 域名 Spring Security 移动云 MNN Qwen vscode 1.86 ukui 麒麟kylinos openeuler Nuxt.js 服务器部署ai模型 即时通信 NIO ux llama3 Chatglm 开源大模型 java-rocketmq cpp-httplib 联想开天P90Z装win10 swoole bonding 思科模拟器 思科 Cisco 致远OA OA服务器 服务器磁盘扩容 SWAT 配置文件 服务管理 网络共享 加解密 Yakit yaklang 执法记录仪 智能安全帽 smarteye 温湿度数据上传到服务器 Arduino HTTP SysBench 基准测试 代码调试 ipdb 技术共享 半虚拟化 硬件虚拟化 Hypervisor VMware创建虚拟机 aarch64 编译安装 HPC .net mvc断点续传 状态模式 信创 信创终端 中科方德 服务器管理 配置教程 网站管理 迁移指南 AP配网 AK配网 小程序AP配网和AK配网教程 WIFI设备配网小程序UDP开 visual studio UOS1070e Qwen2.5-VL 云桌面 微软 AD域控 证书服务器 话题通信 服务通信 windows 服务器安装 samba clickhouse 服务器部署 本地拉取打包 联机 僵尸毁灭工程 游戏联机 开服 弹性服务器 CNNs 图像分类 netty stable diffusion 程序化交易 量化交易 高频交易 海康 Webserver 异步 Qt QModbus shard web开发 教育电商 lua HTTP状态码 客户端错误 服务器端错误 API设计 数学建模 僵尸进程 trae VMware安装Ubuntu Ubuntu安装k8s sequoiaDB 黑苹果 sonoma 自动更新 OpenHarmony EMUI 回退 降级 keepalived 分析解读 prometheus数据采集 prometheus数据模型 prometheus特点 threejs 3D 交叉编译 HarmonyOS NEXT 原生鸿蒙 支付 微信支付 开放平台 etl 强制清理 强制删除 mac废纸篓 minecraft HiCar CarLife+ CarPlay QT RK3588 x64 SIGSEGV xmm0 vpn 软件构建 DIFY iperf3 带宽测试 Linux权限 权限命令 特殊权限 磁盘清理 Reactor反应堆 sublime text Linux的权限 Mac软件 AI作画 Tabs组件 TabContent TabBar TabsController 导航页签栏 滚动导航栏 Ardupilot sublime text3 macbook 可执行程序 systemctl composer firewalld Github加速 Mac上Github加速 Chrome浏览器插件 harmonyosnext PostgreSQL15数据库 SPI nano nacos isaacgym IO模型 TRAE 离线部署dify ollama下载加速 跨域 VLAN 企业网络 MDK 嵌入式开发工具 金仓数据库 2025 征文 数据库平替用金仓 DBeaver kerberos IPv4 子网掩码 公网IP 私有IP OpenSSH P2P HDLC PPI String Cytoscape CytoHubba springboot远程调试 java项目远程debug docker远程debug java项目远程调试 springboot远程 虚幻引擎 流水线 脚本式流水线 软负载 实战案例 监控k8s集群 集群内prometheus Node-Red 编程工具 流编程 proxy模式 easyui CLion OpenManus cfssl 接口优化 k8s二次开发 virtualbox NLP模型 NLP lb 协议 import save load 迁移镜像 ebpf uprobe GameFramework HybridCLR Unity编辑器扩展 自动化工具 底层实现 管道 进程程序替换 execl函数 execv函数 execvp函数 execvpe函数 putenv函数 ICMP 内存管理 考试 脚本 GRE Alist mount 挂载 网盘 UFW 线程同步 线程互斥 条件变量 Crawlee 桥接模式 windows虚拟机 虚拟机联网 动态库 GCC编译器 -fPIC -shared AI提示词优化 risc-v pppoe radius autodl kylin v10 麒麟 v10 code-server junit CORS 游戏机 pyqt Wi-Fi 深度优先 图论 并集查找 换根法 树上倍增 无桌面 黑客技术 windows日志 ISO镜像作为本地源 社交电子 iDRAC R720xd 直流充电桩 充电桩 jetty undertow sysctl.conf vm.nr_hugepages KingBase thingsboard nfs 备份SQL Server数据库 数据库备份 傲梅企业备份网络版 Erlang OTP gen_server 热代码交换 事务语义 业界资讯 xss Anolis nginx安装 linux插件下载 gateway Clion Nova ResharperC++引擎 Centos7 远程开发 sentinel 磁盘镜像 服务器镜像 服务器实时复制 实时文件备份 W5500 OLED u8g2 sqlite3 idm 矩阵 OD机试真题 服务器能耗统计 工业4.0 繁忙 解决办法 替代网站 汇总推荐 AI推理 欧标 OCPP 小智AI服务端 xiaozhi TTS 音乐库 iBMC UltraISO 上传视频至服务器代码 vue3批量上传多个视频并预览 如何实现将本地视频上传到网页 element plu视频上传 ant design vue vue3本地上传视频及预览移除 win服务器架设 windows server less 代码托管服务 云耀服务器 WebServer Web服务器 多线程下载工具 PYTHON powerbi Web应用服务器 浪潮信息 AI服务器 代码规范 zerotier 联网 easyconnect 代理 动态规划 树莓派 显示器 金仓数据库概述 金仓数据库的产品优化提案 软件开发 日志分析 系统取证 AimRT pyside6 界面 支持向量机 MinIO 机架式服务器 1U工控机 国产工控机 计算机系统 finebi 源代码管理 SoC socket slave 粘包问题 多端开发 智慧分发 应用生态 鸿蒙OS av1 电视盒子 机顶盒ROM 魔百盒刷机 VR手套 数据手套 动捕手套 动捕数据手套 信号 小艺 Pura X navicat 元服务 应用上架 玩机技巧 软件分享 软件图标 合成模型 扩散模型 图像生成 Attention Linux环境 Ark-TS语言 用户缓冲区 查看显卡进程 fuser 网络文件系统 多产物 csrutil mac恢复模式进入方法 SIP 恢复模式 Maven 用户管理 initramfs Linux内核 Grub beautifulsoup 玩游戏 大版本升 升级Ubuntu系统 Office llamafactory 微调 空间 查错 lio-sam SLAM Charles photoshop firewall 接口返回 devmem 容器技术 RockyLinux Bluetooth 配对 openssh SSH 服务 SSH Server OpenSSH Server jina ubuntu24.04.1 互联网医院 多路转接 SSH 密钥生成 SSH 公钥 私钥 生成 ssh远程登录 TCP协议 bot 浏览器开发 AI浏览器 openstack Xen seatunnel 自动化编程 烟花代码 烟花 元旦 端口 查看 ss 项目部署 网络建设与运维 免费域名 域名解析 显示过滤器 Wireshark安装 钉钉 自学笔记 小米 澎湃OS Android 解决方案 System V共享内存 进程通信 copilot 图片增强 增强数据 Mermaid 可视化图表 Zoertier 内网组网 Docker快速入门 netlink libnl3 VGG网络 卷积层 池化层 WireGuard 异地组网 ufw SystemV 计算机科学与技术 ajax su sudo sudo原理 su切换 IPv6 IPv6测试 IPv6测速 IPv6检测 IPv6查询 kubeless Linux的基础开发工具 Trae叒更新了? VM虚拟机 finalsheel hosts hosts文件管理工具 开源软件 MLLMs VLM gpt-4v openresty 工作流自动化工具 bushujiaocheng 部署教程 AI算力 租算力 到算家云 多媒体 BitTorrent 搜索 SSL证书 高效远程协作 TrustViewer体验 跨设备操作便利 智能远程控制 根服务器 飞书 SEO 内网环境 相差8小时 UTC 时间 token sas mock mock server 模拟服务器 mock服务器 Postman内置变量 Postman随机数据 聊天室 URL sqlite tailscale derp derper 中转 游戏开发 分布式训练 架构与原理 chfs ubuntu 16.04 vue-i18n 国际化多语言 vue2中英文切换详细教程 如何动态加载i18n语言包 把语言json放到服务器调用 前端调用api获取语言配置文件 wsgiref Web 服务器网关接口 服务器主板 AI芯片 LORA XCC Lenovo 北亚数据恢复 oracle数据恢复 域名服务 DHCP 符号链接 配置 VS Code 智能音箱 智能家居 AD 域管理 西门子PLC 通讯 wordpress 无法访问wordpess后台 打开网站页面错乱 linux宝塔面板 wordpress更换服务器 超融合 小番茄C盘清理 便捷易用C盘清理工具 小番茄C盘清理的优势尽显何处? 教你深度体验小番茄C盘清理 C盘变红?!不知所措? C盘瘦身后电脑会发生什么变化? saltstack MQTT协议 消息服务器 数字证书 签署证书 banner React Next.js 开源框架 授时服务 北斗授时 服务器ssl异常解决 glm4 deepseak 豆包 KIMI 腾讯元宝 高效I/O VPN wireguard 网络原理 umeditor粘贴word ueditor粘贴word ueditor复制word ueditor上传word图片 ueditor导入word ueditor导入pdf ueditor导入ppt laravel logstash AWS 火山引擎 ECS服务器 OpenGL sse_starlette Starlette Server-Sent Eve 服务器推送事件 语法 移动魔百盒 移动开发 deepseek r1 mm-wiki搭建 linux搭建mm-wiki mm-wiki搭建与使用 mm-wiki使用 mm-wiki详解 cd 目录切换 ArtTS whistle 搜狗输入法 中文输入法 内核 fork wait waitpid exit ELF加载 跨平台 archlinux kde plasma wpf retry 重试机制 子系统 NVM Node Yarn PM2 STL 流程图 mermaid wifi驱动 互联网实用编程指南 影视app mac安装软件 mac卸载软件 mac book clipboard 剪贴板 剪贴板增强 mac cocoapods macos cocoapods Mac部署 Ollama模型 Openwebui 配置教程 AI模型 进程等待 内存泄漏 开发工具 容器清理 大文件清理 空间清理 figma RoboVLM 通用机器人策略 VLA设计哲学 vlm fot robot 视觉语言动作模型 xpath定位元素 docker命令大全 ubuntu24 vivado24 yum源切换 更换国内yum源 docker部署翻译组件 docker部署deepl docker搭建deepl java对接deepl 翻译组件使用 网络搭建 神州数码 神州数码云平台 云平台 deployment daemonset statefulset cronjob 问题解决 Sealos 电视剧收视率分析与可视化平台 Helm k8s集群 生活 GeneCards OMIM TTD 静态IP client-go Masshunter 质谱采集分析软件 使用教程 科研软件 anythingllm open-webui docker国内镜像 fabric Radius 服务器时间 es h.264 AI agent 国标28181 监控接入 语音广播 流程 SDP 佛山戴尔服务器维修 佛山三水服务器维修 宕机切换 服务器宕机 流量运营 ardunio BLE IDEA VNC hexo 端口测试 服务器正确解析请求体 nosql client close Carla 配置原理 负载测试 yashandb 充电桩平台 充电桩开源平台 solidworks安装 免费 massa sui aptos sei java-zookeeper paddle lrzsz Putty 花生壳 pxe 概率论 accept h.265 anonymous issue linq 站群服务器 热键 性能监控 风扇控制软件 代理服务器 极限编程 xfce 终端 pyicu 星河版 NVIDIA cpolar 提示词 miniconda Bandizip Mac解压 Mac压缩 压缩菜单 顽固图标 启动台 IP地址 计算机基础 苹果电脑装windows系统 mac安装windows系统 mac装双系统 macbook安装win10双 mac安装win10双系统 苹果电脑上安装双系统 mac air安装win 系统内核 Linux版本 树莓派项目 RAGflow 红黑树 uni-app x 文件清理 tftp fast docker部署Python 李心怡 抗锯齿 dock 加速 达梦 DM8 集群管理 AzureDataStudio 机械臂 docker search d3d12 知行EDI 电子数据交换 知行之桥 EDI homeassistant 轮播图 代理配置 企业级DevOps podman registries 线性代数 电商平台 Unity插件 AISphereButler flink 干货分享 黑客工具 密码爆破 三次握手 mvc bigdata fpga 腾讯云服务器 轻量应用服务器 linux系统入门 linux命令 静态NAT 零日漏洞 CVE macOS win向maOS迁移数据 欧拉系统 GKI KMI AppLinking 应用间跳转 function address 函数 地址 进程池实现 direct12 C/C++ 泰山派 根文件系统 编译 烧录 嵌入式实时数据库 NVIDIA显卡安装 Ubuntu开机黑屏 零售 输入系统 webview watchtower 红黑树封装map和set 医院门诊管理系统 文件共享 BCLinux LLaMA-Factory GPUGEEK 集成 scrapy 5分钟快速学 docker入门 libreoffice 转换 恒玄BES 共享 设置 Linux指令 rxjava HBase分布式集群 HBase环境搭建 HBase安装 HBase完全分布式环境 根目录 WINCC caddy cocos2d 3dcoat PTrade QMT 量化股票 OpenManage 实时云渲染 云渲染 3D推流 LVS rtcp CPU架构 服务器cpu vue在线预览excel和编辑 vue2打开解析xls电子表格 浏览器新开页签或弹框内加载预览 文件url地址或接口二进制文档 解决网页打不开白屏报错问题 大厂程序员 硅基计算 碳基计算 认知计算 生物计算 AGI 系统架构设计 软件哲学 程序员实现财富自由 5090 显卡 AI性能 A2A OpenAI 全栈 机架式 IDC aiohttp asyncio java毕业设计 微信小程序医院预约挂号 医院预约 医院预约挂号 小程序挂号 导航栏 自定义shell当中管道的实现 匿名和命名管道 MySQL 基础指令 word转pdf charles chrome历史版本下载 chrominum下载 时间轮 路径规划 环境部署 文档 coffeescript CAD瓦片化 栅格瓦片 矢量瓦片 Web可视化 DWG解析 金字塔模型 web环境 4 - 分布式通信、分布式张量 烟雾检测 yolo检测 消防检测 springboot容器部署 springboot容器化部署 微服务容器化负载均衡配置 微服务容器多节点部署 微服务多节点部署配置负载均衡 通用环境搭建 dockerfile 影刀证书 分享 服务注册与发现 nacos容器环境变量 docker启动nacos参数 nacos镜像下载 电脑操作 CodeBuddy首席试玩官 Linux系统编程 dify部署 生成对抗网络 STP 生成树协议 PVST RSTP MSTP 防环路 网络基础 proxy_pass 电子学会 authing 自定义登录信息展示 motd 美化登录 openvino 能源 动态域名 惠普服务器 惠普ML310e Gen8 惠普ML310e Gen8V2 站群 多IP 风扇散热策略 曙光 海光 宁畅 中科可控 RNG 状态 可复现性 随机数生成 光电器件 LED 分布式数据库 集中式数据库 业务需求 选型误 客户端-服务器架构 点对点网络 服务协议 网络虚拟化 网络安全防御 科勘海洋 数据采集浮标 浮标数据采集模块 Svelte 独立服务器 Cache Aside Read/Write Write Behind 分类 proto actor actor model Actor 模型 模块测试 bug定位 缺陷管理 雾锁王国 数据库管理 qtcreator bert swift 实时日志 logs NTP服务器 能效分析 nginx默认共享目录 端口开放 ubantu 青少年编程 broadcom tar.gz tar.xz linux压缩 pipe函数 管道的大小 匿名管道的四种情况 ps命令 手动分区 本地不受DeepSeek cuda驱动 Navigation 路由跳转 鸿蒙官方推荐方式 鸿蒙原生开发 Python学习 Python编程 FS bootfs rootfs linux目录 亲测 linux/cmake linux常用命令 homebrew windows转mac ssh密匙 Mac配brew环境变量 gstreamer Eigen Autoware 辅助驾驶 云盘 安全组 zephyr Multi-Agent 蜂窝网络 频率复用 射频单元 无线协议接口RAN 主同步信号PSS Modbus TCP mapreduce 代码复审 基本指令 模板 高可用 containerd 仓库 软路由 线程安全 文件权限 CAN 多总线 Playwright MCP 多系统 Quixel Fab UE5 游戏商城 electron pnet 百度 pnetlab aac 工厂方法模式 环境 非root access blocked 破解 vmware tools 制造 流量 证书 签名 排序算法 选择排序 gitlab服务器 网络接口 时间间隔 所有接口 多网口 事件分析 边缘服务器 利旧 AI识别 DELL R730XD维修 全国服务器故障维修 raid AI导航站 eventfd 高性能 视频服务器 SFTP SFTP服务端 Metastore Catalog GRANT REVOKE OS 软件商店 livecd systemtools Ubuntu 24.04 搜狗输入法闪屏 Ubuntu中文输入法 orbslam2 ANDROID_HOME zshrc latex 更换镜像源 IT 护眼模式 Linux的进程概念 重置密码 codereview code-review 系统完整性 越狱设备 VUE Mysql PATH 命令行参数 main的三个参数 GenAI LLM 推理优化 LLM serving 机床 仿真 课件 教学 课程 九天画芯 铁电液晶 显示技术 液晶产业 技术超越 数码相机 全景相机 设备选择 实用技巧 数字空间 tvm安装 深度学习编译器 杂质 HP打印机 RHCE 冯诺依曼体系结构 智能问答 Spring AI Milvus 漏洞报告生成 定义 核心特点 优缺点 适用场景 手机 容器化 Serverless 学习路线 Web3 Telegram nmcli 网络配置 访问公司内网 安全性测试 写时拷贝 Linux的进程调度队列 活动队列 Linux的进程控制 sql注入 微信自动化工具 微信消息定时发送 回归 原子操作 AXI MinerU 权限掩码 粘滞位 量子计算 docker安装mysql win下载mysql镜像 mysql基本操作 docker登陆私仓 docker容器 deepseek与mysql muduo库 仙盟大衍灵机 东方仙盟 仙盟创梦IDE usb typec 触觉传感器 GelSight GelSightMini GelSight触觉传感器 dnf 编译器 计算机八股 CKA docker 失效 docker pull失效 docker search超时 泛型编程 Async注解 事件驱动 janus MCP 服务器 JADX-AI 插件 jQuery rtmp 物理服务器 服务器租用 云服务器租用 物理机租用 EF Core 客户端与服务器评估 查询优化 数据传输对象 查询对象模式 实时传输 服务器托管 云托管 数据中心 idc机房 linux cpu负载异常 网络IO 队列 数据库占用空间 LangGraph 模型上下文协议 MultiServerMCPC load_mcp_tools load_mcp_prompt 若依 内存不足 outofmemory Key exchange 主包过大 Windows 11 重装电脑系统 鼠标 teamspeak 进程管理 麒麟OS Modbustcp服务器 Lenovo System X GNOME Scoket labview 观察者模式 SQI iOS Trust Authentication Challenge mujoco 迁移 gerrit Unlocker C++11 lambda Windows应急响应 应急响应 webshell 网络攻击防御 网络攻击 命令键 Makefile Windows Hello 摄像头 指纹 生物识别 bpf bpfjit pcap 激光雷达 镭眸 vr看房 在线看房系统 房产营销 房产经济 三维空间 汽车 二级页表 软硬链接 文件 药品管理 HarmonyOS SDK Map Kit 地图 elementui 若依框架 English webgis cesium 服务 视频号 鸿蒙项目 数据库数据恢复 vsode lvgl8.3 lvgl9.2 lvgl lvgl安装 dnn Make nvcc A100 数字比特流 模拟信号 将二进制数据映射到模拟波形上 频谱资源 振幅频率相位 载波高频正弦波 MobileNetV3 深度强化学习 深度Q网络 Q_Learning 经验回收 Jenkins流水线 声明式流水线 笔记本电脑 dsp开发 pow 指数函数 优化 AOD-PONO-Net 图像去雾技术 NAT 软件安装 Agentic Web NLWeb 自然语言网络 微软build大会 自动化测试框架 Typescript ROS1/ROS2 Wayland 开启关闭防火墙 huggingface N8N Nginx报错413 Request Entity Too Large 的客户端请求体限制 机器人操作系统 AI控制浏览器 Browser user 集合 List 开发效率 Windmill vb authorized_keys 密钥 Spring Boot http状态码 请求协议 asp.net 低成本 网络带宽 问题排查 RHEL 去中心化 过期连接 磁盘IO iostat Featurize Mobilenet 分割 pikachu靶场 XSS漏洞 XSS DOM型XSS FreeRTOS CLI JavaScript langgraph.json 报警主机 豪恩 VISTA120 乐可利 霍尼韦尔 枫叶 时刻 矩阵乘法 3D深度学习 udp回显服务器 CSDN开发云 zipkin funasr asr 语音转文字 gpu flinkcdc 大模型应用开发 AI 应用商业化 参数服务器 分布式计算 数据并行 加密 CTE AGE debezium 数据变更 android-ndk illustrator octomap_server react Native 学习笔记 包装类 CKEditor5 桶装水小程序 在线下单送水小程序源码 桶装水送货上门小程序 送水小程序 订水线上商城 源码软件 调试方法 Valgrind 内存分析工具 实战项目 入门 精通 CTF 程序地址空间 云解析 云CDN SLS日志服务 云监控 #Linux #shell #脚本 arkts arkui 单用户模式 智能手表 Pura80 WATCH 5 Arduino下载开发板 esp32开发板 esp32-s3 记账软件 容器部署 ICMPv6 network NetworkManager unionFS OverlayFS OCI docker架构 写时复制 编程与数学 VAD 视频异常检测 VAR 视频异常推理 推理数据集 强化微调 GRPO 简单工厂模式 客户端和服务器端 BMS 储能 责任链模式 Cilium 思科实验 高级网络互联 中文分词 改行学it 麒麟kos 网络检测 ping SonarQube TraeAgent 地平线5 OSB Oracle中间件 SOA 相机标定 服务发现 信创国产化 达梦数据库 nvidia驱动 Tesla显卡 高考 MQTT Broker GMQT 客户端/服务器架构 分布式应用 三层架构 Web应用 跨平台兼容性 messages dmesg dfs js逆向 blender three.js 数字孪生 决策树 漫展 滑动验证码 反爬虫 英语六级 cs144 接口隔离原则 大学大模型可视化教学 全球气象可视化 大学气象可视化 算法协商 故障排查 Web测试 scala struts 物联网嵌入式开发实训室 物联网实训室 嵌入式开发实训室 物联网应用技术专业实训室 物理机 Java 日志框架 Log4j2 Logback SLF4J 结构化日志 企业级应用 哥sika openlayers bmap tile server gemini gemini国内访问 gemini api gemini中转搭建 Cloudflare ESP8266简单API服务器 Arduino JSON webserver pve TCP回显服务器 分布式总线 时序数据库 iotdb HarmonyOS 5开发环境 美食 FCN WebFuture OpenTiny 打包工具 pandas WinCC OT与IT SCADA 智能制造 MES 信奥 dataworks maxcompute 省份 年份 分数线 数据 最新微服务 几何绘图 三角函数 UDS Bootloader 嵌入式软件 SSM 项目实战 页面放行 迭代器模式 数字化转型 guava 局域网 实时语音识别 流式语音识别 开启黑屏 tty2 抽象工厂模式 cangjie 材质 贴图 BIO Java socket Java BIO Java NIO Java 网络编程 alphafold3 快速入门 进度条 支付宝小程序 云开发 DICOM FS100P jvm调优 LRU策略 内存增长 垃圾回收 mcp client mcp server 路由器 CUDA Toolkit 恢复 对话框showDialog showActionMenu 操作列表ActionSheet CustomDialog 文本滑动选择器弹窗 消息提示框 警告弹窗 libtorch 物理层 重构 BiSheng RustDesk 搭建服务器 AudioLM 医药 协作 cn2 带宽 数据链路层 驱动器映射 批量映射 win32wnet模块 网络驱动器映射工具 rk3588 rknn-toolkit2 更新apt 安装hadoop前的准备工作 进程状态 shell编程 华为OD机考 机考真题 需要广播的服务器数量 弹性 mysql 8 mysql 8 忘记密码