Image-Adaptive-3DLUT
Image-Adaptive-3DLUT copied to clipboard
Fatal Error (Is it a LUT?)
Actually i dive in the cuda c++ file. Then i found that the input image Tensor should be in size [CHANNEL_SIZE(3), BATCH_SIZE,WIDTH,HEIGHT]. However, in the python code, the input image is [BATCH_SIZE, CHANNEL_SIZE(3), WIDTH, HEIGHT]. So the rgb value is not correct.
it calculate the wrong value.
I don't know whether i'm correct or not.
If i'm correct, the implementation is not a LUT
我发现,c++ cuda中计算rgb时采用的位置是 index (假设这是r), index + batch * width * height (假设这是g), index + 2 * batch * width * height(假设这是b),那么这里计算的是image[0][b_i][w_i][h_i] (r),image[1][b_i][w_i][h_i] (g),image[2][b_i][w_i][h_i] (b).那么调用时image的维度应当是[3][batch][width][height]才对? 否则计算的rgb值都不一定在同一个pixel上和同一个通道上才对?
是否是我理解有误了?我看python中调用时似乎维度使用的是[batch][channel(3)][width][height]
如果我的理解没有错误的话,如果batch_size > 1时,这里使用的就不是LUT了。
Actually i dive in the cuda c++ file. Then i found that the input image Tensor should be in size [CHANNEL_SIZE(3), BATCH_SIZE,WIDTH,HEIGHT]. However, in the python code, the input image is [BATCH_SIZE, CHANNEL_SIZE(3), WIDTH, HEIGHT]. So the rgb value is not correct.
it calculate the wrong value.
I don't know whether i'm correct or not.
If i'm correct, the implementation is not a LUT
In the cuda. the rgb comes from image[0][b_i][w_i][h_i],image[1][b_i][w_i][h_i],image[2][b_i][w_i][h_i].
我发现,c++ cuda中计算rgb时采用的位置是 index (假设这是r), index + batch * width * height (假设这是g), index + 2 * batch * width * height(假设这是b),那么这里计算的是image[0][b_i][w_i][h_i] (r),image[1][b_i][w_i][h_i] (g),image[2][b_i][w_i][h_i] (b).那么调用时image的维度应当是[3][batch][width][height]才对? 否则计算的rgb值都不一定在同一个pixel上和同一个通道上才对?
是否是我理解有误了?我看python中调用时似乎维度使用的是[batch][channel(3)][width][height]
如果我的理解没有错误的话,如果batch_size > 1时,这里使用的就不是LUT了。
我也有点疑问,之前batch_size > 1的时候就会报错?但我没有深入研究