Compute Library
 22.05
DetectionPostProcessLayer.cpp File Reference

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2022 Arm Limited.
 
 arm_compute::test
 
 arm_compute::test::validation
 

Functions

 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(zip(framework::dataset::make("BoxEncodingsInfo", { TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 3U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::S8), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::QASYMM8)}), framework::dataset::make("ClassPredsInfo",{ TensorInfo(TensorShape(3U, 10U), 1, DataType::F32), TensorInfo(TensorShape(3U, 10U), 1, DataType::F32), TensorInfo(TensorShape(3U, 10U), 1, DataType::F32), TensorInfo(TensorShape(3U, 10U), 1, DataType::F32), TensorInfo(TensorShape(3U, 10U), 1, DataType::F32), TensorInfo(TensorShape(3U, 10U), 1, DataType::QASYMM8)})), framework::dataset::make("AnchorsInfo",{ TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 10U, 1U), 1, DataType::QASYMM8)})), framework::dataset::make("OutputBoxInfo", { TensorInfo(TensorShape(4U, 3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 3U, 1U), 1, DataType::S8), TensorInfo(TensorShape(4U, 3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(1U, 5U, 1U), 1, DataType::F32), TensorInfo(TensorShape(4U, 3U, 1U), 1, DataType::F32)})), framework::dataset::make("OuputClassesInfo",{ TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(6U, 1U), 1, DataType::F32)})), framework::dataset::make("OutputScoresInfo",{ TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(3U, 1U), 1, DataType::F32), TensorInfo(TensorShape(6U, 1U), 1, DataType::F32)})), framework::dataset::make("NumDetectionsInfo",{ TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32)})), framework::dataset::make("DetectionPostProcessLayerInfo",{ DetectionPostProcessLayerInfo(3, 1, 0.0f, 0.5f, 2, {0.1f, 0.1f, 0.1f, 0.1f}), DetectionPostProcessLayerInfo(3, 1, 0.0f, 0.5f, 2, {0.1f, 0.1f, 0.1f, 0.1f}), DetectionPostProcessLayerInfo(3, 1, 0.0f, 0.5f, 2, {0.1f, 0.1f, 0.1f, 0.1f}), DetectionPostProcessLayerInfo(3, 1, 0.0f, 1.5f, 2, {0.0f, 0.1f, 0.1f, 0.1f}), DetectionPostProcessLayerInfo(3, 1, 0.0f, 0.5f, 2, {0.1f, 0.1f, 0.1f, 0.1f}), DetectionPostProcessLayerInfo(3, 1, 0.0f, 0.5f, 2, {0.1f, 0.1f, 0.1f, 0.1f})})), framework::dataset::make("Expected", {true, false, false, false, false, false })), box_encodings_info, classes_info, anchors_info, output_boxes_info, output_classes_info, output_scores_info, num_detection_info, detect_info, expected)
 
 TEST_CASE (Float_general, framework::DatasetMode::ALL)
 
 TEST_CASE (Float_fast, framework::DatasetMode::ALL)
 
 TEST_CASE (Float_regular, framework::DatasetMode::ALL)
 
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
 
SimpleTensor< float > expected_output_boxes (TensorShape(4U, 3U), DataType::F32)
 
 fill_tensor (expected_output_boxes, std::vector< float > { -0.15, 9.85, 0.95, 10.95, -0.15, -0.15, 0.95, 0.95, -0.15, 99.85, 0.95, 100.95 })
 
SimpleTensor< float > expected_output_classes (TensorShape(3U), DataType::F32)
 
 fill_tensor (expected_output_classes, std::vector< float > { 1.0f, 0.0f, 0.0f })
 
SimpleTensor< float > expected_output_scores (TensorShape(3U), DataType::F32)
 
 fill_tensor (expected_output_scores, std::vector< float > { 0.97f, 0.95f, 0.31f })
 
SimpleTensor< float > expected_num_detection (TensorShape(1U), DataType::F32)
 
 fill_tensor (expected_num_detection, std::vector< float > { 3.f })
 
 base_test_case (info, DataType::QASYMM8, expected_output_boxes, expected_output_classes, expected_output_scores, expected_num_detection, AbsoluteTolerance< float >(0.3f))
 
 TEST_CASE (Quantized_fast, framework::DatasetMode::ALL)
 
 TEST_CASE (Quantized_regular, framework::DatasetMode::ALL)