\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols,positioning}
\definecolor{myblue}{RGB}{150,150,150}
\tikzset{
myshape/.style={
shape=signal,
fill=myblue,
minimum height=1.4cm,
minimum width=1.15cm,
text=white,
signal pointer angle=128,
signal to=south,
signal from=north,
rotate=-90,
transform shape
},
mytext/.style={
draw=myblue,
text width=7cm,
minimum height=1.15cm,
thick,
outer sep=-0
}
}
\newcounter{lp}
\newcommand\MyDesc[3][]{
\stepcounter{lp}%
\node[myshape,#1] (desc\thelp) {};
\node[font=\color{white}] at (desc\thelp) {#2};
\node[mytext,anchor=north west] at (desc\thelp.north west)
{%
\parbox[t]{\dimexpr\linewidth-0em\relax}{#3}%
};
}
\begin{document}
\begin{tikzpicture}[]
\MyDesc{\textbf{\Large 1}}{\centering \textbf{Region-based convultional neural network (R-CNN)}}
\MyDesc[below = 1.5cm of desc1.north]{\textbf{\Large2}}{\centering \textbf{Single Short Multi Box Detection (SSD)}}
\MyDesc[below = 1.5cm of desc2.north]{\textbf{\Large 3}}{\centering \textbf{You Only Look Once (YOLO)}}
\MyDesc[below = 1.5cm of desc3.north]{\textbf{\Large 4}}{\centering \textbf{Efficient Det}}
\MyDesc[below = 1.5cm of desc4.north]{\textbf{\Large 5}}{\centering \textbf{Retina Net}}
\MyDesc[below = 1.5cm of desc5.north]{\textbf{\Large 6}}{\centering \textbf{Corner Net}}
\MyDesc[below = 1.5cm of desc6.north]{\textbf{\Large 7}}{\centering \textbf{Cascade R-CNN}}
\MyDesc[below = 1.5cm of desc7.north]{\textbf{\Large 8}}{\centering \textbf{Feature Pyramid Network (FPN)}}
\end{tikzpicture}
\end{document}
答案1
您可以使用节点内部的 来绘制这些path picture
。请注意,这些节点是固定大小的。它们不会根据文本进行调整。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols, shapes.geometric, positioning}
\tikzset{myshape/.style={
minimum height=1.5cm,
minimum width=8cm,
align=center,
path picture={
\node[anchor=west, draw, thick, regular polygon, regular polygon sides=6, minimum size=1.6cm, inner sep=0pt](ZZ) at (path picture bounding box.west){};
\node[anchor=center, fill=purple, regular polygon, regular polygon sides=6, minimum size=1.3cm, inner sep=0pt] at (ZZ){#1};
\draw[thick]([yshift=-.5*\pgflinewidth]ZZ.corner 1)--++(5,0)--([xshift=5.5cm]ZZ.corner 6)--([shift={(5,.5*\pgflinewidth)}]ZZ.corner 5)--([yshift=.5*\pgflinewidth]ZZ.corner 5);
}
}}
\begin{document}
\begin{tikzpicture}[node distance=2mm]
\node[myshape=01] (A){Region-based convultional\\neural network (R-CNN)};
\node[myshape=02, below=of A, xshift=1cm] (B){Single Short Multi Box\\Detection (SSD)};
\node[myshape=03, below=of B, xshift=-1cm] (C){You Only Look Once (YOLO)};
\end{tikzpicture}
\end{document}