-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1463 lines (1090 loc) · 66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
<script class="next-config" data-name="main" type="application/json">{"hostname":"example.com","root":"/","images":"/images","scheme":"Pisces","darkmode":false,"version":"8.12.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"}}</script><script src="/js/config.js"></script>
<meta property="og:type" content="website">
<meta property="og:title" content="Yic">
<meta property="og:url" content="http://example.com/index.html">
<meta property="og:site_name" content="Yic">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="Yic-gdut">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="http://example.com/">
<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":true,"isPost":false,"lang":"en","comments":"","permalink":"","path":"index.html","title":""}</script>
<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>Yic</title>
<noscript>
<link rel="stylesheet" href="/css/noscript.css">
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
<div class="headband"></div>
<main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="Toggle navigation bar" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<i class="logo-line"></i>
<h1 class="site-title">Yic</h1>
<i class="logo-line"></i>
</a>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
</div>
</div>
</div>
<nav class="site-nav">
<ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>Home</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>Tags</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>Categories</a></li>
</ul>
</nav>
</div>
<div class="toggle sidebar-toggle" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner sidebar-overview-active">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
Table of Contents
</li>
<li class="sidebar-nav-overview">
Overview
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
<p class="site-author-name" itemprop="name">Yic-gdut</p>
<div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">25</span>
<span class="site-state-item-name">posts</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/">
<span class="site-state-item-count">4</span>
<span class="site-state-item-name">categories</span></a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/">
<span class="site-state-item-count">16</span>
<span class="site-state-item-name">tags</span></a>
</div>
</nav>
</div>
</div>
</div>
</div>
</aside>
<div class="sidebar-dimmer"></div>
</header>
<div class="back-to-top" role="button" aria-label="Back to top">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>
<div class="main-inner index posts-expand">
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2024/07/04/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/Spatio-Temporal%20Fusion%20for%20Human%20Action%20Recognition%20via%20Joint%20Trajectory/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="Yic-gdut">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Yic">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | Yic">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2024/07/04/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/Spatio-Temporal%20Fusion%20for%20Human%20Action%20Recognition%20via%20Joint%20Trajectory/" class="post-title-link" itemprop="url">Frequency Guidance Matters Skeletal Action Recognition by Frequency-Aware Mixed Transformer</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>
<time title="Created: 2024-07-04 00:00:00" itemprop="dateCreated datePublished" datetime="2024-07-04T00:00:00+08:00">2024-07-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">Edited on</span>
<time title="Modified: 2024-08-06 16:44:23" itemprop="dateModified" datetime="2024-08-06T16:44:23+08:00">2024-08-06</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">In</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/" itemprop="url" rel="index"><span itemprop="name">骨架动作识别</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240704214425279.png"
alt="image-20240704214425279" />
<figcaption aria-hidden="true">image-20240704214425279</figcaption>
</figure>
<h1 id="摘要">摘要</h1>
<p>图卷积网络(GCNs)和transformer已被广泛应用于基于骨架的人体动作识别,每种网络在捕捉空间关系和长程依赖关系方面都具有独特的优势。然而,对于大多数GCN方法而言,拓扑结构的构建仅依赖于人体关节点的空间信息,限制了其直接捕获更丰富的时空依赖关系的能力。此外,许多Transformer方法的自注意力模块缺乏拓扑结构信息,限制了模型的鲁棒性和泛化性。为了解决这些问题,本文提出了一种联合轨迹图(Joint
Trajectory Graph,
JTG),将时空信息集成到一个统一的图结构中。本文还提出了一种联合轨迹图former
(JT-GraphFormer),直接捕获所有关节轨迹之间的时空关系,用于人体行为识别。为了更好地将拓扑信息融入时空关系中。引入一种时空Dijkstra注意力(STDA)机制来计算JTG中所有关节的关系得分。此外,在分类阶段引入Koopman算子,以增强模型的表示能力和分类性能。实验表明,JT-GraphFormer在人体行为识别任务中取得了出色的性能,在NTU
RGB+D、NTU RGB+D 120和N-UCLA数据集上的性能优于当前最先进的方法。</p>
<h1 id="引言">引言</h1>
<h2 id="论文认为的现有方法不足">论文认为的现有方法不足</h2>
<p>首先,传统的GCN方法不能直接利用时空拓扑结构来捕获更全面的时空依赖关系。聚合图中邻近节点的信息以更新节点表示对于捕获空间依赖关系是有效的,而简单地扩展空间图并不足以有效地捕获时序动态关联。</p>
<p>其次,在关节坐标序列中,信息的密度可能在空间和时间维度之间变化,在时间维度上存在较大的冗余。</p>
<p>最后,自注意力机制虽然可以自适应地计算序列元素的相关性分数,但可能无法捕获每个序列元素的隐藏拓扑信息,导致模型的鲁棒性和泛化性受到负面影响。</p>
<h2 id="解决方案">解决方案</h2>
<p>提出一种具有联合轨迹图(JTG)的Joint Trajectory
GraphFormer(JT-GraphFormer)模型。JTG在原始空间图结构之上引入了时间维度,使其能够更好地封装与关节轨迹相关的复杂判别细节。与ST-GCN不同,JTG专注于构建一段时空周期内节点之间的拓扑结构。具体而言,构建某一帧序列内所有关节的动态轨迹拓扑,如图1
(a)所示。为了更有效地捕获复杂的时空依赖关系,JTG将连接扩展到相邻帧中的节点。该策略减少了冗余的时间信息,并利用统一的图结构捕获时空维度内的内在依赖,促进了跨时空域特征的聚集。</p>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240508222019765.png"
alt="image-20240508222019765" />
<figcaption aria-hidden="true">image-20240508222019765</figcaption>
</figure>
<p>当使用JTG作为Transformer的输入时,单帧内的节点会同时计算相邻帧内所有节点的注意力,这对模型处理复杂的时空关联提出了较高的要求。作者受Graphormer中空间编码的启发,提出了一种时空Dijkstra注意力(STDA)机制,将JTG中关节之间的距离作为时空拓扑信息添加到注意力分数的计算中,这使每个节点能够学习更多地关注与动作更相关的邻居节点。STDA将全局注意力得分和最短路径权重相结合,通过加入关节轨迹中存在的先验信息,表现出更强的表达能力。节点与其邻居的相关权重如图1
(b)所示,Dijkstra矩阵的热图如图1 (c)所示。</p>
<p>此外,作者将Koopman算子引入到分类阶段。</p>
<blockquote>
<p>The Koopman operator is a linear operator that describes a nonlinear
dynamical system by map ping it into an infinite-dimensional Hilbert
space.</p>
<p>Koopman算子是一种线性算子,通过将非线性动力系统映射到无限维希尔伯特空间来描述非线性动力系统。</p>
</blockquote>
<h2 id="贡献">贡献</h2>
<p>• Introduction of JTG as an input data representation, leveraging
trajectory information to enrich feature aggregation capabilities for
nodes and their interactions across frames.</p>
<p>• Proposal of STDA, augmenting feature aggregation among neighboring
nodes via the integration of shortest path concepts between joints.</p>
<p>• Incorporation of the Koopman operator for classifica tion,
facilitating an encompassing perspective and supe rior classification
performance.</p>
<p>• Rigorous evaluation of our proposed model across three diverse
datasets (NTU RGB+D, NTU RGB+D 120, and N-UCLA), revealing its
superiority over existing state of-the-art (SOTA) methods and
underscoring its potential as a promising solution for action
recognition tasks.</p>
<h1 id="方法">方法</h1>
<h2 id="joint-trajectory-graph">Joint Trajectory Graph</h2>
<p>将动作序列分成几个组。每个组有N个框架,并用图结构描述关节轨迹,称为Joint
Trajectory Graph,<span class="math inline">\(G_{JT} =
(G_t,G_{t+1},\ldots,G_{t+N-1},E_T) = (V_{JT},E_{JT})\)</span>
,其中<span class="math inline">\(G_t\)</span>是1帧中节点的空间图,<span
class="math inline">\(E_T\)</span>是对应的边集合,表示N帧中节点的关节轨迹,<span
class="math inline">\((V_{JT},E_{JT})\)</span>分别表示JTG中的节点和边集合。
<span class="math display">\[
A_{JT}=\begin{bmatrix}A&A+I&A&\cdots&A\\A+I&A&A+I&\ddots&\vdots\\A&A+I&\ddots&\ddots&A\\\vdots&\ddots&\ddots&A&A+I\\A&\cdots&A&A+I&A\end{bmatrix}
\]</span></p>
<p>A为框架中所有关节的物理连通性,I为单位对角矩阵,表示相邻框架中相同关节的连通性。</p>
<h2 id="jt-graphformer">JT-GraphFormer</h2>
<h3 id="positional-encoding">Positional Encoding</h3>
<p><span class="math inline">\(X\in\mathbb{R}^{C\times T\times
V}\)</span> ========> <span
class="math inline">\(X\in\mathbb{R}^{C\times T/N\times
V*N}\)</span></p>
<p>在JTG中,关节的运动轨迹涉及特定的时间信息,因此需要为每个帧进行位置编码(PE),以正确地表达顺序关系。
<span class="math display">\[
\begin{aligned}&PE(p,2i)=\sin(p/10000^{2i/C_{in}}),\\&PE(p,2i+1)=\cos(p/10000^{2i/C_{in}}),\end{aligned}
\]</span></p>
<h3 id="stda-module">STDA Module</h3>
<p>作用:将时空拓扑信息引入多头注意力机制,增加了邻居节点之间关联的权重,从而使节点更偏向于聚合局部邻居的特征。</p>
<p>作者说受到Graphormer空间编码的启发,但实际上还是不一样的。</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr>
<th>Graphormer</th>
<th>STDA Module</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509220501474.png" alt="image-20240509220501474" style="zoom:50%;" /></td>
<td><img src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509220523849.png" alt="image-20240509220523849" style="zoom:50%;" /></td>
</tr>
</tbody>
</table>
<p>公式: <span class="math display">\[
\begin{array}{l}
W=\exp(-D)+b,\\a_{map}=Tanh(QK^T/\sqrt{d_K}\times\alpha),\\a_{score}=a_{map}\cdot
W,\end{array}
\]</span></p>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509222102870.png"
alt="image-20240509222102870" />
<figcaption aria-hidden="true">image-20240509222102870</figcaption>
</figure>
<h3 id="koopman-operator">Koopman Operator</h3>
<p>Koopman算子是一个将非线性动力系统映射到无限维希尔伯特空间的线性算子。这种映射允许在线性空间中描述系统的演化,比原始的非线性空间更容易分析</p>
<p>在深度学习中,利用Koopman算子提取非线性动力系统的演化特征以提高分类性能。本文建立了时间演化函数<span
class="math inline">\(f(\cdot)\)</span>,用于JT-GraphFormer跨不同帧的输出特征<span
class="math inline">\(H\)</span>,将第<span
class="math inline">\(t\)</span>帧的特征<span
class="math inline">\(h_t\)</span>与下一帧的特征<span
class="math inline">\(h_{t+1}\)</span>联系起来,即<span
class="math inline">\(h_{t+1} = f(h_t)\)</span>。</p>
<p>将Koopman算子<span
class="math inline">\(K_{op}\)</span>定义为一个<span
class="math inline">\(N_{cls} × C_{out} ×
C_{out}\)</span>线性算子,其中<span
class="math inline">\(N_{cls}\)</span>表示动作类别的数量,<span
class="math inline">\(C_{out}\)</span>表示最后一个JT-GraphFormer块的输出通道数量。<span
class="math inline">\(K_{op}\)</span>应用线性方法来近似时间维度上各类动作特征之间的相互关系,满足等式:
<span class="math display">\[
h_{t+1}\approx K_{op}h_t
\]</span>
由于我们在不同的帧步建立了线性相关性,因此可以近似表示任意连续帧段的特征<span
class="math inline">\(H_x^y\)</span>,即从第<span
class="math inline">\(x\)</span>帧到第<span
class="math inline">\(y\)</span>帧的特征段。因此特征<span
class="math inline">\(H_1^{T-1}\)</span>可以表示为: <span
class="math display">\[
H_1^{T-1}\approx[h_1,K_{op}h_1,K_{op}^2h_1,\cdots,K_{op}^{T-2}h_1]\\
H_{t+1}^T\approx K_{op}H_t^{T-1}
\]</span> 采用DMD算法,通过最小化<span class="math inline">\(\| H_2^T-
K_{op}H_1^{T- 1}\| _2\)</span>的Frobenius范数来更新<span
class="math inline">\(K_{op}\)</span>。由于<span
class="math inline">\(K_{op}\)</span>表示各个动作类别的特征演化,我们可以对<span
class="math inline">\(K_{op}\)</span>在时间维度上进行平均,从而得到每个类别的概率分布,最终完成分类。</p>
<h1 id="实验">实验</h1>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509223854689.png"
alt="image-20240509223854689" />
<figcaption aria-hidden="true">image-20240509223854689</figcaption>
</figure>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509230840926.png"
alt="image-20240509230840926" />
<figcaption aria-hidden="true">image-20240509230840926</figcaption>
</figure>
<p>研究了JTG结构的静态和动态配置之间的性能差异,以及是否采用层间共享权重。此外,对JTG是否需要归一化进行了探讨。</p>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509231053683.png"
alt="image-20240509231053683" />
<figcaption aria-hidden="true">image-20240509231053683</figcaption>
</figure>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509231132890.png"
alt="image-20240509231132890" />
<figcaption aria-hidden="true">image-20240509231132890</figcaption>
</figure>
<figure>
<img
src="https://yic-123.oss-cn-guangzhou.aliyuncs.com/img/image-20240509231219842.png"
alt="image-20240509231219842" />
<figcaption aria-hidden="true">image-20240509231219842</figcaption>
</figure>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2024/03/21/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/SkateFormer/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="Yic-gdut">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Yic">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | Yic">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2024/03/21/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/SkateFormer/" class="post-title-link" itemprop="url">SkateFormer</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>
<time title="Created: 2024-03-21 10:21:40" itemprop="dateCreated datePublished" datetime="2024-03-21T10:21:40+08:00">2024-03-21</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">Edited on</span>
<time title="Modified: 2024-08-06 16:13:57" itemprop="dateModified" datetime="2024-08-06T16:13:57+08:00">2024-08-06</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">In</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/" itemprop="url" rel="index"><span itemprop="name">骨架动作识别</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p><a target="_blank" rel="noopener" href="https://arxiv.org/pdf/2403.09508.pdf">paper</a></p>
<p>看latex像是投eccv,目前代码未公布,但点出奇的高。</p>
<h1 id="摘要">摘要</h1>
<p>基于骨骼数据的动作识别是一种根据关节坐标及其在骨骼数据中的连接性对人类动作进行分类的技术,在各种场景中被广泛应用。虽然图卷积网络(GCNs)已被提出用于表示为图的骨骼数据,但它们受到关节连接性限制的有限感受野的影响。为了解决这一限制,最近的进展引入了基于Transformer的方法。然而,捕获所有帧中所有关节之间的相关性需要大量的内存资源。为了缓解这一问题,我们提出了一种称为Skeletal-Temporal
Transformer(SkateFormer)的新方法,它根据不同类型的骨骼-时间关系(Skate-Type)对关节和帧进行划分,并在每个分区内执行骨骼-时间自注意力(Skate-MSA)。我们将用于动作识别的关键骨骼-时间关系分类为四种不同类型。这些类型结合了(i)基于物理上相邻和远离的关节的两种骨骼关系类型,以及(ii)基于相邻和远离帧的两种时间关系类型。通过这种分区特定的注意力策略,我们的SkateFormer可以以高效的计算方式选择性地关注对动作识别至关重要的关节和帧。在各种基准数据集上进行的广泛实验证明我们的SkateFormer优于最近的最先进方法。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2024/03/21/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/SkateFormer/#more" rel="contents">
Read more »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2024/03/18/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/F1-score/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="Yic-gdut">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Yic">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | Yic">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2024/03/18/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/F1-score/" class="post-title-link" itemprop="url">F1-score</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>
<time title="Created: 2024-03-18 21:34:37" itemprop="dateCreated datePublished" datetime="2024-03-18T21:34:37+08:00">2024-03-18</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">Edited on</span>
<time title="Modified: 2024-04-06 19:54:41" itemprop="dateModified" datetime="2024-04-06T19:54:41+08:00">2024-04-06</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">In</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/" itemprop="url" rel="index"><span itemprop="name">深度学习基础</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>(面Cvte时被问到了F1,没说出来。。。)</p>
<p>F1
score是分类问题中常用的评价指标,定义为精确率(Precision)和召回率(Recall)的调和平均数。
<span class="math display">\[
F1=\frac{1}{\frac{1}{Precision}+\frac{1}{Recall}}=\frac{2×Precision×Recall}{Precision+Recall}
\]</span></p>
<blockquote>
<p>补充一下精确率和召回率的公式:</p>
<blockquote>
<p>TP( True Positive):真正例</p>
<p>FP( False Positive):假正例</p>
<p>FN(False Negative):假反例</p>
<p>TN(True Negative):真反例</p>
</blockquote>
<p><strong>精确率(Precision):</strong> <span
class="math inline">\(Precision=\frac{TP}{TP+FP}\)</span></p>
<p><strong>召回率(Recall):</strong> <span
class="math inline">\(Recall=\frac{TP}{TP+FN}\)</span></p>
<blockquote>
<p>精确率,也称为查准率,衡量的是<strong>预测结果为正例的样本中被正确分类的正例样本的比例</strong>。</p>
<p>召回率,也称为查全率,衡量的是<strong>真实情况下的所有正样本中被正确分类的正样本的比例。</strong></p>
</blockquote>
</blockquote>
<p>F1 score 综合考虑了精确率和召回率,其结果更偏向于 Precision 和 Recall
中较小的那个,即 Precision 和 Recall 中较小的那个对 F1 score
的结果取决定性作用。例如若 <span
class="math inline">\(Precision=1,Recall \approx 0\)</span>,由F1
score的计算公式可以看出,此时其结果主要受 Recall 影响。</p>
<p>如果对 Precision 和 Recall 取算术平均值(<span
class="math inline">\(\frac{Precision+Recall}{2}\)</span>),对于 <span
class="math inline">\(Precision=1,Recall \approx 0\)</span>,其结果约为
0.5,而 F1 score 调和平均的结果约为
0。<strong>这也是为什么很多应用场景中会选择使用 F1 score
调和平均值而不是算术平均值的原因,因为我们希望这个结果可以更好地反映模型的性能好坏,而不是直接平均模糊化了
Precision 和 Recall 各自对模型的影响。</strong></p>
<blockquote>
<p>补充另外两种评价方法:</p>
</blockquote>
<p><strong>加权调和平均:</strong></p>
<p>上面的 F1 score 中, Precision 和 Recall
是同等重要的,而有的时候可能希望我们的模型更关注其中的某一个指标,这时可以使用加权调和平均:
<span class="math display">\[
F_{\beta}=(1+\beta^{2})\frac{1}{\frac{1}{Precision}+\beta^{2}×\frac{1}{Recall}}=(1+\beta^{2})\frac{Precision×Recall}{\beta^{2}×Precision+Recall}
\]</span> 当 <span class="math inline">\(\beta > 1\)</span>
时召回率有更大影响, <span class="math inline">\(\beta < 1\)</span>
时精确率有更大影响, <span class="math inline">\(\beta = 1\)</span>
时退化为 F1 score。</p>
<p><strong>几何平均数:</strong> <span class="math display">\[
G=\sqrt{Precision×Recall}
\]</span> ## 参考链接 1.<a
target="_blank" rel="noopener" href="https://github.com/GYee/CV_interviews_Q-A/blob/master/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/32_%E4%B8%BA%E4%BB%80%E4%B9%88%E7%94%A8F1-score.md?plain=1">CV_interviews_Q-A/计算机视觉/32_为什么用F1-score.md
at master · GYee/CV_interviews_Q-A</a></p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2024/03/14/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/%E5%BD%92%E4%B8%80%E5%8C%96/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="Yic-gdut">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Yic">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | Yic">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2024/03/14/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/%E5%BD%92%E4%B8%80%E5%8C%96/" class="post-title-link" itemprop="url">归一化</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>
<time title="Created: 2024-03-14 15:52:14" itemprop="dateCreated datePublished" datetime="2024-03-14T15:52:14+08:00">2024-03-14</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">Edited on</span>
<time title="Modified: 2024-04-06 19:54:41" itemprop="dateModified" datetime="2024-04-06T19:54:41+08:00">2024-04-06</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">In</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/" itemprop="url" rel="index"><span itemprop="name">深度学习基础</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p><img src="https://i.loli.net/2020/05/16/TgzlieXhawU1m6o.png"
alt="img" /> # 为什么要归一化</p>
<p>在机器学习领域,数据分布是很重要的概念。如果训练集和测试集的分布很不相同,那么在训练集上训练好的模型,在测试集上应该不奏效(比如用ImageNet训练的分类网络去在灰度医学图像上finetune再测试,效果应该不好)。对于神经网络来说,如果每一层的数据分布都不一样,后一层的网络则需要去学习适应前一层的数据分布,这相当于去做了domain的adaptation,无疑增加了训练难度,尤其是网络越来越深的情况。因此,只是对输入的数据进行归一化处理也是不够的,这样只能保证输入的数据分布一致,不能保证每层网络的输入数据分布一致,因此在神经网络的中间层也需要加入归一化操作。
# 归一化流程</p>
<ol type="1">
<li>计算出均值<br />
</li>
<li>计算出方差<br />
</li>
<li>归一化处理到均值为0,方差为1<br />
</li>
<li>变化重构,恢复出这一层网络所要学到的分布</li>
</ol>
<p><span class="math display">\[
\begin{aligned}
\mu_{\mathcal{B}} & \leftarrow \frac{1}{m} \sum_{i=1}^{m} x_{i} \\
\sigma_{\mathcal{B}}^{2} & \leftarrow \frac{1}{m}
\sum_{i=1}^{m}\left(x_{i}-\mu_{\mathcal{B}}\right)^{2} \\
\widehat{x}_{i} & \leftarrow
\frac{x_{i}-\mu_{\mathcal{B}}}{\sqrt{\sigma_{\mathcal{B}}^{2}+\epsilon}}
\\
y_{i} & \leftarrow \gamma \widehat{x}_{i}+\beta \equiv
\operatorname{BN}_{\gamma, \beta}\left(x_{i}\right)
\end{aligned}
\]</span>
上式是BN的公式,前两行计算输入数据一个batch的均值与方差,之后均值、方差变换为0、1即标准正态分布,最后每个元素乘以
<span class="math inline">\(\gamma\)</span> 再加上 <span
class="math inline">\(\beta\)</span> 得到输出, <span
class="math inline">\(\gamma\)</span> 和 <span
class="math inline">\(\beta\)</span> 是可训练的参数。 # 区别</p>
<h2 id="bn">BN</h2>
<ol type="1">
<li><p>BN的计算就是把每个通道的NHW单独拿出来归一化处理<br />
</p></li>
<li><p>针对每个channel我们都有一组γ,β,所以可学习的参数为2*C<br />
</p></li>
<li><p>当batch
size越小,BN的表现效果也越不好,因为计算过程中所得到的均值和方差不能代表全局
## LN</p></li>
<li><p>LN的计算就是把每个CHW单独拿出来归一化处理,不受batchsize
的影响<br />
</p></li>
<li><p>常用在RNN和Transformer,但如果输入的特征区别很大,那么就不建议使用它做归一化处理。主要是用于NLP,但CV中ViT和ConvNext也用了。
## IN</p></li>
<li><p>IN的计算就是把每个HW单独拿出来归一化处理,不受通道和batchsize
的影响<br />
</p></li>
<li><p>常用在风格化迁移,但如果特征图可以用到通道之间的相关性,那么就不建议使用它做归一化处理
## GN</p></li>
<li><p>GN的计算就是把先把通道C分成G组,然后把每个gHW单独拿出来归一化处理,最后把G组归一化之后的数据合并成CHW<br />
</p></li>
<li><p>GN介于LN和IN之间,当然可以说LN和IN就是GN的特列,比如G的大小为1或者为C</p></li>
</ol>
<h1 id="参考资料">参考资料</h1>
<ol type="1">
<li><a
target="_blank" rel="noopener" href="https://github.com/GYee/CV_interviews_Q-A">CV_interviews_Q-A</a></li>
<li><a
target="_blank" rel="noopener" href="https://imgtec.eetrend.com/blog/2020/100050744.html">深度学习中的五种归一化(BN、LN、IN、GN和SN)方法简介)</a></li>
</ol>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2024/03/14/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/%E8%BF%87%E6%8B%9F%E5%90%88%E4%B8%8E%E6%AC%A0%E6%8B%9F%E5%90%88/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="Yic-gdut">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Yic">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | Yic">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2024/03/14/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/%E8%BF%87%E6%8B%9F%E5%90%88%E4%B8%8E%E6%AC%A0%E6%8B%9F%E5%90%88/" class="post-title-link" itemprop="url">过拟合与欠拟合</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>
<time title="Created: 2024-03-14 13:57:34" itemprop="dateCreated datePublished" datetime="2024-03-14T13:57:34+08:00">2024-03-14</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">Edited on</span>
<time title="Modified: 2024-04-06 19:54:41" itemprop="dateModified" datetime="2024-04-06T19:54:41+08:00">2024-04-06</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">In</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80/" itemprop="url" rel="index"><span itemprop="name">深度学习基础</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="过拟合与欠拟合">过拟合与欠拟合</h1>
<p><img src="https://i.loli.net/2020/05/16/m1MXWUG6RZEfB2H.jpg" /> ##
过拟合</p>
<p>模型在训练集上的表现非常好,但是在测试集、验证集以及新数据上的表现很差,损失曲线呈现一种<strong>高方差</strong>状态。(高方差指的是训练集误差较低,而测试集误差比训练集大较多)</p>
<h3 id="原因">原因</h3>
<p>从两个角度去分析:</p>
<ol type="1">
<li><p><strong>模型的复杂度</strong>:模型过于复杂,把噪声数据的特征也学习到模型中,导致模型泛化性能下降</p></li>
<li><p><strong>数据集规模大小</strong>:数据集规模相对模型复杂度来说太小,使得模型过度挖掘数据集中的特征,把一些不具有代表性的特征也学习到了模型中。例如训练集中有一个叶子图片,该叶子的边缘是锯齿状,模型学习了该图片后认为叶子都应该有锯齿状边缘,因此当新数据中的叶子边缘不是锯齿状时,都判断为不是叶子。
### 过拟合的解决方法</p></li>
<li><p><strong>获得更多的训练数据</strong>:使用更多的训练数据是解决过拟合问题最有效的手段,因为更多的样本能够让模型学习到更多更有效的特征,减少噪声的影响。</p>
<p>当然直接增加实验数据在很多场景下都是没那么容易的,因此可以通过<strong>数据扩充技术</strong>,例如对图像进行平移、旋转和缩放等等。</p>
<p>除了根据原有数据进行扩充外,还有一种思路是使用非常火热的生成式对抗网络
GAN 来合成大量的新训练数据。</p>
<p>还有一种方法是使用<strong>迁移学习技术</strong>,使用已经在更大规模的源域数据集上训练好的模型参数来初始化我们的模型,模型往往可以更快地收敛。但是也有一个问题是,源域数据集中的场景跟我们目标域数据集的场景差异过大时,可能效果会不太好,需要多做实验来判断。</p></li>
<li><p><strong>降低模型复杂度</strong>:在深度学习中我们可以减少网络的层数,改用参数量更少的模型;在机器学习的决策树模型中可以降低树的高度、进行剪枝等。</p></li>
<li><p><strong>正则化方法</strong> 常用的有 L1、L2
正则化,L1正则化和L2正则化可以看做是<strong>损失函数的惩罚项</strong>。所谓<strong>惩罚</strong>是指对损失函数中的<strong>某些参数做一些限制</strong>。</p>
<p><strong>添加BN层</strong></p>
<p>使用<strong>dropout技术</strong>(dropout在训练时会随机隐藏一些神经元,导致训练过程中不会每次都更新(<strong>预测时不会发生dropout</strong>),最终的结果是每个神经元的权重w都不会更新的太大,起到了类似L2正则化的作用来降低过拟合风险。)</p></li>
<li><p><strong>Early Stopping</strong>:Early
stopping便是一种迭代次数截断的方法来防止过拟合的方法,即在模型对训练数据集迭代收敛之前停止迭代来防止过拟合。</p>
<p>Early
stopping方法的具体做法是:在每一个Epoch结束时(一个Epoch集为对所有的训练数据的一轮遍历)计算validation
data的accuracy,当accuracy不再提高时,就停止训练。这种做法很符合直观感受,因为accurary都不再提高了,在继续训练也是无益的,只会提高训练的时间。那么该做法的一个重点便是怎样才认为validation
accurary不再提高了呢?并不是说validation
accuracy一降下来便认为不再提高了,因为可能经过这个Epoch后,accuracy降低了,但是随后的Epoch又让accuracy又上去了,所以不能根据一两次的连续降低就判断不再提高。一般的做法是,在训练的过程中,记录到目前为止最好的validation
accuracy,当连续10次Epoch(或者更多次)没达到最佳accuracy时,则可以认为accuracy不再提高了。</p></li>
<li><p><strong>集成学习方法</strong>:集成学习是把多个模型集成在一起,来降低单一模型的过拟合风险,例如Bagging方法。</p>
<p>如DNN可以用Bagging的思路来正则化。首先我们要对原始的m个训练样本进行有放回随机采样,构建N组m个样本的数据集,然后分别用这N组数据集去训练我们的DNN。即采用我们的前向传播算法和反向传播算法得到N个DNN模型的W,b参数组合,最后对N个DNN模型的输出用加权平均法或者投票法决定最终输出。不过用集成学习Bagging的方法有一个问题,就是我们的DNN模型本来就比较复杂,参数很多。现在又变成了N个DNN模型,这样参数又增加了N倍,从而导致训练这样的网络要花更加多的时间和空间。因此一般N的个数不能太多,比如5-10个就可以了。</p></li>
<li><p><strong>交叉检验</strong>,如S折交叉验证,通过交叉检验得到较优的模型参数,其实这个跟上面的Bagging方法比较类似,只不过S折交叉验证是随机将已给数据切分成S个互不相交的大小相同的自己,然后利用S-1个子集的数据训练模型,利用余下的子集测试模型;将这一过程对可能的S种选择重复进行;最后选出S次评测中平均测试误差最小的模型。
## 欠拟合</p></li>
</ol>
<h3 id="欠拟合的表现">欠拟合的表现</h3>
<p>模型无论是在训练集还是在测试集上的表现都很差,损失曲线呈现一种<strong>高偏差</strong>状态。(高偏差指的是训练集和验证集的误差都较高,但相差很少)</p>
<p><img src="https://i.loli.net/2020/05/16/N2v1dDnKqfk7iQs.png" alt="img" style="zoom:150%;" /></p>
<h3 id="欠拟合的原因">欠拟合的原因</h3>
<p>同样可以从两个角度去分析:</p>
<ol type="1">
<li><strong>模型过于简单</strong>:简单模型的学习能力比较差</li>
<li><strong>提取的特征不好</strong>:当特征不足或者现有特征与样本标签的相关性不强时,模型容易出现欠拟合</li>
</ol>
<h3 id="欠拟合的解决方法">欠拟合的解决方法</h3>
<ol type="1">
<li><strong>增加模型复杂度</strong>:如线性模型增加高次项改为非线性模型、在神经网络模型中增加网络层数或者神经元个数、深度学习中改为使用参数量更多更先进的模型等等。</li>
<li><strong>增加新特征</strong>:可以考虑特征组合等特征工程工作(这主要是针对机器学习而言,特征工程还真不太了解……)</li>
<li>如果损失函数中加了正则项,可以考虑<strong>减小正则项的系数</strong>
<span class="math inline">\(\lambda\)</span></li>
</ol>
<h2 id="参考链接">参考链接</h2>
<ol type="1">
<li><a
target="_blank" rel="noopener" href="https://github.com/GYee/CV_interviews_Q-A">CV_interviews_Q-A</a></li>
<li><a
target="_blank" rel="noopener" href="https://www.jianshu.com/p/f2489ccc14b4">过拟合与欠拟合及方差偏差</a></li>
</ol>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2024/03/06/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/FR-Head/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="Yic-gdut">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Yic">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | Yic">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2024/03/06/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/FR-Head/" class="post-title-link" itemprop="url">FR-Head</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>
<time title="Created: 2024-03-06 15:09:51" itemprop="dateCreated datePublished" datetime="2024-03-06T15:09:51+08:00">2024-03-06</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">Edited on</span>
<time title="Modified: 2024-03-10 10:36:08" itemprop="dateModified" datetime="2024-03-10T10:36:08+08:00">2024-03-10</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">In</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E9%AA%A8%E6%9E%B6%E5%8A%A8%E4%BD%9C%E8%AF%86%E5%88%AB/" itemprop="url" rel="index"><span itemprop="name">骨架动作识别</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">