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

对一段代码不解,特来与up主交流 #12

Closed
gi19901212 opened this issue Nov 4, 2019 · 2 comments
Closed

对一段代码不解,特来与up主交流 #12

gi19901212 opened this issue Nov 4, 2019 · 2 comments

Comments

@gi19901212
Copy link

ocr.pytorch/detect/ctpn_predict.py第43行,
image = image.astype(np.float32) - config.IMAGE_MEAN
对这一步的操作的意义(是减均值吗?),以及config.IMAGE_MEAN取值的依据不懂。。。
我是刚入门机器视觉,问题也比较小白,有劳up主了。。

@courao
Copy link
Owner

courao commented Nov 6, 2019

是的,config.IMAGE_MEAN中的三个值分别是blue green red三个通道的图像均值,在代码里的值是从IMAGENET数据集上一个均值,比较有代表性,其实也可以直接取128简单粗暴一点,其实差异不大

@gi19901212
Copy link
Author

多谢解答,好棒!

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