lobe/web-bootstrap

Question around padding

Opened this issue · 0 comments

Great project and lots of good ideas! I'm testing lobe within a Chrome extension but can't seem to make it work. I was wondering if you had any guideline specifically for extension with tfjs?

My code is working only up to @tensorflow/tfjs ^1.7.4 for some reason and the official Google example also uses a very old release: https://github.com/tensorflow/tfjs-examples/blob/master/chrome-extension/src/background.js. I'm using the same settings as the example file generated during the Lobe export (scalar 255, center crop, resize).

Unfortunately the predictions are wrong. They are very accurate when tested locally with Lobe but do not seem to work at all within the extension (all confidence levels seem to be the same, no matter the image). I had to replace the RVhQTElDSVQ= padding with U0FNRQ== as well (not supported in 1.7.4) - could that be the reason?