# Unspecified issue when using dnn module

**URL:** <https://forum.opencv.org/t/unspecified-issue-when-using-dnn-module/3879>\
**Category:** Uncategorized\
**Created:** [June 15, 2021, 10:12am UTC](https://forum.opencv.org/t/unspecified-issue-when-using-dnn-module/3879 "2021-06-15T10:12:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro\_Diaz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/pedro_diaz/32/1809_2.png) [@Pedro\_Diaz](https://forum.opencv.org/u/Pedro_Diaz)\
**Post date:** [June 15, 2021, 10:12am UTC](https://forum.opencv.org/t/unspecified-issue-when-using-dnn-module/3879/1 "2021-06-15T10:12:43Z")

</div>

Looks interesting, I´m working on the same issue.

So, I can´t figure out what makes the difference. If I use:

```auto
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)

```

The script break as seen on Abraham’s code (Assertion failed).

If those lines are ommited, the script goes on.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [June 15, 2021, 10:26am UTC](https://forum.opencv.org/t/unspecified-issue-when-using-dnn-module/3879/2 "2021-06-15T10:26:08Z")

</div>

> [@Pedro\_Diaz](#):
>
> I´m working on the same issue.

i very much doubt, that yours is the same…

> [@Pedro\_Diaz](#):
>
> The script break

how so, exactly ?? stacktrace ?

---

<div class="post-metadata">

**Author:** ![Pedro\_Diaz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/pedro_diaz/32/1809_2.png) [@Pedro\_Diaz](https://forum.opencv.org/u/Pedro_Diaz)\
**Post date:** [June 15, 2021, 10:42am UTC](https://forum.opencv.org/t/unspecified-issue-when-using-dnn-module/3879/3 "2021-06-15T10:42:50Z")

</div>

More explicit, we are working together. 🙃

The goal is to be capables of doing image processing using opencv with GPU support from almost zero experience in opencv environment.

By now we´ve done several image processing using opencv cpu environment, but we cannot get the GPU environment to work, as we need “real time” FPS processing.

We have a Nvidia Tesla K20X but we can´t get the script to run. We are using multiple examples found by internet, and this may be the reason of the different codes we have.

Just now I cannot run any code because opencv is compiling, but the code that trows the error in my case is what you found in Adrian´s blog, just here:

> **[OpenCV 'dnn' with NVIDIA GPUs: 1549% faster YOLO, SSD, and Mask R-CNN -...](https://www.pyimagesearch.com/2020/02/10/opencv-dnn-with-nvidia-gpus-1549-faster-yolo-ssd-and-mask-r-cnn/)**
>
> In this tutorial, you’ll learn how to use OpenCV’s “dnn” module with an NVIDIA GPU for up to 1,549% faster object detection (YOLO and SSD) and instance segmentation (Mask R-CNN). Last week, we discovered how to configure and install OpenCV…

Edit: We´ve been using Yolo v3 for object detection

Thanks for your time

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [June 15, 2021, 10:50am UTC](https://forum.opencv.org/t/unspecified-issue-when-using-dnn-module/3879/4 "2021-06-15T10:50:41Z")

</div>

> [@Pedro\_Diaz](#):
>
> error in my case is what you found in Adrian´s blog, just here:

sorry, it does not work like this here. we won’t read blog posts to find out about your error.

again, stacktrace (and exact code snippet), or get ignored.
