tests package¶
Submodules¶
tests.helper module¶
- class Timer[source]¶
Bases:
object
Helper class to measure inference time.
- Example:
>>> import time >>> timer = Timer() >>> with timer: >>> time.sleep(1) >>> print(timer.results[0])
tests.test_tf_architectures module¶
Inference tests using originally trained models
tests.test_tf_lite_architectures module¶
Inference tests using TFLite models
tests.test_yolo_inference module¶
Inference tests using weights of pretrained YOLOv5
- filter_classes(classes_in)[source]¶
transforms one-hot-encoded prediction into class indices
- Parameters
classes_in – one-hot-encoded predictions
- Returns
converted labels
- process_best_prediction(prediction)[source]¶
Select best prediction for each sample
- Parameters
prediction – iterable holding performed predictions
- Returns
The best prediction for each input sample