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

使用GPU运行车牌检查,有警告,运行耗时比CPU #2

Closed
woshiwoyali opened this issue Feb 13, 2020 · 8 comments
Closed

使用GPU运行车牌检查,有警告,运行耗时比CPU #2

woshiwoyali opened this issue Feb 13, 2020 · 8 comments

Comments

@woshiwoyali
Copy link

No description provided.

@woshiwoyali
Copy link
Author

使用命令sudo python test.py / home / zjs / Desktop /车牌测试/ --no_yolo --beam --gpu
其中/ home / zjs / Desktop /车牌测试/是一个目录,目录中包含了11张图片,有些图片中不含有车牌,
运行结果:
sudo python test.py /home/zjs/Desktop/车牌测试/ --no_yolo --beam --gpu
[17:10:29] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (set the environment variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
粤BD01940 0.9999887 /home/zjs/Desktop/车牌测试/0004.jpg
[17:10:36] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (set the environment variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
鲁H0A025 0.9999391 /home/zjs/Desktop/车牌测试/0006.jpeg
苏A2396V 0.99999845 /home/zjs/Desktop/车牌测试/1.jpg
[17:10:46] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (set the environment variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
吉AF16666 0.99992096 /home/zjs/Desktop/车牌测试/0002.jpeg
京HF5427 0.9999348 /home/zjs/Desktop/车牌测试/1.jpeg
湘DD08808 0.9999857 /home/zjs/Desktop/车牌测试/0001.jpeg
鲁鲁HC999 0.9943006 /home/zjs/Desktop/车牌测试/200.jpeg
[17:10:56] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (set the environment variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
耗时 30 s

这个警告应该如何解决呢?并且在使用GPU的情况下,为什么耗时对比CPU更大了呢?我应该如何修改?

@ufownl
Copy link
Owner

ufownl commented Feb 13, 2020

这个并不是警告,那是mxnet自动选择卷积算法的提示,这是一个比较费时的操作,如果需要屏蔽按提示设置环境变量即可

@ufownl
Copy link
Owner

ufownl commented Feb 13, 2020

另外,因为模型规模本身不算大,单张图片使用GPU并不能有很好的加速效果。

@woshiwoyali
Copy link
Author

对于车牌检测的图片大小有什么要求吗?比如640×480

@woshiwoyali
Copy link
Author

我修改了环境变量,添加了export MXNET_CUDNN_AUTOTUNE_DEFAULT=0
设置,但是在使用GPU时,依然会报警告。这个需要怎么屏蔽掉呢?

@woshiwoyali
Copy link
Author

对于车牌检测的图片大小有什么要求吗?比如 640×480

@ufownl
Copy link
Owner

ufownl commented Feb 13, 2020

我这边设置好环境变量过后就可以了,耗时就会大幅度降低。或者你试试这样:

MXNET_CUDNN_AUTOTUNE_DEFAULT=0 python3 test.py --beam --gpu /path/to/image

模型是全卷积网络,理论上对图片大小没有要求。只是过大的图片对提高准确率并没有太大的帮助,所以你自己根据情况找一个效率和准确率的平衡点就好。

@woshiwoyali
Copy link
Author

好的,我试一下,感谢您的回答

@ufownl ufownl closed this as completed Feb 13, 2020
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