Object Detection API - Tensorflow - Able to use normalised 2D array inputs?

When using TensorFlow Object Detection API, and FasterCNN model from the Detection Zoo, are you able to store a normalised 2D array (0-1) as floats into a tfrecord and use this as model inputs?

I am running into issues where the model training errors out with “Unknown image file format. One of JPEG, PNG, GIF, BMP required.” which suggests otherwise.

I am using sensor data rather than image data so converting each pixel into a U8 value will ultimately mean I lose information.

Does anyone have any suggestions on how else I can preprocess the data or confirm whether normalised 2D array input would work?

Many thanks in advance.

Hi @Jinfone_Tang ,

You can try this custom input pipeline using TFRecord format

  • Create a custom input pipeline
  • Convert data to image format (with potential information loss)
  • Build a custom model using lower-level TensorFlow APIs
  • Convert 2D array to a 3-channel “image”

Additionally you can refer this documentation for better understanding .

Hope this helps ,
Thank You .