Utils: pyvar.ml.utils¶
Label Reader Class¶
pyvar.ml.utils.label¶
- platform:
Unix/Yocto
- synopsis:
Class to handle labels file from Machine Learning models.
Overlay Class¶
pyvar.ml.utils.overlay¶
- platform:
Unix/Yocto
- synopsis:
Class to handle overlay on single images and frames.
- class pyvar.ml.utils.overlay.Overlay[source]¶
- Variables:
inference_time_info – shows the inference time on image/frame;
scores_info – shows the scores on image/frame;
extra_info – shows extra info on image/frame;
framerate_info – shows framerate on image/frame.
- info(category=None, image=None, top_result=None, labels=None, inference_time=None, model_name=None, source_file=None, fps=None)[source]¶
Draw information on single images and frames such as inference time, scores, model name, and source file.
- Parameters:
category (str) – model category (classification or detection);
image (numpy array) – original image to overlay the information.
top_result (list) – top results from the inference.
labels (list) – list of the read labels.
inference_time (str) – inference time from TFLiteInterpreter class.
model_name (str) – the model name.
source_file (str) – the source file name.
fps (float) – fpsit from Framerate class.
- Returns:
The
numpy.array
image format with the overlaid information.
Frames Per Second Calculator Class¶
pyvar.ml.utils.framerate¶
- platform:
Unix/Yocto
- synopsis:
Class to calculate framerate from videos and real time cameras devices.
File Transfer Protocol Class¶
pyvar.ml.utils.retriever¶
Resizer Class¶
pyvar.ml.utils.resizer¶
Timer Calculator Class¶
pyvar.ml.utils.timer¶
- platform:
Unix/Yocto
- synopsis:
Python Class to calculate time.