andreas128/RePaint

Discrepancy in pixel values output by the model

poitevie opened this issue · 0 comments

Hello,

I'm encountering an issue with the model and I was hoping to seek some assistance to resolve it. I have an image that is inputted into the model, which operates on 8-bit pixel values. However, I've noticed that the model outputs slightly different pixel values compared to the input (for example, I expect a pixel unaffected by the mask to retain its original values of 19, 38, 41, but instead, I receive values of 18, 37, 39).

I suspect that this discrepancy could be due to rounding errors or possibly an issue within the "toU8" function, which I have attempted to modify without achieving the desired results. It's crucial for my application to have the exact same pixel values as those passed into the model.

If anyone could kindly offer assistance or guidance on this matter, I would greatly appreciate it.

I'm looking forward to your answer.
Thank you for your time and consideration.