本文主要解读我遇到一个比较好的语义分割训练模型,所以我决定认真学习。
如有错误请大家多多指点,共同进步。
开始学习,主要列出我理解的程序逻辑流程,以及读不懂的语句。(以下英文解释都是我help出来的 )
-
random.randint(0,1)
randint(a, b) method of random.Random instance
Return random integer in range [a, b], including both end points.
随机在(0,1)之间返回一个正数,那么只能是0或者1。 -
input_image = cv2.flip(input_image, 1)
The function cv::flip flips the array in one of three different ways (row and column indices are 0-based)
param flipCode a flag to specify how to flip the array;
0 means flipping around the x-axis
positive value (for example, 1) means flipping around y-axis
Negative value (for example, -1) means flipping around both axes.
用于输入图片的旋转,0代表沿x轴,1代表沿y轴,-1代表沿xy旋转即原点。 -
input_image = cv2.LUT(input_image, table)
The function LUT fills the output array with values from the look-up table. Indices of the entries are taken from the input array
函数LUT用查找表