If you fix everything as mentioned, then you can do some proportions and caculate that based on the the OD model returns
You know that maybe X pixels are close to Y cm and than you calculate.
I’d do that as a post processing step that can be easily calibrated in case something changes