Yolov8的詳解與實戰-深度學習目標檢測

Yolov8的詳解與實戰-

添加圖片注釋,不超過 140 字(可選)

文章目錄
摘要
模型詳解
C2F模塊
Loss
head部分
模型實戰
訓練COCO數據集
下載數據集
COCO轉yolo格式數據集(適用V4,V5,V6,V7,V8)
配置yolov8環境
訓練
測試
訓練自定義數據集
Labelme數據集

摘要

YOLOv8 是 ultralytics 公司在 2023 年 1月 10 號開源的 YOLOv5 的下一個重大更新版本,目前支持圖像分類、物體檢測和實例分割任務,鑒于Yolov5的良好表現,Yolov8在還沒有開源時就收到了用戶的廣泛關注。yolov8的整體架構如下:

添加圖片注釋,不超過 140 字(可選)

Yolov8的改進之處有以下幾個地方:

Backbone:使用的依舊是CSP的思想,將YOLOv5中的C3模塊被替換成了C2f模塊,實現了進一步的輕量化,同時YOLOv8依舊使用了YOLOv5等架構中使用的SPPF模塊;
PAN-FPN:YOLOv8依舊使用了PAN的思想,不同的是YOLOv8將YOLOv5中PAN-FPN上采樣階段中的卷積結構刪除了,同時也將C3模塊替換為了C2f模塊;
Decoupled-Head:這一點源自YOLOX;分類和回歸兩個任務的head不再共享參數,YoloV8也借鑒了這樣的head設計。
Anchor-Free:YOLOv8拋棄了以往的Anchor-Base,使用了Anchor-Free的思想;
損失函數:YOLOv8使用VFL Loss作為分類損失,使用DFL Loss+CIOU Loss作為分類損失;
樣本匹配:YOLOv8拋棄了以往的IOU匹配或者單邊比例的分配方式,而是使用了Task-Aligned Assigner匹配方式。
yolov8是個模型簇,從小到大包括:yolov8n、yolov8s、yolov8m、yolov8l、yolov8x等。模型參數、運行速度、參數量等詳見下表:

添加圖片注釋,不超過 140 字(可選)

對比yolov5

,如下表:

添加圖片注釋,不超過 140 字(可選)

mAP和參數量都上升了不少,具體的感受還是要親自實踐一番。
這篇文章首先對YoloV8做詳細的講解,然后實現對COCO數據集的訓練和測試,最后,實現自定義數據集的訓練和測試。

希望能幫助到朋友們!

分割的結果

添加圖片注釋,不超過 140 字(可選)

分類的結果

添加圖片注釋,不超過 140 字(可選)

模型詳解

C2F模塊
yolov8將yolov5中的C3模塊換成了C2F模型,我們先了解一下C3模塊,如圖:

添加圖片注釋,不超過 140 字(可選)

C3模塊,其主要是借助CSPNet提取分流的思想,同時結合殘差結構的思想,設計了所謂的C3 Block,這里的CSP主分支梯度模塊為BottleNeck模塊,堆疊的個數由參數n來進行控制,不同的模型,n的個數也不相同。C3的pytorch代碼如下:
class C3(nn.Module):# CSP Bottleneck with 3 convolutionsdef init(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ch_out, number, shortcut, groups, expansionsuper().init()c_ = int(c2 * e) # hidden channelsself.cv1 = Conv(c1, c_, 1, 1)self.cv2 = Conv(c1, c_, 1, 1)self.cv3 = Conv(2 * c_, c2, 1) # optional act=FReLU(c2)self.m = nn.Sequential(*(Bottleneck(c_, c_, shortcut, g, k=((1, 1), (3, 3)), e=1.0) for _ in range(n)))def forward(self, x):return self.cv3(torch.cat((self.m(self.cv1(x)), self.cv2(x)), 1))
接下來,我們一起學習C2F模塊,先經過一個Conv,然后使用chunk函數將out平均拆分成兩個向量,然后保存到list中,將后半部分輸入到Bottleneck Block里面,Bottleneck Block里面有n個Bottleneck,將每個Bottleneck的輸出都追加list中,有n個,所以拼接之后的out等于0.5?(n+2)。然后經過一個Conv輸出,所以輸出為h×w×c_out。如下圖:

添加圖片注釋,不超過 140 字(可選)

如果還是比較難懂,我將具體的數據代入圖中,得出下圖:

添加圖片注釋,不超過 140 字(可選)

Loss

對于YOLOv8,其分類損失為VFL Loss,其回歸損失為CIOU Loss+DFL的形式,這里Reg_max默認為16。
VFL主要改進是提出了非對稱的加權操作,FL和QFL都是對稱的。而非對稱加權的思想來源于論文PISA,該論文指出首先正負樣本有不平衡問題,即使在正樣本中也存在不等權問題,因為mAP的計算是主正樣本。

添加圖片注釋,不超過 140 字(可選)

q是label,正樣本時候q為bbox和gt的IoU,負樣本時候q=0,當為正樣本時候其實沒有采用FL,而是普通的BCE,只不過多了一個自適應IoU加權,用于突出主樣本。而為負樣本時候就是標準的FL了。可以明顯發現VFL比QFL更加簡單,主要特點是正負樣本非對稱加權、突出正樣本為主樣本。
針對這里的DFL(Distribution Focal Loss),其主要是將框的位置建模成一個 general distribution,讓網絡快速的聚焦于和目標位置距離近的位置的分布。

添加圖片注釋,不超過 140 字(可選)

DFL 能夠讓網絡更快地聚焦于目標 y 附近的值,增大它們的概率;
DFL的含義是以交叉熵的形式去優化與標簽y最接近的一左一右2個位置的概率,從而讓網絡更快的聚焦到目標位置的鄰近區域的分布;也就是說學出來的分布理論上是在真實浮點坐標的附近,并且以線性插值的模式得到距離左右整數坐標的權重。
head部分
相對于YOLOv5,YOLOv8將Head里面C3模塊替換為了C2f,將上采樣之前的1×1卷積去除了,將Backbone不同階段輸出的特征直接送入了上采樣操作。通過下圖對比可以看出差別:

添加圖片注釋,不超過 140 字(可選)

添加圖片注釋,不超過 140 字(可選)

YOLOv8則是使用了Decoupled-Head,同時由于使用了DFL 的思想,因此回歸頭的通道數也變成了4*reg_max的形式:

添加圖片注釋,不超過 140 字(可選)

模型實戰

訓練COCO數據集
本次使用2017版本的COCO數據集作為例子,演示如何使用YoloV8訓練和預測。
下載數據集
Images:
2017 Train images [118K/18GB] :http://images.cocodataset.org/zips/train2017.zip
2017 Val images [5K/1GB]:http://images.cocodataset.org/zips/val2017.zip
2017 Test images [41K/6GB]:http://images.cocodataset.org/zips/unlabeled2017.zip
Annotations:
2017 annotations_trainval2017 [241MB]:http://images.cocodataset.org/annotations/annotations_trainval2017.zip
COCO轉yolo格式數據集(適用V4,V5,V6,V7,V8)
最初的研究論文中,COCO中有91個對象類別。然而,在2014年的第一次發布中,僅發布了80個標記和分割圖像的對象類別。2014年發布之后,2017年發布了后續版本。詳細的類別如下:
ID
OBJECT (PAPER)
OBJECT (2014 REL.)
OBJECT (2017 REL.)
SUPER CATEGORY
1
person
person
person
person
2
bicycle
bicycle
bicycle
vehicle
3
car
car
car
vehicle
4
motorcycle
motorcycle
motorcycle
vehicle
5
airplane
airplane
airplane
vehicle
6
bus
bus
bus
vehicle
7
train
train
train
vehicle
8
truck
truck
truck
vehicle
9
boat
boat
boat
vehicle
10
trafficlight
traffic light
traffic light
outdoor
11
fire hydrant
fire hydrant
fire hydrant
outdoor
12
street
sign

13
stop sign
stop sign
stop sign
outdoor
14
parking meter
parking meter
parking meter
outdoor
15
bench
bench
bench
outdoor
16
bird
bird
bird
animal
17
cat
cat
cat
animal
18
dog
dog
dog
animal
19
horse
horse
horse
animal
20
sheep
sheep
sheep
animal
21
cow
cow
cow
animal
22
elephant
elephant
elephant
animal
23
bear
bear
bear
animal
24
zebra
zebra
zebra
animal
25
giraffe
giraffe
giraffe
animal
26
hat

accessory
27
backpack
backpack
backpack
accessory
28
umbrella
umbrella
umbrella
accessory
29
shoe

accessory
30
eye glasses

accessory
31
handbag
handbag
handbag
accessory
32
tie
tie
tie
accessory
33
suitcase
suitcase
suitcase
accessory
34
frisbee
frisbee
frisbee
sports
35
skis
skis
skis
sports
36
snowboard
snowboard
snowboard
sports
37
sports ball
sports ball
sports ball
sports
38
kite
kite
kite
sports
39
baseball bat
baseball bat
baseball bat
sports
40
baseball glove
baseball glove
baseball glove
sports
41
skateboard
skateboard
skateboard
sports
42
surfboard
surfboard
surfboard
sports
43
tennis racket
tennis racket
tennis racket
sports
44
bottle
bottle
bottle
kitchen
45
plate

kitchen
46
wine glass
wine glass
wine glass
kitchen
47
cup
cup
cup
kitchen
48
fork
fork
fork
kitchen
49
knife
knife
knife
kitchen
50
spoon
spoon
spoon
kitchen
51
bowl
bowl
bowl
kitchen
52
banana
banana
banana
food
53
apple
apple
apple
food
54
sandwich
sandwich
sandwich
food
55
orange
orange
orange
food
56
broccoli
broccoli
broccoli
food
57
carrot
carrot
carrot
food
58
hot dog
hot dog
hot dog
food
59
pizza
pizza
pizza
food
60
donut
donut
donut
food
61
cake
cake
cake
food
62
chair
chair
chair
furniture
63
couch
couch
couch
furniture
64
potted plant
potted plant
potted plant
furniture
65
bed
bed
bed
furniture
66
mirror

furniture
67
dining table
dining table
dining table
furniture
68
window

furniture
69
desk

furniture
70
toilet
toilet
toilet
furniture
71
door

furniture
72
tv
tv
tv
electronic
73
laptop
laptop
laptop
electronic
74
mouse
mouse
mouse
electronic
75
remote
remote
remote
electronic
76
keyboard
keyboard
keyboard
electronic
77
cell phone
cell phone
cell phone
electronic
78
microwave
microwave
microwave
appliance
79
oven
oven
oven
appliance
80
toaster
toaster
toaster
appliance
81
sink
sink
sink
appliance
82
refrigerator
refrigerator
refrigerator
appliance
83
blender

appliance
84
book
book
book
indoor
85
clock
clock
clock
indoor
86
vase
vase
vase
indoor
87
scissors
scissors
scissors
indoor
88
teddy bear
teddy bear
teddy bear
indoor
89
hair drier
hair drier
hair drier
indoor
90
toothbrush
toothbrush
toothbrush
indoor
91
hair brush

indoor
可以看到,2014年和2017年發布的對象列表是相同的,它們是論文中最初91個對象類別中的80個對象。所以在轉換的時候,要重新對類別做映射,映射函數如下:
def coco91_to_coco80_class(): # converts 80-index (val2014) to 91-index (paper)# https://tech.amikelive.com/node-718/what-object-categories-labels-are-in-coco-dataset/# a = np.loadtxt(‘data/coco.names’, dtype=‘str’, delimiter=‘\n’)# b = np.loadtxt(‘data/coco_paper.names’, dtype=‘str’, delimiter=‘\n’)# x1 = [list(a[i] == b).index(True) + 1 for i in range(80)] # darknet to coco# x2 = [list(b[i] == a).index(True) if any(b[i] == a) else None for i in range(91)] # coco to darknetx = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, None, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, None, 24, 25, None,None, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, None, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,51, 52, 53, 54, 55, 56, 57, 58, 59, None, 60, None, None, 61, None, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,None, 73, 74, 75, 76, 77, 78, 79, None]return x
接下來,開始格式轉換,工程的目錄如下:

添加圖片注釋,不超過 140 字(可選)

coco:存放解壓后的數據集。
-out:保存輸出結果。
-coco2yolo.py:轉換腳本。
轉換代碼如下:
import json
import glob
import os
import shutil
from pathlib import Path
import numpy as np
from tqdm import tqdmdef make_folders(path=‘…/out/’):# Create foldersif os.path.exists(path):shutil.rmtree(path) # delete output folderos.makedirs(path) # make new output folderos.makedirs(path + os.sep + ‘labels’) # make new labels folderos.makedirs(path + os.sep + ‘images’) # make new labels folderreturn pathdef convert_coco_json(json_dir=‘./coco/annotations_trainval2017/annotations/’):jsons = glob.glob(json_dir + ‘*.json’)coco80 = coco91_to_coco80_class()# Import jsonfor json_file in sorted(jsons):fn = ‘out/labels/%s/’ % Path(json_file).stem.replace(‘instances_’, ‘’) # folder namefn_images = ‘out/images/%s/’ % Path(json_file).stem.replace(‘instances_’, ‘’) # folder nameos.makedirs(fn,exist_ok=True)os.makedirs(fn_images,exist_ok=True)with open(json_file) as f:data = json.load(f)print(fn)# Create image dictimages = {‘%g’ % x[‘id’]: x for x in data[‘images’]}# Write labels filefor x in tqdm(data[‘annotations’], desc=‘Annotations %s’ % json_file):if x[‘iscrowd’]:continueimg = images[‘%g’ % x[‘image_id’]]h, w, f = img[‘height’], img[‘width’], img[‘file_name’]file_path=‘coco/’+fn.split(‘/’)[-2]+“/”+f# The Labelbox bounding box format is [top left x, top left y, width, height]box = np.array(x[‘bbox’], dtype=np.float64)box[:2] += box[2:] / 2 # xy top-left corner to centerbox[[0, 2]] /= w # normalize xbox[[1, 3]] /= h # normalize yif (box[2] > 0.) and (box[3] > 0.): # if w > 0 and h > 0with open(fn + Path(f).stem + ‘.txt’, ‘a’) as file:file.write(‘%g %.6f %.6f %.6f %.6f\n’ % (coco80[x[‘category_id’] - 1], *box))file_path_t=fn_images+fprint(file_path,file_path_t)shutil.copy(file_path,file_path_t)def coco91_to_coco80_class(): # converts 80-index (val2014) to 91-index (paper)# https://tech.amikelive.com/node-718/what-object-categories-labels-are-in-coco-dataset/# a = np.loadtxt(‘data/coco.names’, dtype=‘str’, delimiter=‘\n’)# b = np.loadtxt(‘data/coco_paper.names’, dtype=‘str’, delimiter=‘\n’)# x1 = [list(a[i] == b).index(True) + 1 for i in range(80)] # darknet to coco# x2 = [list(b[i] == a).index(True) if any(b[i] == a) else None for i in range(91)] # coco to darknetx = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, None, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, None, 24, 25, None,None, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, None, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,51, 52, 53, 54, 55, 56, 57, 58, 59, None, 60, None, None, 61, None, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,None, 73, 74, 75, 76, 77, 78, 79, None]return xconvert_coco_json()
開始運行:

添加圖片注釋,不超過 140 字(可選)

轉換完成后,驗證轉換的結果:
import cv2
import osdef draw_box_in_single_image(image_path, txt_path):# 讀取圖像image = cv2.imread(image_path)# 讀取txt文件信息def read_list(txt_path):pos = []with open(txt_path, ‘r’) as file_to_read:while True:lines = file_to_read.readline() # 整行讀取數據if not lines:break# 將整行數據分割處理,如果分割符是空格,括號里就不用傳入參數,如果是逗號, 則傳入‘,‘字符。p_tmp = [float(i) for i in lines.split(’ ‘)]pos.append(p_tmp) # 添加新讀取的數據# Efield.append(E_tmp)passreturn pos# txt轉換為boxdef convert(size, box):xmin = (box[1]-box[3]/2.)*size[1]xmax = (box[1]+box[3]/2.)*size[1]ymin = (box[2]-box[4]/2.)*size[0]ymax = (box[2]+box[4]/2.)*size[0]box = (int(xmin), int(ymin), int(xmax), int(ymax))return boxpos = read_list(txt_path)print(pos)tl = int((image.shape[0]+image.shape[1])/2)lf = max(tl-1,1)for i in range(len(pos)):label = str(int(pos[i][0]))print(‘label is ‘+label)box = convert(image.shape, pos[i])image = cv2.rectangle(image,(box[0], box[1]),(box[2],box[3]),(0,0,255),2)cv2.putText(image,label,(box[0],box[1]-2), 0, 1, [0,0,255], thickness=2, lineType=cv2.LINE_AA)passif pos:cv2.imwrite(’./Data/see_images/{}.png’.format(image_path.split(’\‘)[-1][:-4]), image)else:print(‘None’)img_folder = “./out/images/val2017”
img_list = os.listdir(img_folder)
img_list.sort()label_folder = “./out/labels/val2017”
label_list = os.listdir(label_folder)
label_list.sort()
if not os.path.exists(’./Data/see_images’):os.makedirs(‘./Data/see_images’)
for i in range(len(img_list)):image_path = img_folder + “\” + img_list[i]txt_path = label_folder + “\” + label_list[i]draw_box_in_single_image(image_path, txt_path)
結果展示:

添加圖片注釋,不超過 140 字(可選)

配置yolov8環境

可以直接安裝requirements.txt里面所有的庫文件,執行安裝命令:
pip install -r requirements.txt
如果不想安裝這么多庫文件,在運行的時候,查看缺少哪個庫,就安裝哪個庫,比如我的環境:
pip install thop
我的本地只缺少了這個庫文件。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/80937.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/80937.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/80937.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

scons user 3.1.2

前言 感謝您抽出時間閱讀有關 SCons 的內容。SCons 是一款下一代軟件構建工具,或者稱為 make 工具,即一種用于構建軟件(或其他文件)并在底層輸入文件發生更改時使已構建的軟件保持最新狀態的軟件實用程序。 SCons 最顯著的特點是…

Java的多線程筆記

創建一個線程的方法有多種,比如可以繼承Thread類或者實現Runnable接口,結論是實現Runnable接口比前者更加優越。 二者代碼對比 Java 不支持多繼承,如果你繼承了 Thread 類,就不能再繼承其他類,實現 Runnable 接口后&am…

PDF Base64格式字符串轉換為PDF文件臨時文件

需求描述: 在對接電子病歷系統與河北CA,進行免密文件簽章的時候,兩者系統入參不同,前者是pdf文件,base64格式;后者要求File類型的PDF文件。 在業務中間層開發時,則需要接收EMR側提供的base64格式…

代碼隨想錄訓練營第二十三天| 572.另一顆樹的子樹 104.二叉樹的最大深度 559.N叉樹的最大深度 111.二叉樹的最小深度

572.另一顆樹的子樹: 狀態:已做出 思路: 這道題目當時第一時間不是想到利用100.相同的樹思路來解決,而是先想到了使用kmp,不過這個題目官方題解確實是有kmp解法的,我使用的暴力解法,kmp的大致思…

【RabbitMq C++】消息隊列組件

RabbitMq 消息隊列組件 1. RabbitMq介紹2. 安裝RabbitMQ3. 安裝 RabbitMQ 的 C客戶端庫4. AMQP-CPP 庫的簡單使用4.1 使用4.1.1 TCP 模式4.1.2 擴展模式 4.2 常用類與接口介紹4.2.1 Channel4.3.2 ev 5. RabbitMQ樣例編寫5.1 發布消息5.2 訂閱消息 1. RabbitMq介紹 RabbitMq - …

鴻蒙NEXT開發動畫案例8

1.創建空白項目 2.Page文件夾下面新建Spin.ets文件,代碼如下: /*** SpinKit動畫組件 (重構版)* author: CSDN-鴻蒙布道師* since: 2025/05/14*/interface AnimationGroup {indexes: number[];delay: number; }ComponentV2 export struct SpinEight {Re…

MySQL全局優化

目錄 1 硬件層面優化 1.1 CPU優化 1.2 內存優化 1.3 存儲優化 1.4 網絡優化 2 系統配置優化 2.1 操作系統配置 2.2 MySQL服務配置 3 庫表結構優化 4 SQL及索引優化 mysql可以從四個層面考慮優化,分別是 硬件系統配置庫表結構SQL及索引 從成本和優化效果來看&#xf…

vue和springboot交互數據,使用axios【跨域問題】

vue和springboot交互數據,使用axios【跨域問題】 提示:幫幫志會陸續更新非常多的IT技術知識,希望分享的內容對您有用。本章分享的是node.js和vue的使用。前后每一小節的內容是存在的有:學習and理解的關聯性。【幫幫志系列文章】&…

FFMPEG 與 mp4

1. FFmpeg 中的 start_time 與 time_base start_time 流的起始時間戳(單位:time_base),表示第一幀的呈現時間(Presentation Time)。通常用于同步多個流(如音頻和視頻)。 time_base …

AI世界的崩塌:當人類思考枯竭引發數據生態鏈斷裂

AI世界的崩塌:當人類思考枯竭引發數據生態鏈斷裂 ——論過度依賴AI創作對技術進化的反噬 一、數據生態的惡性循環:AI的“自噬危機” 當前AI模型的訓練依賴于人類創造的原始數據——書籍、論文、藝術作品、社交媒體動態等。據統計,2025年全球…

C++【STL】(2)string

C【STL】string用法擴展 1. assign:為字符串賦新值 用于替換字符串內容,支持多種參數形式。 常用形式: // 用另一個字符串賦值 str.assign("Hello World");// 用另一個字符串的子串(從第6個字符開始,取5…

樹莓派4基于Debian GNU/Linux 12 (Bookworm)開啟VNC,使用MobaXterm連接VNC出現黑屏/灰屏問題

1. 開啟樹莓派的VNC服務 啟用VNC服務:通過raspi-config開啟 # 1. 通過 raspi-config 工具開啟 sudo raspi-config選擇 Interface Options → VNC → Yes退出時會自動啟動服務 檢查服務狀態: sudo systemctl status vncserver-x11-serviced正常輸出應顯示…

MongoDB使用x.509證書認證

文章目錄 自定義證書生成CA證書生成服務器之間的證書生成集群證書生成用戶證書 MongoDB配置java使用x.509證書連接MongoDBMongoShell使用證書連接 8.0版本的mongodb開啟復制集,配置證書認證 自定義證書 生成CA證書 生成ca私鑰: openssl genrsa -out ca…

Python爬蟲實戰:研究js混淆加密

一、引言 在當今數字化時代,數據已成為推動各行業發展的核心驅動力。網絡爬蟲作為一種高效的數據采集工具,能夠從互聯網上自動獲取大量有價值的信息。然而,隨著互聯網技術的不斷發展,許多網站為了保護自身數據安全和知識產權,采用了 JavaScript 混淆加密技術來防止數據被…

Java項目層級介紹 java 層級 層次

java 層級 層次 實體層 控制器層 數據連接層 Service : 業務處理類 Repository :數據庫訪問類 Java項目層級介紹 https://blog.csdn.net/m0_67574906/article/details/145811846 在Java項目中,層級結構(Layered Architecture&#xf…

網絡安全頂會——SP 2025 論文清單與摘要

1、"Check-Before-you-Solve": Verifiable Time-lock Puzzles 時間鎖謎題是一種密碼學原語,它向生成者保證該謎題無法在少于T個順序計算步驟內被破解。近年來,該技術已在公平合約簽署和密封投標拍賣等場景中得到廣泛應用。然而,求解…

《100天精通Python——基礎篇 2025 第18天:正則表達式入門實戰,解鎖字符串處理的魔法力量》

目錄 一、認識正則表達式二、正則表達式基本語法2.1 行界定符2.2 單詞定界符2.3 字符類2.4 選擇符2.5 范圍符2.6 排除符2.7 限定符2.8 任意字符2.9 轉義字符2.10 反斜杠2.11 小括號2.11.1 定義獨立單元2.11.2 分組 2.12 反向引用2.13 特殊構造2.14 匹配模式 三、re模塊3.1 comp…

思邁特軟件攜手天陽科技,打造ChatBI金融智能分析新標桿

5月10日,廣州思邁特軟件有限公司(以下簡稱“思邁特軟件”)與天陽宏業科技股份有限公司(以下簡稱“天陽科技”)在北京正式簽署戰略合作協議。思邁特軟件董事長吳華夫、CEO姚詩成,天陽科技董事長兼總裁歐陽建…

OPENSSL-1.1.1的使用及注意事項

下載鏈接: OpenSSL1.1.1一個廣泛使用的開源加密庫資源-CSDN文庫 OpenSSL 1.1.1 是一個廣泛使用的開源加密庫,以下是其使用方法及注意事項: 使用方法 安裝: Linux系統: 從源碼編譯安裝:訪問 OpenSSL 官網…

數據庫優化

一、慢 SQL 排查全流程 1. 開啟慢查詢日志:精準定位問題 SQL 慢查詢日志是定位性能問題的首要工具,通過記錄執行超時或未使用索引的 SQL,為優化提供依據。 配置步驟: ① 臨時啟用(生效至服務重啟) sql …