helper_utils ============ .. py:module:: helper_utils Classes ------- .. autoapisummary:: helper_utils.Constants helper_utils.ExtractorConstants helper_utils.RefinerConstants helper_utils.UpSamplerConstants Functions --------- .. autoapisummary:: helper_utils.timeit helper_utils.to_bf16_jax helper_utils.read_json helper_utils.write_json helper_utils.get_nv12 Module Contents --------------- .. py:class:: Constants .. py:attribute:: PROJECT_FOLDER :value: '/data/simaai/applications/RaftStereo' .. py:attribute:: DUMP :value: False .. py:attribute:: DEBUG :value: False .. py:class:: ExtractorConstants .. py:attribute:: unpack_shapes :value: [7864320, 7864320, 3932160, 983040, 245760, 11796480, 2949120, 737280, 245760, 245760] .. py:attribute:: output_shapes :value: [[1, 80, 192, 256], [1, 80, 192, 256], [1, 80, 192, 128], [1, 40, 96, 128], [1, 20, 48, 128],... .. py:attribute:: ifm_size :value: 2949120 .. py:attribute:: ofm_size :value: 36864000 .. py:class:: RefinerConstants .. py:attribute:: unpack_shapes :value: [3932160, 983040, 245760, 245760, 4423680, 245760] .. py:attribute:: ifm_size :value: 36864000 .. py:attribute:: ofm_size :value: 4669440 .. py:attribute:: iter_num :value: 12 .. py:class:: UpSamplerConstants .. py:attribute:: ifm_size :value: 4669440 .. py:attribute:: ofm_size :value: 3932160 .. py:attribute:: flowup_shape :value: [1, 80, 192, 8] .. py:attribute:: upmask_shape :value: [1, 80, 192, 144] .. py:attribute:: HEIGHT :value: 1280 .. py:attribute:: WIDTH :value: 720 .. py:attribute:: output_dim :value: 0 .. py:function:: timeit(func) .. py:function:: to_bf16_jax(data) .. py:function:: read_json(filename='data.json') Reads a JSON file and returns the data as a dictionary. .. py:function:: write_json(data, filename='data.json') Writes a dictionary to a JSON file. .. py:function:: get_nv12(bgr_image)