Skip to content

Test_Caffe_nets.FasterRCNN_vgg16 fails with ENABLE_FAST_MATH option #24016

@asmorkalov

Description

@asmorkalov

System Information

OpenCV: current 4.x (4.8.0-dev)
Platform: Ubuntu 18.04, GCC 7.5
Hardware: Core i5 2500k (no avx2 and no avx512)

Detailed description

Net inference accuracy issue is raised.

Steps to reproduce

cmake -DENABLE_FAST_MATH=1 ../opencv
make -j4
./bin/opencv_test_dnn --gtest_filter="Test_Caffe_nets.FasterRCNN_vgg16/*"

Log:

[ RUN      ] Test_Caffe_nets.FasterRCNN_vgg16/2, where GetParam() = OCV/CPU
Unmatched prediction: class 7 score 0.997029 box [235.421 x 83.0574 from (483.244, 92.7312)]
Highest IoU: 0.970777
/home/alexander/Projects/OpenCV/opencv-master/modules/dnn/test/test_common.impl.hpp:145: Failure
Value of: matched
  Actual: false
Expected: true
model name: VGG16_faster_rcnn_final.caffemodel
Unmatched prediction: class 12 score 0.993107 box [213.524 x 372.432 from (136.32, 189.653)]
Highest IoU: 0
/home/alexander/Projects/OpenCV/opencv-master/modules/dnn/test/test_common.impl.hpp:145: Failure
Value of: matched
  Actual: false
Expected: true
model name: VGG16_faster_rcnn_final.caffemodel
Unmatched prediction: class 2 score 0.948399 box [502.178 x 251.37 from (98.8219, 211.123)]
Highest IoU: 0
/home/alexander/Projects/OpenCV/opencv-master/modules/dnn/test/test_common.impl.hpp:145: Failure
Value of: matched
  Actual: false
Expected: true
model name: VGG16_faster_rcnn_final.caffemodel
Unmatched reference: class 2 score 0.949398 box [501.96 x 252.708 from (99.2454, 210.141)] IoU diff: 1
/home/alexander/Projects/OpenCV/opencv-master/modules/dnn/test/test_common.impl.hpp:157: Failure
Expected: (refScores[i]) <= (confThreshold), actual: 0.949398 vs 0.8
model name: VGG16_faster_rcnn_final.caffemodel
Unmatched reference: class 7 score 0.997022 box [240.844 x 83.6312 from (481.841, 92.3218)] IoU diff: 0.0292231
/home/alexander/Projects/OpenCV/opencv-master/modules/dnn/test/test_common.impl.hpp:157: Failure
Expected: (refScores[i]) <= (confThreshold), actual: 0.997022 vs 0.8
model name: VGG16_faster_rcnn_final.caffemodel
Unmatched reference: class 12 score 0.993028 box [217.773 x 373.789 from (133.221, 189.377)] IoU diff: 1
/home/alexander/Projects/OpenCV/opencv-master/modules/dnn/test/test_common.impl.hpp:157: Failure
Expected: (refScores[i]) <= (confThreshold), actual: 0.993028 vs 0.8
model name: VGG16_faster_rcnn_final.caffemodel
[  FAILED  ] Test_Caffe_nets.FasterRCNN_vgg16/2, where GetParam() = OCV/CPU (9083 ms)

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions