Open franva opened 3 years ago
Hello @franva , usually this is done before converting model into IR format (xml/bin) with model optimizer, see docs here (section When to Specify Mean and Scale Values
). And we already have that on TODO for our firmware, so you will be able to normalize the preview frame from the color camera, CC @themarpe on that.
hi @Erol444 thanks for the timely reply.
The link is broken:
https://discord.com/channels/@me/877120431801376799/877927215831089233
It points to @me which I think it means your own link and others won't be able to see that.
I have found that link, do you mean this one?
If it is the one, then my question is, normally the Normalization requires not only mean
but also std
which I cannot find in OpenVINO's doc. How are we going to handle the std
?
My feeling is that it's better to have the 2 configs, mean
and std
together in one place for convenience.
Sorry @franva , I thought I copied the link not the discord message! I updated the link and yes, it's the correct one. I thought you were talking about scaling and mean values (that model optimizer), why would standard deviation be useful in this case, could you elaborate please? Thanks, Erik
hi @Erol444 sure. I have updated my question and highlighted the changed part.
Start with the
why
:I trained a custom model, this model requires normalization with a specific mean and std. This is the image pre-processing which we normally do before feeding an image to a model for prediction. AND With the
depthai_demo.py
, we have access tohandler.py
. But when the methoddecode()
is hit, we already lost the window to do image pre-processing before the video frame is fed to the model. Thus the data we received frompacket
is not correctly segmented.Move to the
what
:An easy interface or a place where user can specify the
mean
andstd
for the Normalization in an array of transformations.Move to the
how
:May be something like:
Assume the model called
road_seg.blob
:road_seg.json