• DepthAI-v2
  • [error] Input tensor 'images' (0) exceeds available data range.

Hello.

Using the depthai-experiment -> gen2-fire-detection example, the new model was converted using onnx -> online blob converter.
There is a log as below in the terminal.

[NeuralNetwork(0)] [error] Input tensor 'images' (0) exceeds available data range. Data size (150528B), tensor offset (0), size (1228800B) - skipping inference

I saw it in another article and also checked the -ip U8 option.

What more can I try?

Thank you in advance

  • erik replied to this.
  • Hi leoj
    Your pipeline is feeding stream from video output of the camera node. The frame type is NV12 which is not RGB. To get the RGB output, use the camRgb.preview instead.

    Docs here.

    Thanks,
    Jaka

    Hi yeo ,
    What should be the input size to your model? You can check either with Netron, or if you only have blob you can use this script. As you are giving it more bytes than what it expects.
    Thanks, Erik

    • yeo replied to this.
    • yeo likes this.

      erik
      I did a blob converter through an depthai-experiments example. ( gen2-custom-models/generate_model/pytorch_nomalize.py)

      This is the result of taking the log with the script you told me.

      Inputs
      Name: scale, Type: DataType.FP16, Shape: [1, 1, 1] (StorageOrder.CHW)
      Name: mean, Type: DataType.FP16, Shape: [1, 1, 1] (StorageOrder.CHW)
      Name: frame, Type: DataType.FP16, Shape: [300, 300, 3] (StorageOrder.CHW)
      Outputs
      Name: output, Type: DataType.FP16, Shape: [300, 300, 3] (StorageOrder.CHW)

      The error has changed, but a similar error appears. 🙁

      [18443010F188940F00] [1.10.3.4] [11.717] [NeuralNetwork(0)] [error] Input tensor 'frame' (0) exceeds available data range. Data size (270000B), tensor offset (0), size (540000B) - skipping inference
      • erik replied to this.

        Hi yeo ,
        Could you share the script you are using? I assume you are passing a frame too large (so model expects smaller frame).
        Thanks, Erik

        • yeo replied to this.

          erik
          I used this script

          The script used for the model is this.

          I converted through an example, and when I applied the converted model, an error continued to occur.

          Even after changing the model size to fit, the error still occurs.
          I don't know that part yet.

          [18443010F188940F00] [1.10.3.4] [5.907] [NeuralNetwork(0)] [error] Input tensor 'mean' (1) exceeds available data range. Data size (270000B), tensor offset (270016), size (1B) - skipping inference
          • erik replied to this.
            a year later

            Hey Erik,

            I am having a similar problem, and ran your script with the following output:
            Inputs

            Name: images, Type: DataType.U8F, Shape: [448, 224, 3, 1] (StorageOrder.NCHW)

            Outputs

            Name: output1_yolov7, Type: DataType.FP16, Shape: [56, 28, 18, 1] (StorageOrder.NCHW)

            Name: output2_yolov7, Type: DataType.FP16, Shape: [28, 14, 18, 1] (StorageOrder.NCHW)

            Name: output3_yolov7, Type: DataType.FP16, Shape: [14, 7, 18, 1] (StorageOrder.NCHW)

            The model seems to be expecting a 448x224 image with 3 channels (RGB) but when passed an image that I believe is the right size using this script the following error is output:

            [14442C10314230D700] [10.53.168.72] [10.584] [NeuralNetwork(2)] [error] Input tensor 'images' (0) exceeds available data range. Data size (150528B), tensor offset (0), size (301056B) - skipping inference.

            Any help would be appreciated 🙂

            Edit: Using the same code but resizing to 640x640 instead in line 18 the following warning is obtained:

            [14442C10314230D700] [10.53.168.72] [11.671] [NeuralNetwork(2)] [warning] Input image (640x640) does not match NN (448x224)

            Interestingly, here the error is gone. Let me know your thoughts.

              Hi leoj
              Your pipeline is feeding stream from video output of the camera node. The frame type is NV12 which is not RGB. To get the RGB output, use the camRgb.preview instead.

              Docs here.

              Thanks,
              Jaka

              • leoj replied to this.