本文作爲臨時筆記,記錄筆者在使用caffe2
時候的一些問題和解決方法,有空再進行詳細整理。
- 在
caffe2
中對視頻的單幀進行了零均值標準化處理,也就是如式子(1.1)所示:
從源碼上看[1],這裏的均值mean
和方差std
分別是:
// 7 channels: (flow_x, flow_y, flow_magitude, gray, Red, Green, Blue)
const std::vector<float> InputDataMean = {
0.0046635, 0.0046261, 0.963986, 102.976, 110.201, 100.64, 95.9966};
const std::vector<float> InputDataStd = {
0.972347, 0.755146, 1.43588, 55.3691, 58.1489, 56.4701, 55.3324};
方差是[58.1489, 56.4701, 55.3324]
, 均值是[110.201, 100.64, 95.9966]
,排序是RGB
。
Reference
[1]. https://github.com/pytorch/pytorch/blob/master/caffe2/video/video_input_op.h#L374-L378