sima.mini_pipeline_base ======================= .. py:module:: sima.mini_pipeline_base Attributes ---------- .. autoapisummary:: sima.mini_pipeline_base.logger Classes ------- .. autoapisummary:: sima.mini_pipeline_base.MLSoCSession Functions --------- .. autoapisummary:: sima.mini_pipeline_base.process_pipeline_tar Module Contents --------------- .. py:data:: logger .. py:function:: process_pipeline_tar(tar_file, pipeline, modelname) Extracts a tar.gz file, processes it, and moves specific files to a target directory. :param tar_file: Path to the tar.gz file. :type tar_file: str :param pipeline: Name of the application :type pipeline: str :param modelname: Name of the MLSocSession:Model :type modelname: str :raises FileNotFoundError: If the tar.gz file is not found. :raises ValueError: If required files (.lm or .elf, and a valid .json) are not found in the archive. :raises RuntimeError: If any error occurs during extraction or file processing. .. py:class:: MLSoCSession(model_file: str, pipeline: str, frame_width: int, frame_height: int, session_name: str = 'model1', ev_preproc=True) A class for interacting with the MLSoC for model inference. .. py:attribute:: pipeline .. py:attribute:: session_name :value: 'model1' .. py:attribute:: session_id :value: '_________Pipeline: Uninferable| Model: model1_________' .. py:attribute:: ev_preproc :value: True .. py:attribute:: parser_obj .. py:attribute:: model_file .. py:attribute:: tensor_shapes .. py:method:: create_plugin(plugin_class) .. py:method:: configure(model_external_params) -> bool Configures EV74, MLA components with external model parameters :param model_external_params: A dictionary containing external parameters for configuring the model and related components. :type model_external_params: dict .. py:method:: a65_preprocess(in_frame: numpy.ndarray) -> numpy.ndarray .. py:method:: preprocess(in_frame: numpy.ndarray) -> numpy.ndarray Preprocesses the input frame for model inference based on the EV74 configuration :param in_frame: The input frame as a NumPy array. :type in_frame: np.ndarray :returns: The preprocessed frame ready for model inference. :rtype: np.ndarray .. py:method:: run_model(frame: numpy.ndarray) -> Union[numpy.ndarray, List[numpy.ndarray]] Runs the model inference (Preprocess, MLA, and Postprocess) on a given frame. For the following models, the output is from SimaBoxDecode: - ``centernet`` - ``yolo`` - ``detr`` - ``effdet`` :param frame: Input frame as a NumPy array. :type frame: np.ndarray :returns: The output tensor after running the model and applying the appropriate postprocessing. - For the models mentioned above, the output is from SimaBoxDecode containing bounding boxes. - For other models, the output is from Detess Dequant. :rtype: np.ndarray .. py:method:: set_log_level(level: spy.logger.LogLevel) .. py:method:: get_configs() .. py:method:: get_inference_resolution() .. py:method:: release()