# \#dnn

**URL:** https://forum.opencv.org/tag/dnn/1.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [Does an app already exist that can automatically sort graduation photos by person?](https://forum.opencv.org/t/does-an-app-already-exist-that-can-automatically-sort-graduation-photos-by-person/24777)

<div class="topic-metadata">

**Author:** [@christian.g.arleo](https://forum.opencv.org/u/christian.g.arleo)\
**Replies:** 2\
**Last updated:** [November 24, 2026, 7:27pm UTC](https://forum.opencv.org/t/does-an-app-already-exist-that-can-automatically-sort-graduation-photos-by-person/24777 "2026-11-24T19:27:29Z")

</div>

I’m looking for software that can organize hundreds of graduation/event photos into folders for each person. Some photos contain diplomas with names, which could be used to identify and group the surrounding photos. Be…

---

## [Opencv 5 with onnx qustions](https://forum.opencv.org/t/opencv-5-with-onnx-qustions/24734)

<div class="topic-metadata">

**Author:** [@turner](https://forum.opencv.org/u/turner)\
**Replies:** 0\
**Last updated:** [October 2, 2026, 7:28am UTC](https://forum.opencv.org/t/opencv-5-with-onnx-qustions/24734 "2026-10-02T07:28:07Z")

</div>

Hi I have some questions regarding opencv5: Is the module dnn still maintained? I have exported a yolov4-tiny from darknet https://darknetcv.ai/ can I be advised me if this will be supported with opencv5/dnn? I want to…

---

## [Training data / provenance of the res10 SSD face detector](https://forum.opencv.org/t/training-data-provenance-of-the-res10-ssd-face-detector/24612)

<div class="topic-metadata">

**Author:** [@ritesh\_kumar](https://forum.opencv.org/u/ritesh_kumar)\
**Replies:** 0\
**Last updated:** [July 10, 2026, 3:58am UTC](https://forum.opencv.org/t/training-data-provenance-of-the-res10-ssd-face-detector/24612 "2026-07-10T03:58:14Z")

</div>

Hi all, We use OpenCV 4.5.3 (DNN module) with the bundled ResNet-10 SSD face detector — res10\_300x300\_ssd\_iter\_140000\_fp16.caffemodel + deploy.prototxt from samples/dnn/face\_detector. We run it for inference only (no tr…

---

## [Failed to parse ONNX model](https://forum.opencv.org/t/failed-to-parse-onnx-model/24494)

<div class="topic-metadata">

**Author:** [@Cawa](https://forum.opencv.org/u/Cawa)\
**Replies:** 3\
**Last updated:** [May 6, 2026, 8:48pm UTC](https://forum.opencv.org/t/failed-to-parse-onnx-model/24494 "2026-05-06T20:48:34Z")

</div>

Hello, I’m trying to make a face recognition with OpenCV and ONNX models on a Raspberry Pi 5 but while I’m running my program it can parse ONNX shown as below (I’m using face\_detection\_yunet\_2023mar.onnx and face\_recogni…

---

## [How to use ultralytics models in opencv/samples/dnn/object\_detection.cpp](https://forum.opencv.org/t/how-to-use-ultralytics-models-in-opencv-samples-dnn-object-detection-cpp/24325)

<div class="topic-metadata">

**Author:** [@paul\_12481248](https://forum.opencv.org/u/paul_12481248)\
**Replies:** 0\
**Last updated:** [January 25, 2026, 11:50am UTC](https://forum.opencv.org/t/how-to-use-ultralytics-models-in-opencv-samples-dnn-object-detection-cpp/24325 "2026-01-25T11:50:54Z")

</div>

Hello, On OpenCV 4.14.0-pre, I tried ultralytics models yolov5lu.pt, yolov5nu.pt yolov8l.pt, yolov8n.pt, yolo11l.pt, yolo11n.pt, yolo26l.pt, yolo26n.pt (downloaded from ultralytics), which I have converted to onnx with …

---

## [Cant use yolov10 in ONNX format with opencv](https://forum.opencv.org/t/cant-use-yolov10-in-onnx-format-with-opencv/24321)

<div class="topic-metadata">

**Author:** [@Nazar\_Pankov](https://forum.opencv.org/u/Nazar_Pankov)\
**Replies:** 1\
**Last updated:** [January 22, 2026, 10:21pm UTC](https://forum.opencv.org/t/cant-use-yolov10-in-onnx-format-with-opencv/24321 "2026-01-22T22:21:26Z")

</div>

I’ve trained yolov10 model and exported it in .onnx. Then I want to use it in my c++ code, but getting error during processing node with 2 inputs and 2 outputs. Here is full output with this error: \[ERROR:0@0.126\] glob…

---

## [Net.forward crash using cv::dnn::blobFromImages](https://forum.opencv.org/t/net-forward-crash-using-cv-blobfromimages/24313)

<div class="topic-metadata">

**Author:** [@Andrea\_Di\_Chiara](https://forum.opencv.org/u/Andrea_Di_Chiara)\
**Replies:** 2\
**Last updated:** [January 20, 2026, 4:01pm UTC](https://forum.opencv.org/t/net-forward-crash-using-cv-blobfromimages/24313 "2026-01-20T16:01:29Z")

</div>

Hi, I’m using an ONNX classification model and I’m testing inference using opencv 4.12.0. I have no problem using the net over a single image sample: cv::dnn::blobFromImage( frame, blob, 1.0/255.0, imgSz, cv::Scalar(),…

---

## [\[GSoC 2026\] RISC-V Optimizations for DNN Module (Starting with Winograd/Winograd63)](https://forum.opencv.org/t/gsoc-2026-risc-v-optimizations-for-dnn-module-starting-with-winograd-winograd63/24238)

<div class="topic-metadata">

**Author:** [@\_Sk\_iitd](https://forum.opencv.org/u/_Sk_iitd)\
**Replies:** 5\
**Last updated:** [January 5, 2026, 10:55am UTC](https://forum.opencv.org/t/gsoc-2026-risc-v-optimizations-for-dnn-module-starting-with-winograd-winograd63/24238 "2026-01-05T10:55:06Z")

</div>

Hi everyone, I am an Electrical Engineering student from IIT Delhi interested in the RISC-V Optimization project for GSoC 2026. My Analysis so far: I have been auditing the modules/dnn kernels and noticed that while AV…

---

## [Nasty errors with blobFromImage](https://forum.opencv.org/t/nasty-errors-with-blobfromimage/24100)

<div class="topic-metadata">

**Author:** [@Bamboo324](https://forum.opencv.org/u/Bamboo324)\
**Replies:** 2\
**Last updated:** [October 6, 2025, 5:50pm UTC](https://forum.opencv.org/t/nasty-errors-with-blobfromimage/24100 "2025-10-06T17:50:33Z")

</div>

\[ERROR:0\] global \\dnn\\src\\dnn.cpp (3512) getLayerShapesRecursively OPENCV/DNN: \[Reshape\]:(/model.10/m/m.0/attn/Reshape\_output\_0): getMemoryShapes() throws exception. inputs=1 outputs=1/1 blobs=0 \[ERROR:0\] global \\dnn\\sr…

---

## [Error using PyTorch Yolo5 model after conversion to ONNX](https://forum.opencv.org/t/error-using-pytorch-yolo5-model-after-conversion-to-onnx/24022)

<div class="topic-metadata">

**Author:** [@bluedalmatian](https://forum.opencv.org/u/bluedalmatian)\
**Replies:** 0\
**Last updated:** [September 14, 2025, 9:53pm UTC](https://forum.opencv.org/t/error-using-pytorch-yolo5-model-after-conversion-to-onnx/24022 "2025-09-14T21:53:43Z")

</div>

Im trying to use a custom trained Yolo5 model which Ive then converted to ONNX to use with OpenCV. The error Im getting is outputs = net.forward(net.getUnconnectedOutLayersNames()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…

---

## [Detecting breast microcalcifications with YOLO — small object detection challenges](https://forum.opencv.org/t/detecting-breast-microcalcifications-with-yolo-small-object-detection-challenges/23780)

<div class="topic-metadata">

**Author:** [@isaac\_juakaly](https://forum.opencv.org/u/isaac_juakaly)\
**Replies:** 0\
**Last updated:** [August 15, 2025, 1:22pm UTC](https://forum.opencv.org/t/detecting-breast-microcalcifications-with-yolo-small-object-detection-challenges/23780 "2025-08-15T13:22:52Z")

</div>

I’m working on a project to detect breast microcalcifications in mammograms using YOLO (Ultralytics). My dataset consists of high-resolution images (2048×2048) with precise YOLO-format annotations. Main challenge: Mi…

---

## [OpenCV NPU support](https://forum.opencv.org/t/opencv-npu-support/23725)

<div class="topic-metadata">

**Author:** [@bluedalmatian](https://forum.opencv.org/u/bluedalmatian)\
**Replies:** 1\
**Last updated:** [August 11, 2025, 7:34pm UTC](https://forum.opencv.org/t/opencv-npu-support/23725 "2025-08-11T19:34:08Z")

</div>

I read with interest the press release at Working with Neural Processing Units (NPUs) using OpenCV - OpenCV which shows a nice elegant API for handing off processing to an NPU however it only supports the A311D chip curr…

---

## ["Failed to initialize Inference Engine backend" on MyriadX](https://forum.opencv.org/t/failed-to-initialize-inference-engine-backend-on-myriadx/13679)

<div class="topic-metadata">

**Author:** [@triangulum](https://forum.opencv.org/u/triangulum)\
**Replies:** 6\
**Last updated:** [August 1, 2025, 5:24pm UTC](https://forum.opencv.org/t/failed-to-initialize-inference-engine-backend-on-myriadx/13679 "2025-08-01T17:24:44Z")

</div>

Note: sorry for string links - since I created this account recently, I can’t include more than 2 links in one post. Note 2: this question was originally asked on OpenVINO github. Using OpenVINO 2022.2 with OpenCV 4.7…

---

## [When deploying the same code on a C++ OpenCV DNN CPU, does version 4.11.0 require twice as much execution time as version 4.5.3?](https://forum.opencv.org/t/when-deploying-the-same-code-on-a-c-opencv-dnn-cpu-does-version-4-11-0-require-twice-as-much-execution-time-as-version-4-5-3/23431)

<div class="topic-metadata">

**Author:** [@Cen](https://forum.opencv.org/u/Cen)\
**Replies:** 3\
**Last updated:** [August 1, 2025, 1:01pm UTC](https://forum.opencv.org/t/when-deploying-the-same-code-on-a-c-opencv-dnn-cpu-does-version-4-11-0-require-twice-as-much-execution-time-as-version-4-5-3/23431 "2025-08-01T13:01:33Z")

</div>

OpenCV version 4.11.0 was reported to include optimizations for the performance of the \`cv::dnn::blobFromImage()\` function. Based on this, I intended to improve the runtime efficiency by upgrading from the original versi…

---

## [How to use output of dnn::net::forward()](https://forum.opencv.org/t/how-to-use-output-of-dnn-forward/20953)

<div class="topic-metadata">

**Author:** [@kishor\_durve](https://forum.opencv.org/u/kishor_durve)\
**Replies:** 4\
**Last updated:** [June 13, 2025, 1:01am UTC](https://forum.opencv.org/t/how-to-use-output-of-dnn-forward/20953 "2025-06-13T01:01:54Z")

</div>

I am trying to use dnn::hed for edge detection for detecting hard to find edges in an image. I am giving below the code snippet that I am using. I am using Opencv 4.10 on Windows 10, VS2022. // gray is the input Mat cv…

---

## [Segmentation with an AI model with Opencv](https://forum.opencv.org/t/segmentation-with-an-ai-model-with-opencv/21101)

<div class="topic-metadata">

**Author:** [@CJACQUEL](https://forum.opencv.org/u/CJACQUEL)\
**Replies:** 0\
**Last updated:** [May 27, 2025, 7:58am UTC](https://forum.opencv.org/t/segmentation-with-an-ai-model-with-opencv/21101 "2025-05-27T07:58:46Z")

</div>

Hello, How to segment an image using an AI model like SAM, using C++ and opencv. Do you have an example? Thx

---

## [Opencv DNN c++ GPU issue](https://forum.opencv.org/t/opencv-dnn-c-gpu-issue/20834)

<div class="topic-metadata">

**Author:** [@samblueocean](https://forum.opencv.org/u/samblueocean)\
**Replies:** 1\
**Last updated:** [May 12, 2025, 11:51am UTC](https://forum.opencv.org/t/opencv-dnn-c-gpu-issue/20834 "2025-05-12T11:51:24Z")

</div>

My YOLOv8 model is trained on RTX 4090 using Ultralytics. I exported it to ONNX. And when I use the model using opencv DNN in C++ for inference on any other GPU than 4090 (4060, A6000) I do not have good accuracy. The sa…

---

## [DirectML backend for dnn - confusion with G-API/onnx](https://forum.opencv.org/t/directml-backend-for-dnn-confusion-with-g-api-onnx/20989)

<div class="topic-metadata">

**Author:** [@JulienM](https://forum.opencv.org/u/JulienM)\
**Replies:** 0\
**Last updated:** [May 9, 2025, 8:05pm UTC](https://forum.opencv.org/t/directml-backend-for-dnn-confusion-with-g-api-onnx/20989 "2025-05-09T20:05:27Z")

</div>

Hi, I’m currently using opencv to perform inference on images using my trained model exported to onnx. It works pretty well and I take advantage of the stock, OpenVino and CUDA backends. My biggest complaint is the size…

---

## [Python YUNet workflow](https://forum.opencv.org/t/python-yunet-workflow/20942)

<div class="topic-metadata">

**Author:** [@TypeVar](https://forum.opencv.org/u/TypeVar)\
**Replies:** 0\
**Last updated:** [May 3, 2025, 6:47am UTC](https://forum.opencv.org/t/python-yunet-workflow/20942 "2025-05-03T06:47:14Z")

</div>

Hi there. I’m enjoying YUNet face detector from here: opencv\_zoo/models/face\_detection\_yunet at main · opencv/opencv\_zoo · GitHub I noticed that raw .onnx file has input shape of 640x640, but in demo.py the input shape…

---

## [Understanding the Philosophy Behind OpenCV's DNN Module](https://forum.opencv.org/t/understanding-the-philosophy-behind-opencvs-dnn-module/20906)

<div class="topic-metadata">

**Author:** [@radiantb](https://forum.opencv.org/u/radiantb)\
**Replies:** 0\
**Last updated:** [April 27, 2025, 3:10pm UTC](https://forum.opencv.org/t/understanding-the-philosophy-behind-opencvs-dnn-module/20906 "2025-04-27T15:10:35Z")

</div>

Hello everyone, Sometime back, I was working on a proposal for a GSoC project about integrating LightGlue and ALIKED into OpenCV by using the DNN module and extending Feature2D modules. While experimenting with LightGlu…

---

## [TIMVX (Amlogic 311D2 NPU on Khadas Vim3)](https://forum.opencv.org/t/timvx-amlogic-311d2-npu-on-khadas-vim3/20554)

<div class="topic-metadata">

**Author:** [@mjasner](https://forum.opencv.org/u/mjasner)\
**Replies:** 3\
**Last updated:** [March 17, 2025, 8:18pm UTC](https://forum.opencv.org/t/timvx-amlogic-311d2-npu-on-khadas-vim3/20554 "2025-03-17T20:18:44Z")

</div>

I’m trying to use the TIMVX support in OpenCV to run an ONNX model via python, but it doesn’t look like it’s actually running on the NPU at all. When I run the model the CPU usage goes to 400% (quad core device) and the …

---

## [Bottle Cap Defect Detection](https://forum.opencv.org/t/bottle-cap-defect-detection/20492)

<div class="topic-metadata">

**Author:** [@xiaohua\_meng](https://forum.opencv.org/u/xiaohua_meng)\
**Replies:** 1\
**Last updated:** [March 11, 2025, 7:20am UTC](https://forum.opencv.org/t/bottle-cap-defect-detection/20492 "2025-03-11T07:20:54Z")

</div>

Hello everyone, Objective: We are researching how to achieve accurate defect detection using a small number of high-quality defect-rich samples. Our focus is on detecting defects on bottle caps, such as black spots, hai…

---

## [Why I am not getting the same FPS for YuNet model](https://forum.opencv.org/t/why-i-am-not-getting-the-same-fps-for-yunet-model/20458)

<div class="topic-metadata">

**Author:** [@KamalLagh](https://forum.opencv.org/u/KamalLagh)\
**Replies:** 0\
**Last updated:** [March 8, 2025, 1:48am UTC](https://forum.opencv.org/t/why-i-am-not-getting-the-same-fps-for-yunet-model/20458 "2025-03-08T01:48:20Z")

</div>

Hello everyone, I’m running a face detection application using OpenCV’s official YuNet model (face\_detection\_yunet\_2023mar.onnx). First Approach: I use cv2.FaceDetectorYN.create() and call .detect(). Second Approach: …

---

## [Questions About GSoC 2025](https://forum.opencv.org/t/questions-about-gsoc-2025/20407)

<div class="topic-metadata">

**Author:** [@une\_glace](https://forum.opencv.org/u/une_glace)\
**Replies:** 4\
**Last updated:** [March 6, 2025, 3:18pm UTC](https://forum.opencv.org/t/questions-about-gsoc-2025/20407 "2025-03-06T15:18:42Z")

</div>

Hi everyone, I’m a sophomore undergraduate this year and I want to contribute to a project in GSoC 2025. I’ve already found this webpage: GSoC\_2025 · opencv/opencv Wiki · GitHub However, I’m still confused about what s…

---

## [How do I know what each of these index mean for output blob?](https://forum.opencv.org/t/how-do-i-know-what-each-of-these-index-mean-for-output-blob/20306)

<div class="topic-metadata">

**Author:** [@samuelwhiskeyjohnson](https://forum.opencv.org/u/samuelwhiskeyjohnson)\
**Replies:** 4\
**Last updated:** [February 23, 2025, 12:44pm UTC](https://forum.opencv.org/t/how-do-i-know-what-each-of-these-index-mean-for-output-blob/20306 "2025-02-23T12:44:53Z")

</div>

res10\_300x300\_ssd\_iter\_140000\_fp16.caffemodel net = cv2.dnn.readNetFromCaffe(prototxt\_path, model\_path) cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() blob = cv2.dnn.blobFromImage(cv2.resize(frame,…

---

## [ONNX Model with OpenCV.js](https://forum.opencv.org/t/onnx-model-with-opencv-js/14913)

<div class="topic-metadata">

**Author:** [@moritz](https://forum.opencv.org/u/moritz)\
**Replies:** 2\
**Last updated:** [February 10, 2025, 6:00am UTC](https://forum.opencv.org/t/onnx-model-with-opencv-js/14913 "2025-02-10T06:00:18Z")

</div>

Hey all, I have some issues using my ONNX model with OpenCV.js, which I trained with pytorch and then exported. The model runs fine with inference when I use the onnx runtime engine in python: import onnxruntime as or…

---

## [\[Opencv.js\] Loading tensorflow model into opencv.js](https://forum.opencv.org/t/opencv-js-loading-tensorflow-model-into-opencv-js/3422)

<div class="topic-metadata">

**Author:** [@eastemployeer](https://forum.opencv.org/u/eastemployeer)\
**Replies:** 6\
**Last updated:** [February 8, 2025, 6:55pm UTC](https://forum.opencv.org/t/opencv-js-loading-tensorflow-model-into-opencv-js/3422 "2025-02-08T18:55:26Z")

</div>

Hi there, I would like to ask whether there is any possibility to load tensorflow model (frozen\_inference\_graph.pb and corresponding .pbtxt file) into opencv.js? I’m struggling with it from several days. It appears that…

---

## [Issue when training the ML model](https://forum.opencv.org/t/issue-when-training-the-ml-model/19824)

<div class="topic-metadata">

**Author:** [@Tin\_Basic](https://forum.opencv.org/u/Tin_Basic)\
**Replies:** 1\
**Last updated:** [January 28, 2025, 5:57pm UTC](https://forum.opencv.org/t/issue-when-training-the-ml-model/19824 "2025-01-28T17:57:59Z")

</div>

Working on a model that recognizes handwritten digits from the MNIST dataset. Did my code in visual studio. After training the data i get Nan and inf in the output layer everytime. std::string fileNameImages = file…

---

## [Having trouble using GPU for detection](https://forum.opencv.org/t/having-trouble-using-gpu-for-detection/19850)

<div class="topic-metadata">

**Author:** [@erickulcyk](https://forum.opencv.org/u/erickulcyk)\
**Replies:** 3\
**Last updated:** [January 23, 2025, 4:46am UTC](https://forum.opencv.org/t/having-trouble-using-gpu-for-detection/19850 "2025-01-23T04:46:51Z")

</div>

I am using the rust bindings for opencv, and I set the preferred backend and target and run detection like so: match model.set\_preferable\_target(dnn::Target::DNN\_TARGET\_CUDA) { …

---

## [I want to reshape my blob in android from 1\*3\*62\*62 to 1\*62\*62\*3](https://forum.opencv.org/t/i-want-to-reshape-my-blob-in-android-from-1-3-62-62-to-1-62-62-3/19548)

<div class="topic-metadata">

**Author:** [@vishal2.bansal](https://forum.opencv.org/u/vishal2.bansal)\
**Replies:** 3\
**Last updated:** [December 18, 2024, 12:18pm UTC](https://forum.opencv.org/t/i-want-to-reshape-my-blob-in-android-from-1-3-62-62-to-1-62-62-3/19548 "2024-12-18T12:18:15Z")

</div>

val blob = Dnn.blobFromImage( frame, 1.0/255/0, Size(62.0, 62.0)) here blob dimension is of : 1\*3\*62\*62 i want the dimension in shape: 1\*62\*62\*3

[Next page](https://forum.opencv.org/tag/dnn/1.md?match_all_tags=true&page=1&tags%5B%5D=dnn)
