• model

Dear OAK-D support team,
I recently started to train a model with the intent of using it on OAK-D camera.
For this, I referred to https://colab.research.google.com/github/luxonis/depthai-ml-training/blob/master/colab-notebooks/Easy_TinyYOLOv4_Object_Detector_Training_on_Custom_Data.ipynb#scrollTo=FcGqlLT3un1O

I successfully trained the custom model and was able to make prediction using it on an Image.
However, I continued with the steps for convert model so it can be used on DepthAI as in the article

This requires three steps: 1. Convert model to Tensorflow frozen model. 2. Convert Tf model to OpenVINO IR files .xml and .bin. 3. Compile a blob from the IR files. The blob can be used for inference on DepthAI modules.

I converted my model best weight to Tensorflow frozen and have the .pb file.

I also carried the 2 and 3 step and have the blob file.

However, when i tried to use my model in the camera, I get thes error messages

Input tensor 'input_1' (0) exceeds available data range. Data size (519168B), tensor offset (0), size (1108992B) - skipping inference

Mask is not defined for output layer with width '1000'. Define at pipeline build time using: 'setAnchorMasks' for 'side1000'.

Input image (608x608) does not match NN (3x608)

Kindly assist me in resolving this challenge.

Thanks

    Hi AJ_Chizu

    AJ_Chizu Input tensor 'input_1' (0) exceeds available data range. Data size (519168B), tensor offset (0), size (1108992B) - skipping inference

    It's likely you are linking a video stream (instead of preview) to the NN node (through ImgManip) OR you have a model trained for U8 and you are feeding it FP16 - in which case (https://docs.luxonis.com/en/latest/pages/model_conversion/#compile-tool).

    AJ_Chizu Mask is not defined for output layer with width '1000'. Define at pipeline build time using: 'setAnchorMasks' for 'side1000'.

    When compiling the blob, you should also get a .json file that has information on masks and anchors. Use those in your code.

    AJ_Chizu Input image (608x608) does not match NN (3x608)

    https://docs.luxonis.com/en/latest/pages/model_conversion/#model-layout-parameter

    Thanks,
    Jaka

    5 days later

    Hello Jaka
    Thanks for your reply.
    Unfortunately, I still have challenge at this stage.

    As pointed out in your reply "When compiling the blob, you should also get a .json file that has information on masks and anchors. Use those in your code."

    I actually didn't get this .json file when I converted from weights to TF frozen.
    Also my model was trained for U8.

    I will appreciate you assistance in walking me through this phase (converting and integrating the model)
    Regards