Skip to content

In CV_TRY_AVX2 scope, AVX implementation was called #24677

@atinfinity

Description

@atinfinity

System Information

OpenCV python version: 4.8.1.78
Operating System / Platform: Ubuntu 22.04
Python version: 3.10.12

Detailed description

In CV_TRY_AVX2 scope, AVX implementation(opt_AVX::winofunc_AtXA_8x8_f32) was called.
https://github.com/opencv/opencv/blob/4.8.1/modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.cpp#L275-L286

#if CV_TRY_AVX2
                        if (conv->useAVX2)
                            opt_AVX::winofunc_AtXA_8x8_f32(out_wbuf + ((k - k0)*CONV_WINO_IBLOCK + (block_id - block_id0))*CONV_WINO_AREA, CONV_WINO_SIZE,
                                                                bpptr, outstep, outptr, outstep, biasv, minval, maxval, ifMinMaxAct);
                        else
#endif

Steps to reproduce

import cv2

net = cv2.dnn.readNet("yolov4.weights", "yolov4.cfg")
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_OPENCV)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CPU)

model = cv2.dnn_DetectionModel(net)
model.setInputParams(size=(416, 416), scale=1.0/255.0, swapRB=True)

frame = cv2.imread("dog.jpg")

CONFIDENCE_THRESHOLD = 0.2
NMS_THRESHOLD = 0.4
classes, scores, boxes = model.detect(frame, CONFIDENCE_THRESHOLD, NMS_THRESHOLD)

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions