While reviewing the Zero-DCE loss formulation, I identified a significant inconsistency between the loss weights reported in the paper and the effective loss scaling implemented in the official code.
According to the paper, the loss weights are defined as:
Weight_color = 0.5
Weight_total_variation = 20
Actual implementation :
Loss_TV = 200 * L_TV(A)
loss_col = 5 * mean(L_color(enhanced_image))
loss_exp = 10 * mean(L_exp(enhanced_image))
loss_spa = mean(L_spa(enhanced_image, img_lowlight))
In addition, the TV loss itself contains an internal scaling factor making the weight up too 400:
return 2 * (vertical_tv / count_h + horizontal_tv / count_w) / batch_size
A brief clarification or refactoring the code would help users correctly reuse the model.
While reviewing the Zero-DCE loss formulation, I identified a significant inconsistency between the loss weights reported in the paper and the effective loss scaling implemented in the official code.
According to the paper, the loss weights are defined as:
Weight_color = 0.5
Weight_total_variation = 20
Actual implementation :
In addition, the TV loss itself contains an internal scaling factor making the weight up too 400:
return 2 * (vertical_tv / count_h + horizontal_tv / count_w) / batch_size
A brief clarification or refactoring the code would help users correctly reuse the model.