我是新来的。我正在写论文,我想制作这样的表格:
我正在使用模板“classicthesis”来撰写我的论文。到目前为止,我的表格代码如下所示:
\begin{table}
\myfloatalign
\noindent
\begin{tabularx}{\textwidth}{lrrrrr} \toprule
\tableheadline{Model}
& \tableheadline{Size (pixels)}
& \tableheadline{$mAP^{val}$ 0.5:0.95}
& \tableheadline{$mAP^{val}$ 0.5}
& \tableheadline{Speed CPU b1 (ms)}
& \tableheadline{Speed V100 b1 (ms)} \\ \midrule
YOLOv5n & 640 & 28.0 & 45.7 & 45 & 6.3 \\
YOLOv5s & 640 & 37.4 & 56.8 & 98 & 6.4 \\
YOLOv5m & 640 & 45.4 & 64.1 & 224 & 8.2 \\
YOLOv5l & 640 & 49.0 & 67.3 & 430 & 10.1 \\
YOLOv5x & 640 & 50.7 & 68.9 & 766 & 12.1 \\
\midrule
YOLOv5n6 & 1280 & 36.0 & 54.4 & 153 & 8.1 \\
YOLOv5s6 & 1280 & 44.8 & 63.7 & 385 & 8.2 \\
YOLOv5m6 & 1280 & 51.3 & 69.3 & 887 & 11.1 \\
YOLOv5l6 & 1280 & 53.7 & 71.3 & 1784 & 15.8 \\
YOLOv5x6 & 1280 & 55.0 & 72.7 & 3136 & 26.2 \\
\bottomrule
\end{tabularx}
\caption{Network performance}
\end{table}
结果如下:
如果您能向我演示如何修复标题,那就太好了。
太感谢了!
答案1
这是一个解决方案。我已经使用了类report
,但这也应该适用于其他类。
\documentclass{report}
\usepackage{makecell}
\usepackage{booktabs}
\begin{document}
\begin{table}
%\myfloatalign
\noindent
\begin{tabular}{lrrrrr} \toprule
\thead{Model}
& \thead{Size\\(pixels)}
& \thead{$mAP^{val}$\\0.5:0.95}
& \thead{$mAP^{val}$\\0.5}
& \thead{Speed\\CPU b1\\(ms)}
& \thead{Speed\\V100 b1\\(ms)} \\ \midrule
YOLOv5n & 640 & 28.0 & 45.7 & 45 & 6.3 \\
YOLOv5s & 640 & 37.4 & 56.8 & 98 & 6.4 \\
YOLOv5m & 640 & 45.4 & 64.1 & 224 & 8.2 \\
YOLOv5l & 640 & 49.0 & 67.3 & 430 & 10.1 \\
YOLOv5x & 640 & 50.7 & 68.9 & 766 & 12.1 \\
\midrule
YOLOv5n6 & 1280 & 36.0 & 54.4 & 153 & 8.1 \\
YOLOv5s6 & 1280 & 44.8 & 63.7 & 385 & 8.2 \\
YOLOv5m6 & 1280 & 51.3 & 69.3 & 887 & 11.1 \\
YOLOv5l6 & 1280 & 53.7 & 71.3 & 1784 & 15.8 \\
YOLOv5x6 & 1280 & 55.0 & 72.7 & 3136 & 26.2 \\
\bottomrule
\end{tabular}
\caption{Network performance}
\end{table}
\end{document}