'How to compute anchors for Mediapipe TFLite-models?

I need to use object_detection_mobile_cpu.tflite model from Mediapipe library using TensorFlow Lite (without actual dependency to Mediapipe). I have found a sample project that uses face_detection_short_range.tflite from the same set. The problem is that it makes use of some important metadata which doesn't seem to be provided explicitly with the models.

// 2 x 16 x 16 and 6 x 8 x 8 --> 896 (number of boxes)
const int sizes[NUM_SIZES] = {16, 8};
const int numLayers[NUM_SIZES] = {2, 6};

My question is whether I can deduce these numbers that require for output anchor calculation from using TensorFlow Lite API or I should find this info somewhere else?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source