Ultralytics:解读AConv模块

前言
- 由于本人水平有限,难免出现错漏,敬请批评改正。
- 更多精彩内容,可点击进入Python日常小操作专栏、OpenCV-Python小应用专栏、YOLO系列专栏、自然语言处理专栏、人工智能混合编程实践专栏或我的个人主页查看
- YOLOs-CPP:一个免费开源的YOLO全系列C++推理库(以YOLO26为例)
- PaddleOCR:Win10上安装使用PPOCRLabel标注工具
- 目标检测:使用自己的数据集微调DEIMv2进行物体检测
- 图像分割:PyTorch从零开始实现SegFormer语义分割
- 图像超分:使用自己的数据集微调Real-ESRGAN-x4plus进行超分重建
- 图像生成:PyTorch从零开始实现一个简单的扩散模型
- Stable Diffusion:使用自己的数据集微调 Stable Diffusion 3.5 LoRA 文生图模型
- 图像超分:使用自己的数据集微调Real-ESRGAN-x2plus进行超分重建
- Anomalib:使用Anomalib 2.1.0训练自己的数据集进行异常检测
- Anomalib:在Linux服务器上安装使用Anomalib 2.1.0
- 人工智能混合编程实践:C++调用封装好的DLL进行异常检测推理
- 人工智能混合编程实践:C++调用封装好的DLL进行FP16图像超分重建(v3.0)
- 隔离系统Python:源码编译3.11.8到自定义目录(含PGO性能优化)
- 在线机的Python环境迁移到离线机上
- Nuitka 将 Python 脚本封装为 .pyd 或 .so 文件
- Ultralytics:使用 YOLO11 进行速度估计
- Ultralytics:使用 YOLO11 进行物体追踪
- Ultralytics:使用 YOLO11 进行物体计数
- Ultralytics:使用 YOLO11 进行目标打码
- 人工智能混合编程实践:C++调用Python ONNX进行YOLOv8推理
- 人工智能混合编程实践:C++调用封装好的DLL进行YOLOv8实例分割
- 人工智能混合编程实践:C++调用Python ONNX进行图像超分重建
- 人工智能混合编程实践:C++调用Python AgentOCR进行文本识别
- 通过计算实例简单地理解PatchCore异常检测
- Python将YOLO格式实例分割数据集转换为COCO格式实例分割数据集
- YOLOv8 Ultralytics:使用Ultralytics框架训练RT-DETR实时目标检测模型
- 基于DETR的人脸伪装检测
- YOLOv7训练自己的数据集(口罩检测)
- YOLOv8训练自己的数据集(足球检测)
- YOLOv5:TensorRT加速YOLOv5模型推理
- YOLOv5:IoU、GIoU、DIoU、CIoU、EIoU
- 玩转Jetson Nano(五):TensorRT加速YOLOv5目标检测
- YOLOv5:添加SE、CBAM、CoordAtt、ECA注意力机制
- YOLOv5:yolov5s.yaml配置文件解读、增加小目标检测层
- Python将COCO格式实例分割数据集转换为YOLO格式实例分割数据集
- YOLOv5:使用7.0版本训练自己的实例分割模型(车辆、行人、路标、车道线等实例分割)
- 使用Kaggle GPU资源免费体验Stable Diffusion开源项目
- Stable Diffusion:在服务器上部署使用Stable Diffusion WebUI进行AI绘图(v2.0)
- Stable Diffusion:使用自己的数据集微调训练LoRA模型(v2.0)
相关介绍
Ultralytics 简介
Ultralytics 基于多年的计算机视觉和人工智能基础研究,创建了最先进的 (SOTA) YOLO 模型。我们的模型不断更新性能和灵活性,快速、准确且易于使用。他们擅长对象检测、跟踪、实例分割、语义分割、图像分类和姿势估计任务。
前提条件
- 熟悉Python、Pytorch
实验环境
bash
Package Version
------------------------ ------------
Python 3.11.8
absl-py 2.4.0
accelerate 1.13.0
annotated-doc 0.0.4
anyio 4.13.0
calflops 0.3.2
certifi 2026.4.22
charset-normalizer 3.4.7
click 8.3.3
colorama 0.4.6
contourpy 1.3.3
cycler 0.12.1
filelock 3.29.0
flatbuffers 25.12.19
fonttools 4.62.1
fsspec 2026.4.0
grpcio 1.80.0
h11 0.16.0
hf-xet 1.5.0
httpcore 1.0.9
httpx 0.28.1
huggingface_hub 1.14.0
idna 3.15
Jinja2 3.1.6
kiwisolver 1.5.0
Markdown 3.10.2
markdown-it-py 4.2.0
MarkupSafe 3.0.3
matplotlib 3.10.9
mdurl 0.1.2
ml_dtypes 0.5.0
mpmath 1.3.0
networkx 3.6.1
numpy 1.26.4
nvidia-cublas-cu12 12.8.3.14
nvidia-cuda-cupti-cu12 12.8.57
nvidia-cuda-nvrtc-cu12 12.8.61
nvidia-cuda-runtime-cu12 12.8.57
nvidia-cudnn-cu12 9.7.1.26
nvidia-cufft-cu12 11.3.3.41
nvidia-cufile-cu12 1.13.0.11
nvidia-curand-cu12 10.3.9.55
nvidia-cusolver-cu12 11.7.2.55
nvidia-cusparse-cu12 12.5.7.53
nvidia-cusparselt-cu12 0.6.3
nvidia-nccl-cu12 2.26.2
nvidia-nvjitlink-cu12 12.8.61
nvidia-nvtx-cu12 12.8.55
onnx 1.19.0
onnxruntime-gpu 1.26.0
onnxslim 0.1.94
opencv-python 4.6.0.66
packaging 26.2
pillow 12.2.0
pip 24.0
polars 1.40.1
polars-runtime-32 1.40.1
protobuf 7.34.1
psutil 7.2.2
pycocotools 2.0.11
Pygments 2.20.0
pyparsing 3.3.2
python-dateutil 2.9.0.post0
PyYAML 6.0.3
regex 2026.5.9
requests 2.34.1
rich 15.0.0
safetensors 0.7.0
scipy 1.16.0
setuptools 65.5.0
shellingham 1.5.4
six 1.17.0
sympy 1.14.0
tabulate 0.10.0
tensorboard 2.20.0
tensorboard-data-server 0.7.2
tokenizers 0.22.2
torch 2.7.1+cu128
torchaudio 2.7.1+cu128
torchvision 0.22.1+cu128
tqdm 4.67.3
transformers 5.8.1
triton 3.3.1
typer 0.25.1
typing_extensions 4.15.0
ultralytics 8.4.58
ultralytics-thop 2.0.19
urllib3 2.7.0
Werkzeug 3.1.8
AConv(平均池化-卷积模块)
AConv 是一种轻量级的 下采样模块 ,它通过 平均池化(AvgPool2d) 后接 步长为 2 的卷积,实现特征图的空间降维和通道变换。该模块的设计可能旨在引入额外的平滑效果,同时减少计算量,适用于需要逐步降低分辨率并增加通道数的深度网络。
代码实现
python
import cv2
import math
import torch
import numpy as np
import matplotlib.pyplot as plt
from torch import nn
def autopad(k, p=None, d=1): # kernel, padding, dilation
"""Pad to 'same' shape outputs."""
if d > 1:
k = d * (k - 1) + 1 if isinstance(k, int) else [d * (x - 1) + 1 for x in k] # actual kernel-size
if p is None:
p = k // 2 if isinstance(k, int) else [x // 2 for x in k] # auto-pad
return p
class Conv(nn.Module):
"""Standard convolution module with batch normalization and activation.
Attributes:
conv (nn.Conv2d): Convolutional layer.
bn (nn.BatchNorm2d): Batch normalization layer.
act (nn.Module): Activation function layer.
default_act (nn.Module): Default activation function (SiLU).
"""
default_act = nn.SiLU() # default activation
def __init__(self, c1, c2, k=1, s=1, p=None, g=1, d=1, act=True):
"""Initialize Conv layer with given parameters.
Args:
c1 (int): Number of input channels.
c2 (int): Number of output channels.
k (int): Kernel size.
s (int): Stride.
p (int, optional): Padding.
g (int): Groups.
d (int): Dilation.
act (bool | nn.Module): Activation function.
"""
super().__init__()
self.conv = nn.Conv2d(c1, c2, k, s, autopad(k, p, d), groups=g, dilation=d, bias=False)
self.bn = nn.BatchNorm2d(c2)
self.act = self.default_act if act is True else act if isinstance(act, nn.Module) else nn.Identity()
def forward(self, x):
"""Apply convolution, batch normalization and activation to input tensor.
Args:
x (torch.Tensor): Input tensor.
Returns:
(torch.Tensor): Output tensor.
"""
return self.act(self.bn(self.conv(x)))
def forward_fuse(self, x):
"""Apply convolution and activation without batch normalization.
Args:
x (torch.Tensor): Input tensor.
Returns:
(torch.Tensor): Output tensor.
"""
return self.act(self.conv(x))
class AConv(nn.Module):
"""AConv."""
def __init__(self, c1: int, c2: int):
"""Initialize AConv module.
Args:
c1 (int): Input channels.
c2 (int): Output channels.
"""
super().__init__()
self.cv1 = Conv(c1, c2, 3, 2, 1)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""Forward pass through AConv layer."""
x = torch.nn.functional.avg_pool2d(x, 2, 1, 0, False, True)
return self.cv1(x)
功能
- 平均池化:对输入特征图应用 2×2 平均池化,步长为 1,无填充,输出尺寸减少 1(H-1, W-1)。这相当于在空间上轻微平滑并削减边缘像素。
- 卷积下采样 :经过池化后,使用 3×3 卷积(步长 2,填充 1)对特征进行变换和降采样,将通道从
c1映射到c2,同时空间尺寸进一步减半(近似)。 - 组合效果 :整体输出尺寸约为输入尺寸的一半(但略有差异),通道数变为
c2,实现了特征提取与下采样的结合。
初始化参数
| 参数 | 类型 | 说明 |
|---|---|---|
c1 |
int | 输入通道数 |
c2 |
int | 输出通道数 |
self.cv1是一个Conv模块,包含 3×3 卷积、BatchNorm 和 SiLU 激活,步长 2,填充 1。
前向方法
forward(x):输入x([B, c1, H, W]),输出[B, c2, H_out, W_out]。
计算流程:
x = F.avg_pool2d(x, kernel_size=2, stride=1, padding=0)→ 尺寸变为[B, c1, H-1, W-1]。y = self.cv1(x)→ 卷积输出尺寸为H_out = floor((H-1 + 2*1 - 3)/2) + 1 = floor((H-2)/2) + 1,W_out同理。
输出尺寸公式
设输入尺寸为 H \\times W ,则:
H p o o l = H − 1 , W p o o l = W − 1 H_{pool} = H - 1,\quad W_{pool} = W - 1 Hpool=H−1,Wpool=W−1
H o u t = ⌊ H p o o l + 2 × 1 − 3 2 ⌋ + 1 = ⌊ H − 2 2 ⌋ + 1 H_{out} = \left\lfloor \frac{H_{pool} + 2 \times 1 - 3}{2} \right\rfloor + 1 = \left\lfloor \frac{H - 2}{2} \right\rfloor + 1 Hout=⌊2Hpool+2×1−3⌋+1=⌊2H−2⌋+1
W o u t = ⌊ W − 2 2 ⌋ + 1 W_{out} = \left\lfloor \frac{W - 2}{2} \right\rfloor + 1 Wout=⌊2W−2⌋+1
- 若 H H H 为偶数 2n,则 H o u t = n H_{out} = n Hout=n
- 若 H H H 为奇数 2n+1,则 H o u t = n H_{out} = n Hout=n(因为
(2n-1)//2 = n-1,+1 = n) - 因此,输出尺寸恒为 ⌊ H / 2 ⌋ × ⌊ W / 2 ⌋ \lfloor H/2 \rfloor \times \lfloor W/2 \rfloor ⌊H/2⌋×⌊W/2⌋。
与直接使用步长为 2 的 3×3 卷积(填充 1)的输出尺寸 floor((H+2*1-3)/2)+1 = floor((H-1)/2)+1 相比,本模块输出略小(当 H 为偶数时相同,为奇数时也相同?检查:直接卷积输出:H偶2n -> (2n-1)//2 +1 = n-1+1=n,相同;H奇2n+1 -> (2n)//2 +1 = n+1,而AConv为n,所以奇数是AConv小1)。所以AConv在奇数尺寸时输出会小1。
使用示例

python
if __name__ == '__main__':
# 1. 随机输入
x = torch.randn(1, 32, 64, 64)
# 2. 创建 AConv(输入32,输出64)
aconv = AConv(c1=32, c2=64)
# 3. 前向传播
with torch.no_grad():
out = aconv(x)
print("输入形状:", x.shape) # [1, 32, 64, 64]
print("输出形状:", out.shape) # [1, 64, 32, 32](64/2=32)
# 4. 使用真实图像演示(扩展为多通道)
img_path = "cat_640x640.png"
img_bgr = cv2.imread(img_path)
if img_bgr is not None:
img_gray = cv2.cvtColor(cv2.resize(img_bgr, (64, 64)), cv2.COLOR_BGR2GRAY)
img_tensor = torch.from_numpy(img_gray).float().unsqueeze(0).unsqueeze(0) # [1,1,64,64]
# 扩展通道至32
x_img = img_tensor.repeat(1, 32, 1, 1)
aconv_img = AConv(c1=32, c2=32)
with torch.no_grad():
out_img = aconv_img(x_img)
inp_ch0 = x_img[0, 0].cpu().numpy()
out_ch0 = out_img[0, 0].cpu().numpy()
def norm(arr):
return (arr - arr.min()) / (arr.max() - arr.min() + 1e-8)
plt.figure(figsize=(12, 5), constrained_layout=True)
plt.subplot(1, 3, 1)
plt.imshow(img_gray, cmap='gray')
plt.title("Original Gray")
plt.axis("off")
plt.subplot(1, 3, 2)
plt.imshow(norm(inp_ch0), cmap='gray')
plt.title("Input Ch0")
plt.axis("off")
plt.subplot(1, 3, 3)
plt.imshow(norm(out_ch0), cmap='gray')
plt.title("AConv Output Ch0")
plt.axis("off")
plt.savefig("aconv_demo.png", dpi=150)
print("可视化已保存为 aconv_demo.png")

输出示例:
输入形状: torch.Size([1, 32, 64, 64])
输出形状: torch.Size([1, 64, 32, 32])
可视化已保存为 aconv_demo.png
流程示意图
#mermaid-svg-Zs9fOrklBpS9GqeI{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Zs9fOrklBpS9GqeI .error-icon{fill:#552222;}#mermaid-svg-Zs9fOrklBpS9GqeI .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Zs9fOrklBpS9GqeI .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Zs9fOrklBpS9GqeI .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Zs9fOrklBpS9GqeI .marker.cross{stroke:#333333;}#mermaid-svg-Zs9fOrklBpS9GqeI svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Zs9fOrklBpS9GqeI p{margin:0;}#mermaid-svg-Zs9fOrklBpS9GqeI .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI .cluster-label text{fill:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI .cluster-label span{color:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI .cluster-label span p{background-color:transparent;}#mermaid-svg-Zs9fOrklBpS9GqeI .label text,#mermaid-svg-Zs9fOrklBpS9GqeI span{fill:#333;color:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI .node rect,#mermaid-svg-Zs9fOrklBpS9GqeI .node circle,#mermaid-svg-Zs9fOrklBpS9GqeI .node ellipse,#mermaid-svg-Zs9fOrklBpS9GqeI .node polygon,#mermaid-svg-Zs9fOrklBpS9GqeI .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Zs9fOrklBpS9GqeI .rough-node .label text,#mermaid-svg-Zs9fOrklBpS9GqeI .node .label text,#mermaid-svg-Zs9fOrklBpS9GqeI .image-shape .label,#mermaid-svg-Zs9fOrklBpS9GqeI .icon-shape .label{text-anchor:middle;}#mermaid-svg-Zs9fOrklBpS9GqeI .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Zs9fOrklBpS9GqeI .rough-node .label,#mermaid-svg-Zs9fOrklBpS9GqeI .node .label,#mermaid-svg-Zs9fOrklBpS9GqeI .image-shape .label,#mermaid-svg-Zs9fOrklBpS9GqeI .icon-shape .label{text-align:center;}#mermaid-svg-Zs9fOrklBpS9GqeI .node.clickable{cursor:pointer;}#mermaid-svg-Zs9fOrklBpS9GqeI .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Zs9fOrklBpS9GqeI .arrowheadPath{fill:#333333;}#mermaid-svg-Zs9fOrklBpS9GqeI .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Zs9fOrklBpS9GqeI .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Zs9fOrklBpS9GqeI .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Zs9fOrklBpS9GqeI .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Zs9fOrklBpS9GqeI .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Zs9fOrklBpS9GqeI .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Zs9fOrklBpS9GqeI .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Zs9fOrklBpS9GqeI .cluster text{fill:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI .cluster span{color:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-Zs9fOrklBpS9GqeI .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Zs9fOrklBpS9GqeI rect.text{fill:none;stroke-width:0;}#mermaid-svg-Zs9fOrklBpS9GqeI .icon-shape,#mermaid-svg-Zs9fOrklBpS9GqeI .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Zs9fOrklBpS9GqeI .icon-shape p,#mermaid-svg-Zs9fOrklBpS9GqeI .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Zs9fOrklBpS9GqeI .icon-shape .label rect,#mermaid-svg-Zs9fOrklBpS9GqeI .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Zs9fOrklBpS9GqeI .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Zs9fOrklBpS9GqeI .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Zs9fOrklBpS9GqeI :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 输入 x (B, c1, H, W)
AvgPool2d
kernel=2, stride=1, padding=0
池化后 (B, c1, H-1, W-1)
Conv 3x3, stride=2, padding=1
c1 → c2
输出 (B, c2, ⌊H/2⌋, ⌊W/2⌋)
代码解读
__init__:定义一个Conv层self.cv1,包含 3×3 卷积(步长 2,填充 1)、BN 和 SiLU 激活。该层负责通道变换和下采样。forward:- 使用
torch.nn.functional.avg_pool2d对输入进行平均池化,kernel_size=2, stride=1, padding=0,ceil_mode=False,count_include_pad=True(默认)。这会在每个空间维度上减少 1 个像素。 - 将池化结果送入
self.cv1进行卷积。
- 使用
注意事项
- 输出尺寸 :对于奇数尺寸输入,输出尺寸为
floor(H/2),比常规步长为 2 的卷积(输出为floor((H-1)/2)+1)小 1。使用前需确认网络后续层能适应这种尺寸变化。 - 池化效果:平均池化会平滑特征,可能丢失部分细节,但有助于提高平移不变性。
- 参数数量:仅包含一个卷积层,参数轻量,适合作为下采样模块。
- 激活函数 :
Conv默认使用 SiLU,但可根据需要修改。 - 与标准下采样对比 :相比直接用
Conv(c1, c2, 3, 2, 1),AConv 多了一次平均池化,计算量略增,但可能带来不同感受野的混合。
优缺点
优点
- 轻量高效:仅一个卷积层,参数量少,推理速度快。
- 平滑降采样:平均池化可抑制噪声,提供更稳定的特征。
- 通道变换与下采样结合:一步完成,便于网络堆叠。
缺点
- 输出尺寸特殊:奇数输入尺寸下输出比预期小,可能需调整网络设计。
- 信息损失:平均池化可能会丢失尖锐的边缘信息。
- 缺乏多尺度:仅单一池化核,无法自适应不同尺度。
在构建轻量级网络时,AConv 可作为下采样模块的替代方案,尤其适合需要平滑特征的场景(如分割任务)。使用时需注意尺寸计算,确保与后续层兼容。
参考文献
1 https://docs.ultralytics.com/
2 https://github.com/ultralytics/ultralytics.git
- 由于本人水平有限,难免出现错漏,敬请批评改正。
- 更多精彩内容,可点击进入Python日常小操作专栏、OpenCV-Python小应用专栏、YOLO系列专栏、自然语言处理专栏、人工智能混合编程实践专栏或我的个人主页查看
- YOLOs-CPP:一个免费开源的YOLO全系列C++推理库(以YOLO26为例)
- PaddleOCR:Win10上安装使用PPOCRLabel标注工具
- 目标检测:使用自己的数据集微调DEIMv2进行物体检测
- 图像分割:PyTorch从零开始实现SegFormer语义分割
- 图像超分:使用自己的数据集微调Real-ESRGAN-x4plus进行超分重建
- 图像生成:PyTorch从零开始实现一个简单的扩散模型
- Stable Diffusion:使用自己的数据集微调 Stable Diffusion 3.5 LoRA 文生图模型
- 图像超分:使用自己的数据集微调Real-ESRGAN-x2plus进行超分重建
- Anomalib:使用Anomalib 2.1.0训练自己的数据集进行异常检测
- Anomalib:在Linux服务器上安装使用Anomalib 2.1.0
- 人工智能混合编程实践:C++调用封装好的DLL进行异常检测推理
- 人工智能混合编程实践:C++调用封装好的DLL进行FP16图像超分重建(v3.0)
- 隔离系统Python:源码编译3.11.8到自定义目录(含PGO性能优化)
- 在线机的Python环境迁移到离线机上
- Nuitka 将 Python 脚本封装为 .pyd 或 .so 文件
- Ultralytics:使用 YOLO11 进行速度估计
- Ultralytics:使用 YOLO11 进行物体追踪
- Ultralytics:使用 YOLO11 进行物体计数
- Ultralytics:使用 YOLO11 进行目标打码
- 人工智能混合编程实践:C++调用Python ONNX进行YOLOv8推理
- 人工智能混合编程实践:C++调用封装好的DLL进行YOLOv8实例分割
- 人工智能混合编程实践:C++调用Python ONNX进行图像超分重建
- 人工智能混合编程实践:C++调用Python AgentOCR进行文本识别
- 通过计算实例简单地理解PatchCore异常检测
- Python将YOLO格式实例分割数据集转换为COCO格式实例分割数据集
- YOLOv8 Ultralytics:使用Ultralytics框架训练RT-DETR实时目标检测模型
- 基于DETR的人脸伪装检测
- YOLOv7训练自己的数据集(口罩检测)
- YOLOv8训练自己的数据集(足球检测)
- YOLOv5:TensorRT加速YOLOv5模型推理
- YOLOv5:IoU、GIoU、DIoU、CIoU、EIoU
- 玩转Jetson Nano(五):TensorRT加速YOLOv5目标检测
- YOLOv5:添加SE、CBAM、CoordAtt、ECA注意力机制
- YOLOv5:yolov5s.yaml配置文件解读、增加小目标检测层
- Python将COCO格式实例分割数据集转换为YOLO格式实例分割数据集
- YOLOv5:使用7.0版本训练自己的实例分割模型(车辆、行人、路标、车道线等实例分割)
- 使用Kaggle GPU资源免费体验Stable Diffusion开源项目
- Stable Diffusion:在服务器上部署使用Stable Diffusion WebUI进行AI绘图(v2.0)
- Stable Diffusion:使用自己的数据集微调训练LoRA模型(v2.0)