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

mean and std Norm ? #13

Closed
ucas010 opened this issue Apr 8, 2020 · 3 comments
Closed

mean and std Norm ? #13

ucas010 opened this issue Apr 8, 2020 · 3 comments

Comments

@ucas010
Copy link

ucas010 commented Apr 8, 2020

hi,dear 大佬
对于得到的视频帧数据为何进行固定mean和std参数的Norm处理啊?
codes is here
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
这个有什么参考或者说依据吗?
多谢

@lidq92
Copy link
Owner

lidq92 commented Apr 8, 2020

@ucas010 这个就是预训练图像分类模型里做的预处理操作。
我直接用的预训练好的模型,所以follow这个预训练好的模型需要的预处理操作。
当然在i/vqa问题中,不做预处理操作也许更合适,但是这样需要自己预训练一个不需要预处理操作的图像分类模型。

@ucas010
Copy link
Author

ucas010 commented Apr 8, 2020

@lidq92
多谢。
我对torch不太熟,但我发现tf训练的模型似乎都没有这个操作啊

@lidq92
Copy link
Owner

lidq92 commented Apr 8, 2020

@ucas010
早期的Caffe有减均值图像的做法,PyTorch的torchvision里提供的图像分类模型是有我代码里那个预处理操作的,可以看torchvision/models.html#classification
至于TensorFlow,你可以自己再好好看看相关资料,以实际训练的时候的操作为准。比如我粗略搜了一下,你可以看看这两个文件preprocessing.pyimagenet_preprocessing.py

我不使用TensorFlow,所以关于TensorFlow的具体细节你可以自己再深入看看。

祝好。

@ucas010 ucas010 closed this as completed Apr 9, 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