Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to draw a picture like Figure.2? #8

Open
zqx951102 opened this issue Apr 8, 2023 · 2 comments
Open

How to draw a picture like Figure.2? #8

zqx951102 opened this issue Apr 8, 2023 · 2 comments

Comments

@zqx951102
Copy link

Sorry to contact you again, how to draw a picture like Figure 2 has troubled me for several days, I look forward to your early reply, thank you very much.

@JialeCao001
Copy link
Owner

@zqx951102 hi. Thanks for interest. It is generated with latex.

Please first include this packages.
'''
\usepackage{tikz} %%% change file in input in eso-pic.sty
\usepackage{pgfplots}
\usetikzlibrary{fit}
\pgfplotsset{compat=newest}%
''''

After that, put the following text in your latex.

''''
\begin{figure}[t!]
\centering
\resizebox{8.0cm}{!}{
\begin{minipage}{.475\linewidth}
\resizebox{4.2cm}{!}{%
\begin{tikzpicture}
\begin{axis}[
axis lines = left,
% title={$y=a \cdot x + b$}, %xmin=10, xmax=100,
ymin=22, ymax=52,
xmin=50, xmax=105,
xlabel=Inference time (ms),
ylabel= mAP,
]
\coordinate (legend) at (axis description cs:0.97,0.006);
%% NAE
\addplot[only marks,
mark=otimes*, violet,
mark size=3.5pt
]
coordinates {
(83,43.3)};\label{plot:nae}
%% NAE+
\addplot[only marks,
mark=otimes*, pink,
mark size=3.5pt
]
coordinates {
(98,44.0)};\label{plot:nae+}
%% AlignPS
\addplot[only marks,
mark=otimes*, blue,
mark size=3.5pt
]
coordinates {
(61.9,45.9)};\label{plot:alignps}
%% DMRN
\addplot[only marks,
mark=otimes*, cyan,
mark size=3.5pt
]
coordinates {
(66,46.9)};\label{plot:dmrn}
%% SeqNet
\addplot[only marks,
mark=otimes*, purple,
mark size=3.5pt
]
coordinates {
(86,46.7)};\label{plot:seqnet}
%% PSTR
\addplot[only marks,
mark=triangle*, red,
mark size=6pt
]
coordinates {
(56,49.5)};\label{plot:pstr}
\end{axis}
\node[draw=none,fill=none,anchor= south east] at (legend){\resizebox{5.2cm}{!}{ \begin{tabular}{l|c|c}
Method & mAP & Time \ \hline
\ref{plot:nae} NAE~\cite{Chen_NAE_CVPR_2020} & 43.3 & 83 \
\ref{plot:nae+} NAE+\cite{Chen_NAE_CVPR_2020} & 44.0 & 98 \
\ref{plot:alignps} AlignPS
\cite{Yan_AlignPS_CVPR_2021} & 45.9 & 61 \
\ref{plot:dmrn} DMRN~\cite{Han_DMRN_AAAI_2021} & 46.9 & 66 \
\ref{plot:seqnet}
SeqNet~\cite{Li_SeqNet_AAAI_2021} & 46.7 & 86 \
\hline
\ref{plot:pstr1} \textbf{PSTR} (ours) & \textbf{49.5} & \textbf{56} \
\end{tabular} }};
\end{tikzpicture} }
\end{minipage}
%\qquad
\begin{minipage}{.475\linewidth}
%\resizebox{}{}{}
\resizebox{4.2cm}{!}{%
\begin{tikzpicture}
\begin{axis}[
axis lines = left,
% title={$y=a \cdot x + b$}, %xmin=10, xmax=100,
ymin=65, ymax=90,
xmin=50, xmax=105,
xlabel=Inference time (ms),
ylabel= Top-1 Accuracy,
]
%% NAE
\addplot[only marks,
mark=otimes*, violet,
mark size=3.5pt
]
coordinates {
(83,80.9)};\label{plot:nae1}
%% NAE+
\addplot[only marks,
mark=otimes*, pink,
mark size=3.5pt
]
coordinates {
(98,81.1)};\label{plot:nae+1}
%% AlignPS
\addplot[only marks,
mark=otimes*, blue,
mark size=3.5pt
]
coordinates {
(61.9,81.9)};\label{plot:alignps1}
%% DMRN
\addplot[only marks,
mark=otimes*, cyan,
mark size=3.5pt
]
coordinates {
(66,83.3)};\label{plot:dmrn1}

	%% SeqNet
	\addplot[only marks,
	mark=otimes*, purple,
	mark size=3.5pt
	]
	coordinates {
		(86,83.4)};\label{plot:seqnet1} 			 
	%% PSTR 
	\addplot[only marks,
	mark=triangle*, red,
	mark size=6pt
	]
	coordinates {
		(56,87.8)};\label{plot:pstr1}
	\end{axis}
	\node[draw=none,fill=none,anchor= south east] at (legend){\resizebox{5.2cm}{!}{ \begin{tabular}{l|c|c}
			Method  & Top-1 & Time \\ \hline
			% \ref{plot:oim1} OIM~ & 49.4 & 118   \\
			\ref{plot:nae1} NAE~\cite{Chen_NAE_CVPR_2020}  & 80.9 & 83   \\
			\ref{plot:nae+1} NAE+\cite{Chen_NAE_CVPR_2020}   & 81.1 & 98   \\
			\ref{plot:alignps1} AlignPS~\cite{Yan_AlignPS_CVPR_2021}   & 81.9 & 61   \\
			\ref{plot:dmrn1} DMRN~\cite{Han_DMRN_AAAI_2021}   &83.3 & 66   \\
			\ref{plot:seqnet1}
			SeqNet~\cite{Li_SeqNet_AAAI_2021}   & 83.4 & 86  \\
			\hline
			\ref{plot:pstr1} \textbf{PSTR} (ours)   & \textbf{87.8} & \textbf{56}   \\\	
			\end{tabular}  }};
	\end{tikzpicture}}
\centering  \footnotesize  \vspace{-0.2cm}

\end{minipage}
}\vspace{-0.3cm}
\caption{Accuracy (AP) vs. speed (ms) comparison with existing one-step methods on PRW test set. We show accuracy in terms of mAP (left) and top-1 accuracy (right). All methods use a ResNet50 backbone and the speed is reported on a V100 GPU. Our end-to-end one-step transformer-based PSTR outperforms existing methods in terms of both speed \textit{and} accuracy. } \vspace{-0.2cm}
\label{intro_fig}
\end{figure}
'''

@zqx951102
Copy link
Author

截屏2023-04-09 11 37 33

Thank you very much! It has successfully displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants