aster.pytorch icon indicating copy to clipboard operation
aster.pytorch copied to clipboard

About the testing time comsumption

Open RuijieJ opened this issue 4 years ago • 5 comments

According to the original paper, the recognition time for each image is 20ms. I modified demo.py, let it recognize all the images on the ICDAR2003 test set, and computed the average recognition time.

The following is my modification:

image

and the output is

average time = 168.360ms

which is larger than 20ms. I did the recognition on a single NVIDIA Tesla V100 GPU. I don't think using PyTorch will cause so much extra time consumption (I even ignore the time of reading image and preprocessing). So I wonder what is the problem.

Thanks very much.

RuijieJ avatar Jun 01 '20 06:06 RuijieJ

I guess there should be two reasons,

  1. I am not very sure that the 20ms in our paper is whether tested with beam width 1.
  2. The max_len in TF version is 30, see here? But in the pytorch version, 100 is used.

If you want to confirm the first point, you can run our TF code on a single NVIDIA TITAN Xp GPU with different beam widths.

ayumiymk avatar Jun 01 '20 15:06 ayumiymk

I guess there should be two reasons,

  1. I am not very sure that the 20ms in our paper is whether tested with beam width 1.
  2. The max_len in TF version is 30, see here? But in the pytorch version, 100 is used.

If you want to confirm the first point, you can run our TF code on a single NVIDIA TITAN Xp GPU with different beam widths.

Thanks. I found the slow test speed is caused by the first test sample. It took a long time to recognize the first sample, and the following samples will become faster. I ignore the test time of the first sample, and the average test time is 48ms (with beam width 1 and max_len 25). Although it is still larger than 20ms, it is acceptable.

RuijieJ avatar Jun 28 '20 04:06 RuijieJ

I guess there should be two reasons,

  1. I am not very sure that the 20ms in our paper is whether tested with beam width 1.
  2. The max_len in TF version is 30, see here? But in the pytorch version, 100 is used.

If you want to confirm the first point, you can run our TF code on a single NVIDIA TITAN Xp GPU with different beam widths.

我想应该有两个原因,

  1. 我不太确定论文中的20毫秒是否经过1毫米的光束宽度测试。
  2. TF版本中的max_len是30,请看这里?但是在pytorch版本中,使用了100。

如果要确认第一点,则可以在具有不同光束宽度的单个NVIDIA TITAN Xp GPU上运行我们的TF代码。

谢谢。我发现测试速度慢是由第一个测试样本引起的。花了很长时间才能识别出第一个样本,随后的样本会变得更快。我忽略了第一个样本的测试时间,平均测试时间为48ms(光束宽度为1,max_len为25)。尽管它仍然大于20ms,但是可以接受。

Hello, can the training and test code run through git bash, but can't run on the windows software platform?

Thank you very much.

mengxiaolu avatar Sep 10 '20 07:09 mengxiaolu

I guess there should be two reasons,

  1. I am not very sure that the 20ms in our paper is whether tested with beam width 1.
  2. The max_len in TF version is 30, see here? But in the pytorch version, 100 is used.

If you want to confirm the first point, you can run our TF code on a single NVIDIA TITAN Xp GPU with different beam widths.

我想应该有两个原因,

  1. 我不太确定论文中的20毫秒是否经过1毫米的光束宽度测试。
  2. TF版本中的max_len是30,请看这里?但是在pytorch版本中,使用了100。

如果要确认第一点,则可以在具有不同光束宽度的单个NVIDIA TITAN Xp GPU上运行我们的TF代码。

谢谢。我发现测试速度慢是由第一个测试样本引起的。花了很长时间才能识别出第一个样本,随后的样本会变得更快。我忽略了第一个样本的测试时间,平均测试时间为48ms(光束宽度为1,max_len为25)。尽管它仍然大于20ms,但是可以接受。

Hello, can the training and test code run through git bash, but can't run on the windows software platform?

Thank you very much.

Sorry, it only runs on Linux.

ayumiymk avatar Sep 11 '20 21:09 ayumiymk

请问您知道如何在测试时候输出矫正图像吗?

lrfighting avatar Apr 20 '22 10:04 lrfighting